Mailinglist Archive: opensuse-commit (1093 mails)

< Previous Next >
commit gcc45 for openSUSE:Factory
  • From: root@xxxxxxxxxxxxxxx (h_root)
  • Date: Fri, 12 Mar 2010 17:28:45 +0100
  • Message-id: <20100312162845.D84CF2020C@xxxxxxxxxxxxxxx>

Hello community,

here is the log from the commit of package gcc45 for openSUSE:Factory
checked in at Fri Mar 12 17:28:45 CET 2010.



--------
--- gcc45/cross-avr-gcc45.changes 2010-03-02 17:56:13.000000000 +0100
+++ /mounts/work_src_done/STABLE/gcc45/cross-avr-gcc45.changes 2010-03-12
14:56:10.000000000 +0100
@@ -1,0 +2,24 @@
+Fri Mar 12 12:43:45 CET 2010 - rguenther@xxxxxxxxxx
+
+- Switch to elfutils libelf. libelf has ABI issues when using
+ LFS on 32bit hosts.
+- Disable --as-needed, it disturbs libjava testing with indirect dispatch.
+
+-------------------------------------------------------------------
+Thu Mar 11 14:07:09 CET 2010 - rguenther@xxxxxxxxxx
+
+- Update to SVN trunk head (r157384).
+- Fixup ada testsuite log filter.
+
+-------------------------------------------------------------------
+Tue Mar 9 11:59:05 CET 2010 - rguenther@xxxxxxxxxx
+
+- Fix icecream crosses BuildRequires.
+
+-------------------------------------------------------------------
+Mon Mar 8 16:21:02 CET 2010 - rguenther@xxxxxxx
+
+- Update to SVN trunk head (r157277).
+- Add patch for PR43270, enable more array-bound warnings.
+
+-------------------------------------------------------------------
cross-hppa-gcc-icecream-backend.changes: same change
cross-i386-gcc-icecream-backend.changes: same change
cross-ia64-gcc-icecream-backend.changes: same change
cross-ppc-gcc-icecream-backend.changes: same change
cross-ppc64-gcc-icecream-backend.changes: same change
cross-s390-gcc-icecream-backend.changes: same change
cross-s390x-gcc-icecream-backend.changes: same change
cross-spu-gcc45-static.changes: same change
cross-spu-gcc45.changes: same change
cross-x86_64-gcc-icecream-backend.changes: same change
gcc45-testresults.changes: same change
gcc45.changes: same change
libffi45.changes: same change
libgcj45.changes: same change

calling whatdependson for head-i586


Old:
----
gcc-4.5.0-20100302.tar.bz2

New:
----
gcc-4.5.0-20100311.tar.bz2
pr43270.diff

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ cross-avr-gcc45.spec ++++++
--- /var/tmp/diff_new_pack.oFa8RK/_old 2010-03-12 17:17:47.000000000 +0100
+++ /var/tmp/diff_new_pack.oFa8RK/_new 2010-03-12 17:17:47.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package cross-avr-gcc45 (Version 4.5.0_20100302)
+# spec file for package cross-avr-gcc45 (Version 4.5.0_20100311)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -49,7 +49,7 @@
Name: cross-avr-gcc45
BuildRequires: bison flex mpc-devel mpfr-devel zlib-devel
%ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc
-BuildRequires: cloog-devel libelf0-devel ppl-devel
+BuildRequires: cloog-devel libelf-devel ppl-devel
%endif
BuildRequires: cross-avr-binutils
%if "avr" == "spu"
@@ -73,7 +73,7 @@
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64

Url: http://gcc.gnu.org/
-Version: 4.5.0_20100302
+Version: 4.5.0_20100311
Release: 1
%define gcc_version %(echo %version | sed 's/_.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
@@ -106,6 +106,7 @@
Patch28: pr33763.diff
Patch29: build-id.diff
Patch30: gcc43-no-unwind-tables.diff
+Patch31: pr43270.diff
# A set of patches from the RH srpm
Patch51: gcc41-ia64-stack-protector.patch
Patch55: gcc41-java-slow_pthread_self.patch
@@ -191,6 +192,7 @@
%patch29
%endif
%patch30
+%patch31
%patch51
%patch55
%patch57
@@ -201,7 +203,8 @@
%build
# Avoid rebuilding of generated files
contrib/gcc_update --touch
-
+# Avoid fucking up testsuite results with Java and indirect dispatch
+export SUSE_ASNEEDED=0
# Split version file into version used for directories (X.Y) and
# version to report with --version (X.Y.Z).
# See also gcc-dir-version.patch.

++++++ cross-hppa-gcc-icecream-backend.spec ++++++
--- /var/tmp/diff_new_pack.oFa8RK/_old 2010-03-12 17:17:47.000000000 +0100
+++ /var/tmp/diff_new_pack.oFa8RK/_new 2010-03-12 17:17:47.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package cross-hppa-gcc-icecream-backend (Version
4.5.0_20100302)
+# spec file for package cross-hppa-gcc-icecream-backend (Version
4.5.0_20100311)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -30,10 +30,14 @@
%define gcc_icecream 1

Name: cross-hppa-gcc-icecream-backend
-BuildRequires: cross-hppa-binutils glibc-devel-32bit
-BuildRequires: gmp-devel mpfr-devel
-BuildRequires: bison
-BuildRequires: flex
+BuildRequires: bison flex gettext-devel glibc-devel-32bit mpc-devel
mpfr-devel perl texinfo zlib-devel
+BuildRequires: cross-hppa-binutils
+%ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc
+BuildRequires: cloog-devel libelf-devel ppl-devel
+%endif
+%ifarch ia64
+BuildRequires: libunwind-devel
+%endif
ExclusiveArch: ppc ppc64 %ix86 x86_64 ia64
%define _binary_payload w.ufdio

@@ -42,7 +46,7 @@
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64

Url: http://gcc.gnu.org/
-Version: 4.5.0_20100302
+Version: 4.5.0_20100311
Release: 1
%define gcc_version %(echo %version | sed 's/_.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
@@ -75,6 +79,7 @@
Patch28: pr33763.diff
Patch29: build-id.diff
Patch30: gcc43-no-unwind-tables.diff
+Patch31: pr43270.diff
# A set of patches from the RH srpm
Patch51: gcc41-ia64-stack-protector.patch
Patch55: gcc41-java-slow_pthread_self.patch
@@ -166,6 +171,7 @@
%patch29
%endif
%patch30
+%patch31
%patch51
%patch55
%patch57
@@ -176,7 +182,8 @@
%build
# Avoid rebuilding of generated files
contrib/gcc_update --touch
-
+# Avoid fucking up testsuite results with Java and indirect dispatch
+export SUSE_ASNEEDED=0
# Split version file into version used for directories (X.Y) and
# version to report with --version (X.Y.Z).
# See also gcc-dir-version.patch.

cross-i386-gcc-icecream-backend.spec: same change
cross-ia64-gcc-icecream-backend.spec: same change
cross-ppc-gcc-icecream-backend.spec: same change
cross-ppc64-gcc-icecream-backend.spec: same change
cross-s390-gcc-icecream-backend.spec: same change
cross-s390x-gcc-icecream-backend.spec: same change
++++++ cross-spu-gcc45-static.spec ++++++
--- /var/tmp/diff_new_pack.oFa8RK/_old 2010-03-12 17:17:47.000000000 +0100
+++ /var/tmp/diff_new_pack.oFa8RK/_new 2010-03-12 17:17:47.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package cross-spu-gcc45-static (Version 4.5.0_20100302)
+# spec file for package cross-spu-gcc45-static (Version 4.5.0_20100311)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -49,7 +49,7 @@
Name: cross-spu-gcc45-static
BuildRequires: bison flex mpc-devel mpfr-devel zlib-devel
%ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc
-BuildRequires: cloog-devel libelf0-devel ppl-devel
+BuildRequires: cloog-devel libelf-devel ppl-devel
%endif
BuildRequires: cross-spu-binutils
%if "spu" == "spu"
@@ -73,7 +73,7 @@
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64

Url: http://gcc.gnu.org/
-Version: 4.5.0_20100302
+Version: 4.5.0_20100311
Release: 1
%define gcc_version %(echo %version | sed 's/_.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
@@ -106,6 +106,7 @@
Patch28: pr33763.diff
Patch29: build-id.diff
Patch30: gcc43-no-unwind-tables.diff
+Patch31: pr43270.diff
# A set of patches from the RH srpm
Patch51: gcc41-ia64-stack-protector.patch
Patch55: gcc41-java-slow_pthread_self.patch
@@ -191,6 +192,7 @@
%patch29
%endif
%patch30
+%patch31
%patch51
%patch55
%patch57
@@ -201,7 +203,8 @@
%build
# Avoid rebuilding of generated files
contrib/gcc_update --touch
-
+# Avoid fucking up testsuite results with Java and indirect dispatch
+export SUSE_ASNEEDED=0
# Split version file into version used for directories (X.Y) and
# version to report with --version (X.Y.Z).
# See also gcc-dir-version.patch.

cross-spu-gcc45.spec: same change
++++++ cross-x86_64-gcc-icecream-backend.spec ++++++
--- /var/tmp/diff_new_pack.oFa8RK/_old 2010-03-12 17:17:47.000000000 +0100
+++ /var/tmp/diff_new_pack.oFa8RK/_new 2010-03-12 17:17:47.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package cross-x86_64-gcc-icecream-backend (Version
4.5.0_20100302)
+# spec file for package cross-x86_64-gcc-icecream-backend (Version
4.5.0_20100311)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -30,10 +30,14 @@
%define gcc_icecream 1

Name: cross-x86_64-gcc-icecream-backend
-BuildRequires: cross-x86_64-binutils glibc-devel-32bit
-BuildRequires: gmp-devel mpfr-devel
-BuildRequires: bison
-BuildRequires: flex
+BuildRequires: bison flex gettext-devel glibc-devel-32bit mpc-devel
mpfr-devel perl texinfo zlib-devel
+BuildRequires: cross-x86_64-binutils
+%ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc
+BuildRequires: cloog-devel libelf-devel ppl-devel
+%endif
+%ifarch ia64
+BuildRequires: libunwind-devel
+%endif
ExclusiveArch: ppc ppc64 %ix86 x86_64 ia64
%define _binary_payload w.ufdio

@@ -42,7 +46,7 @@
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64

Url: http://gcc.gnu.org/
-Version: 4.5.0_20100302
+Version: 4.5.0_20100311
Release: 1
%define gcc_version %(echo %version | sed 's/_.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
@@ -75,6 +79,7 @@
Patch28: pr33763.diff
Patch29: build-id.diff
Patch30: gcc43-no-unwind-tables.diff
+Patch31: pr43270.diff
# A set of patches from the RH srpm
Patch51: gcc41-ia64-stack-protector.patch
Patch55: gcc41-java-slow_pthread_self.patch
@@ -166,6 +171,7 @@
%patch29
%endif
%patch30
+%patch31
%patch51
%patch55
%patch57
@@ -176,7 +182,8 @@
%build
# Avoid rebuilding of generated files
contrib/gcc_update --touch
-
+# Avoid fucking up testsuite results with Java and indirect dispatch
+export SUSE_ASNEEDED=0
# Split version file into version used for directories (X.Y) and
# version to report with --version (X.Y.Z).
# See also gcc-dir-version.patch.

++++++ gcc45-testresults.spec ++++++
--- /var/tmp/diff_new_pack.oFa8RK/_old 2010-03-12 17:17:47.000000000 +0100
+++ /var/tmp/diff_new_pack.oFa8RK/_new 2010-03-12 17:17:47.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package gcc45-testresults (Version 4.5.0_20100302)
+# spec file for package gcc45-testresults (Version 4.5.0_20100311)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -92,7 +92,7 @@
Name: gcc45-testresults
BuildRequires: bison flex gettext-devel glibc-devel-32bit mpc-devel
mpfr-devel perl texinfo zlib-devel
%ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc
-BuildRequires: cloog-devel libelf0-devel ppl-devel
+BuildRequires: cloog-devel libelf-devel ppl-devel
%endif
%if %{build_ada}
%if %{suse_version} > 1130
@@ -164,7 +164,7 @@
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64

Url: http://gcc.gnu.org/
-Version: 4.5.0_20100302
+Version: 4.5.0_20100311
Release: 1
%define gcc_version %(echo %version | sed 's/_.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
@@ -177,7 +177,7 @@
%ifarch %gold_archs
Requires: binutils-gold
%endif
-Requires: libelf0 >= 0.8.12
+Requires: libelf1 >= 0.137
Requires: cpp45 = %{version}-%{release}
%if 0%{!?build_optional_compiler:1}
Requires: libgcc%{libgcc_s} >= %{version}-%{release}
@@ -221,6 +221,7 @@
Patch28: pr33763.diff
Patch29: build-id.diff
Patch30: gcc43-no-unwind-tables.diff
+Patch31: pr43270.diff
# A set of patches from the RH srpm
Patch51: gcc41-ia64-stack-protector.patch
Patch55: gcc41-java-slow_pthread_self.patch
@@ -415,6 +416,7 @@
%patch29
%endif
%patch30
+%patch31
%patch51
%patch55
%patch57
@@ -425,7 +427,8 @@
%build
# Avoid rebuilding of generated files
contrib/gcc_update --touch
-
+# Avoid fucking up testsuite results with Java and indirect dispatch
+export SUSE_ASNEEDED=0
# Split version file into version used for directories (X.Y) and
# version to report with --version (X.Y.Z).
# See also gcc-dir-version.patch.
@@ -674,7 +677,7 @@
cd obj-%{GCCDIST}
%if %{run_tests}
cp `find . -name "*.sum"` ../testresults/
-cp `find . -name "*.log" \! -name "config.log" |grep -v 'acats/tests' `
../testresults/
+cp `find . -name "*.log" \! -name "config.log" | grep -v 'acats.\?/tests' `
../testresults/
chmod 644 ../testresults/*
%endif


++++++ gcc45.spec ++++++
--- /var/tmp/diff_new_pack.oFa8RK/_old 2010-03-12 17:17:47.000000000 +0100
+++ /var/tmp/diff_new_pack.oFa8RK/_new 2010-03-12 17:17:47.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package gcc45 (Version 4.5.0_20100302)
+# spec file for package gcc45 (Version 4.5.0_20100311)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -74,7 +74,7 @@
Name: gcc45
BuildRequires: bison flex gettext-devel glibc-devel-32bit mpc-devel
mpfr-devel perl texinfo zlib-devel
%ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc
-BuildRequires: cloog-devel libelf0-devel ppl-devel
+BuildRequires: cloog-devel libelf-devel ppl-devel
%endif
%if %{build_ada}
%if %{suse_version} > 1130
@@ -146,7 +146,7 @@
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64

Url: http://gcc.gnu.org/
-Version: 4.5.0_20100302
+Version: 4.5.0_20100311
Release: 1
%define gcc_version %(echo %version | sed 's/_.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
@@ -159,7 +159,7 @@
%ifarch %gold_archs
Requires: binutils-gold
%endif
-Requires: libelf0 >= 0.8.12
+Requires: libelf1 >= 0.137
Requires: cpp45 = %{version}-%{release}
%if 0%{!?build_optional_compiler:1}
Requires: libgcc%{libgcc_s} >= %{version}-%{release}
@@ -203,6 +203,7 @@
Patch28: pr33763.diff
Patch29: build-id.diff
Patch30: gcc43-no-unwind-tables.diff
+Patch31: pr43270.diff
# A set of patches from the RH srpm
Patch51: gcc41-ia64-stack-protector.patch
Patch55: gcc41-java-slow_pthread_self.patch
@@ -1574,6 +1575,7 @@
%patch29
%endif
%patch30
+%patch31
%patch51
%patch55
%patch57
@@ -1584,7 +1586,8 @@
%build
# Avoid rebuilding of generated files
contrib/gcc_update --touch
-
+# Avoid fucking up testsuite results with Java and indirect dispatch
+export SUSE_ASNEEDED=0
# Split version file into version used for directories (X.Y) and
# version to report with --version (X.Y.Z).
# See also gcc-dir-version.patch.
@@ -2081,7 +2084,7 @@
# GCC-TESTSUITE-DELETE-END
%if %{run_tests}
cp `find . -name "*.sum"` ../testresults/
-cp `find . -name "*.log" \! -name "config.log" |grep -v 'acats/tests' `
../testresults/
+cp `find . -name "*.log" \! -name "config.log" | grep -v 'acats.\?/tests' `
../testresults/
chmod 644 ../testresults/*
%endif
# GCC-TESTSUITE-DELETE-BEGIN

libffi45.spec: same change
libgcj45.spec: same change
++++++ cross-icecream.spec.in ++++++
--- /var/tmp/diff_new_pack.oFa8RK/_old 2010-03-12 17:17:47.000000000 +0100
+++ /var/tmp/diff_new_pack.oFa8RK/_new 2010-03-12 17:17:47.000000000 +0100
@@ -23,10 +23,14 @@
%define gcc_icecream 1

Name: cross-@cross_arch@-gcc-icecream-backend
-BuildRequires: cross-@cross_arch@-binutils glibc-devel-32bit
-BuildRequires: gmp-devel mpfr-devel
-BuildRequires: bison
-BuildRequires: flex
+BuildRequires: bison flex gettext-devel glibc-devel-32bit mpfr-devel perl
texinfo zlib-devel mpc-devel
+BuildRequires: cross-@cross_arch@-binutils
+%ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc
+BuildRequires: cloog-devel ppl-devel libelf-devel
+%endif
+%ifarch ia64
+BuildRequires: libunwind-devel
+%endif
ExclusiveArch: ppc ppc64 %ix86 x86_64 ia64
%define _binary_payload w.ufdio


++++++ cross.spec.in ++++++
--- /var/tmp/diff_new_pack.oFa8RK/_old 2010-03-12 17:17:47.000000000 +0100
+++ /var/tmp/diff_new_pack.oFa8RK/_new 2010-03-12 17:17:47.000000000 +0100
@@ -44,7 +44,7 @@
Name: cross-$cross_arch-gcc$base_ver$name_suffix
BuildRequires: bison flex mpfr-devel zlib-devel mpc-devel
%ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc
-BuildRequires: cloog-devel ppl-devel libelf0-devel
+BuildRequires: cloog-devel ppl-devel libelf-devel
%endif
BuildRequires: cross-$cross_arch_cpu-binutils
%if "$cross_arch" == "spu"


++++++ gcc-4.5.0-20100302.tar.bz2 -> gcc-4.5.0-20100311.tar.bz2 ++++++
gcc45/gcc-4.5.0-20100302.tar.bz2
/mounts/work_src_done/STABLE/gcc45/gcc-4.5.0-20100311.tar.bz2 differ: char 11,
line 1

++++++ gcc.spec.in ++++++
--- /var/tmp/diff_new_pack.oFa8RK/_old 2010-03-12 17:17:48.000000000 +0100
+++ /var/tmp/diff_new_pack.oFa8RK/_new 2010-03-12 17:17:48.000000000 +0100
@@ -76,7 +76,7 @@
Name: gcc@base_ver@
BuildRequires: bison flex gettext-devel glibc-devel-32bit mpfr-devel perl
texinfo zlib-devel mpc-devel
%ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc
-BuildRequires: cloog-devel ppl-devel libelf0-devel
+BuildRequires: cloog-devel ppl-devel libelf-devel
%endif
%if %{build_ada}
%if %{suse_version} > 1130
@@ -148,7 +148,7 @@
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64

URL: http://gcc.gnu.org/
-Version: 4.5.0_20100302
+Version: 4.5.0_20100311
Release: 1
%define gcc_version %(echo %version | sed 's/_.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
@@ -161,7 +161,7 @@
%ifarch %gold_archs
Requires: binutils-gold
%endif
-Requires: libelf0 >= 0.8.12
+Requires: libelf1 >= 0.137
Requires: cpp@base_ver@ = %{version}-%{release}
%if 0%{!?build_optional_compiler:1}
Requires: libgcc%{libgcc_s} >= %{version}-%{release}
@@ -205,6 +205,7 @@
Patch28: pr33763.diff
Patch29: build-id.diff
Patch30: gcc43-no-unwind-tables.diff
+Patch31: pr43270.diff
# A set of patches from the RH srpm
Patch51: gcc41-ia64-stack-protector.patch
Patch55: gcc41-java-slow_pthread_self.patch
@@ -949,6 +950,7 @@
%patch29
%endif
%patch30
+%patch31
%patch51
%patch55
%patch57
@@ -959,7 +961,8 @@
%build
# Avoid rebuilding of generated files
contrib/gcc_update --touch
-
+# Avoid fucking up testsuite results with Java and indirect dispatch
+export SUSE_ASNEEDED=0
# Split version file into version used for directories (X.Y) and
# version to report with --version (X.Y.Z).
# See also gcc-dir-version.patch.
@@ -1456,7 +1459,7 @@
# GCC-TESTSUITE-DELETE-END
%if %{run_tests}
cp `find . -name "*.sum"` ../testresults/
-cp `find . -name "*.log" \! -name "config.log" |grep -v 'acats/tests' `
../testresults/
+cp `find . -name "*.log" \! -name "config.log" | grep -v 'acats.\?/tests' `
../testresults/
chmod 644 ../testresults/*
%endif
# GCC-TESTSUITE-DELETE-BEGIN

++++++ pr43270.diff ++++++
Index: gcc/tree-vrp.c
===================================================================
*** gcc/tree-vrp.c.orig 2010-03-08 15:10:59.000000000 +0100
--- gcc/tree-vrp.c 2010-03-08 16:11:47.000000000 +0100
*************** check_array_ref (location_t location, tr
*** 4981,5003 ****
{
value_range_t* vr = NULL;
tree low_sub, up_sub;
! tree low_bound, up_bound = array_ref_up_bound (ref);

low_sub = up_sub = TREE_OPERAND (ref, 1);

! if (!up_bound || TREE_NO_WARNING (ref)
! || TREE_CODE (up_bound) != INTEGER_CST
! /* Can not check flexible arrays. */
! || (TYPE_SIZE (TREE_TYPE (ref)) == NULL_TREE
! && TYPE_DOMAIN (TREE_TYPE (ref)) != NULL_TREE
! && TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (ref))) == NULL_TREE)
! /* Accesses after the end of arrays of size 0 (gcc
! extension) and 1 are likely intentional ("struct
! hack"). */
! || compare_tree_int (up_bound, 1) <= 0)
return;

low_bound = array_ref_low_bound (ref);

if (TREE_CODE (low_sub) == SSA_NAME)
{
--- 4981,5026 ----
{
value_range_t* vr = NULL;
tree low_sub, up_sub;
! tree low_bound, up_bound, up_bound_p1;
! tree base;
!
! if (TREE_NO_WARNING (ref))
! return;

low_sub = up_sub = TREE_OPERAND (ref, 1);
+ up_bound = array_ref_up_bound (ref);

! /* Can not check flexible arrays. */
! if (!up_bound
! || TREE_CODE (up_bound) != INTEGER_CST)
return;

+ /* Accesses to trailing arrays via pointers may access storage
+ beyond the types array bounds. */
+ base = get_base_address (ref);
+ if (base
+ && INDIRECT_REF_P (base))
+ {
+ tree cref, next = NULL_TREE;
+
+ if (TREE_CODE (TREE_OPERAND (ref, 0)) != COMPONENT_REF)
+ return;
+
+ cref = TREE_OPERAND (ref, 0);
+ if (TREE_CODE (TREE_TYPE (TREE_OPERAND (cref, 0))) == RECORD_TYPE)
+ for (next = TREE_CHAIN (TREE_OPERAND (cref, 1));
+ next && TREE_CODE (next) != FIELD_DECL;
+ next = TREE_CHAIN (next))
+ ;
+
+ /* If this is the last field in a struct type or a field in a
+ union type do not warn. */
+ if (!next)
+ return;
+ }
+
low_bound = array_ref_low_bound (ref);
+ up_bound_p1 = int_const_binop (PLUS_EXPR, up_bound, integer_one_node, 0);

if (TREE_CODE (low_sub) == SSA_NAME)
{
*************** check_array_ref (location_t location, tr
*** 5022,5035 ****
}
}
else if (TREE_CODE (up_sub) == INTEGER_CST
! && tree_int_cst_lt (up_bound, up_sub)
! && !tree_int_cst_equal (up_bound, up_sub)
! && (!ignore_off_by_one
! || !tree_int_cst_equal (int_const_binop (PLUS_EXPR,
! up_bound,
! integer_one_node,
! 0),
! up_sub)))
{
warning_at (location, OPT_Warray_bounds,
"array subscript is above array bounds");
--- 5045,5055 ----
}
}
else if (TREE_CODE (up_sub) == INTEGER_CST
! && (ignore_off_by_one
! ? (tree_int_cst_lt (up_bound, up_sub)
! && !tree_int_cst_equal (up_bound_p1, up_sub))
! : (tree_int_cst_lt (up_bound, up_sub)
! || tree_int_cst_equal (up_bound_p1, up_sub))))
{
warning_at (location, OPT_Warray_bounds,
"array subscript is above array bounds");
Index: gcc/testsuite/g++.dg/warn/Warray-bounds-4.C
===================================================================
*** /dev/null 1970-01-01 00:00:00.000000000 +0000
--- gcc/testsuite/g++.dg/warn/Warray-bounds-4.C 2010-03-08 16:12:00.000000000
+0100
***************
*** 0 ****
--- 1,37 ----
+ // { dg-do compile }
+ // { dg-options "-O2 -Warray-bounds" }
+
+ class String
+ {
+ public:
+ virtual unsigned long length() const = 0;
+ virtual char get(unsigned long index) const = 0;
+ virtual void set(unsigned long index, char value) = 0;
+ virtual char& operator[] (unsigned long value) = 0;
+ virtual ~String() {};
+ };
+
+ template<unsigned long size> class FixedString : public String
+ {
+ private:
+ char contents[size];
+
+ public:
+ virtual unsigned long length() const { return size; }
+ virtual char get(unsigned long index) const { return contents[index]; }
+ virtual void set(unsigned long index, char value) { contents[index] =
value; }
+ virtual char& operator[] (unsigned long index) { return contents[index]; }
+
+ FixedString() { contents[0] = '\0'; } // { dg-warning "above array bounds" }
+ };
+
+ void print_length (const String& string);
+
+ int main()
+ {
+ const FixedString<0> empty;
+
+ print_length(empty);
+
+ return 0;
+ }
Index: gcc/tree-ssa-sccvn.h
===================================================================
*** gcc/tree-ssa-sccvn.h.orig 2010-03-08 15:10:59.000000000 +0100
--- gcc/tree-ssa-sccvn.h 2010-03-08 15:11:08.000000000 +0100
*************** unsigned int get_next_value_id (void);
*** 204,207 ****
--- 204,208 ----
unsigned int get_constant_value_id (tree);
unsigned int get_or_alloc_constant_value_id (tree);
bool value_id_constant_p (unsigned int);
+ tree fully_constant_vn_reference_p (vn_reference_t);
#endif /* TREE_SSA_SCCVN_H */
Index: gcc/tree-ssa-pre.c
===================================================================
*** gcc/tree-ssa-pre.c.orig 2010-03-08 15:10:59.000000000 +0100
--- gcc/tree-ssa-pre.c 2010-03-08 15:11:08.000000000 +0100
*************** do_unary:
*** 1231,1279 ****
case REFERENCE:
{
vn_reference_t ref = PRE_EXPR_REFERENCE (e);
! VEC (vn_reference_op_s, heap) *operands = ref->operands;
! vn_reference_op_t op;
!
! /* Try to simplify the translated expression if it is
! a call to a builtin function with at most two arguments. */
! op = VEC_index (vn_reference_op_s, operands, 0);
! if (op->opcode == CALL_EXPR
! && TREE_CODE (op->op0) == ADDR_EXPR
! && TREE_CODE (TREE_OPERAND (op->op0, 0)) == FUNCTION_DECL
! && DECL_BUILT_IN (TREE_OPERAND (op->op0, 0))
! && VEC_length (vn_reference_op_s, operands) >= 2
! && VEC_length (vn_reference_op_s, operands) <= 3)
! {
! vn_reference_op_t arg0, arg1 = NULL;
! bool anyconst = false;
! arg0 = VEC_index (vn_reference_op_s, operands, 1);
! if (VEC_length (vn_reference_op_s, operands) > 2)
! arg1 = VEC_index (vn_reference_op_s, operands, 2);
! if (TREE_CODE_CLASS (arg0->opcode) == tcc_constant
! || (arg0->opcode == ADDR_EXPR
! && is_gimple_min_invariant (arg0->op0)))
! anyconst = true;
! if (arg1
! && (TREE_CODE_CLASS (arg1->opcode) == tcc_constant
! || (arg1->opcode == ADDR_EXPR
! && is_gimple_min_invariant (arg1->op0))))
! anyconst = true;
! if (anyconst)
! {
! tree folded = build_call_expr (TREE_OPERAND (op->op0, 0),
! arg1 ? 2 : 1,
! arg0->op0,
! arg1 ? arg1->op0 : NULL);
! if (folded
! && TREE_CODE (folded) == NOP_EXPR)
! folded = TREE_OPERAND (folded, 0);
! if (folded
! && is_gimple_min_invariant (folded))
! return get_or_alloc_expr_for_constant (folded);
! }
! }
! return e;
! }
default:
return e;
}
--- 1231,1241 ----
case REFERENCE:
{
vn_reference_t ref = PRE_EXPR_REFERENCE (e);
! tree folded;
! if ((folded = fully_constant_vn_reference_p (ref)))
! return get_or_alloc_expr_for_constant (folded);
! return e;
! }
default:
return e;
}
Index: gcc/tree-ssa-sccvn.c
===================================================================
*** gcc/tree-ssa-sccvn.c.orig 2010-03-08 15:10:59.000000000 +0100
--- gcc/tree-ssa-sccvn.c 2010-03-08 16:08:09.000000000 +0100
*************** vn_reference_lookup_pieces (tree vuse, a
*** 1234,1239 ****
--- 1234,1305 ----
return NULL_TREE;
}

+ tree
+ fully_constant_vn_reference_p (vn_reference_t ref)
+ {
+ VEC (vn_reference_op_s, heap) *operands = ref->operands;
+ vn_reference_op_t op;
+
+ /* Try to simplify the translated expression if it is
+ a call to a builtin function with at most two arguments. */
+ op = VEC_index (vn_reference_op_s, operands, 0);
+ if (op->opcode == CALL_EXPR
+ && TREE_CODE (op->op0) == ADDR_EXPR
+ && TREE_CODE (TREE_OPERAND (op->op0, 0)) == FUNCTION_DECL
+ && DECL_BUILT_IN (TREE_OPERAND (op->op0, 0))
+ && VEC_length (vn_reference_op_s, operands) >= 2
+ && VEC_length (vn_reference_op_s, operands) <= 3)
+ {
+ vn_reference_op_t arg0, arg1 = NULL;
+ bool anyconst = false;
+ arg0 = VEC_index (vn_reference_op_s, operands, 1);
+ if (VEC_length (vn_reference_op_s, operands) > 2)
+ arg1 = VEC_index (vn_reference_op_s, operands, 2);
+ if (TREE_CODE_CLASS (arg0->opcode) == tcc_constant
+ || (arg0->opcode == ADDR_EXPR
+ && is_gimple_min_invariant (arg0->op0)))
+ anyconst = true;
+ if (arg1
+ && (TREE_CODE_CLASS (arg1->opcode) == tcc_constant
+ || (arg1->opcode == ADDR_EXPR
+ && is_gimple_min_invariant (arg1->op0))))
+ anyconst = true;
+ if (anyconst)
+ {
+ tree folded = build_call_expr (TREE_OPERAND (op->op0, 0),
+ arg1 ? 2 : 1,
+ arg0->op0,
+ arg1 ? arg1->op0 : NULL);
+ if (folded
+ && TREE_CODE (folded) == NOP_EXPR)
+ folded = TREE_OPERAND (folded, 0);
+ if (folded
+ && is_gimple_min_invariant (folded))
+ return folded;
+ }
+ }
+
+ /* Simplify reads from constant strings. */
+ else if (op->opcode == ARRAY_REF
+ && TREE_CODE (op->op0) == INTEGER_CST
+ && integer_zerop (op->op1)
+ && VEC_length (vn_reference_op_s, operands) == 2)
+ {
+ vn_reference_op_t arg0;
+ arg0 = VEC_index (vn_reference_op_s, operands, 1);
+ if (arg0->opcode == STRING_CST
+ && TYPE_MODE (op->type) == TYPE_MODE (TREE_TYPE (TREE_TYPE
(arg0->op0)))
+ && GET_MODE_CLASS (TYPE_MODE (op->type)) == MODE_INT
+ && GET_MODE_SIZE (TYPE_MODE (op->type)) == 1
+ && compare_tree_int (op->op0, TREE_STRING_LENGTH (arg0->op0)) < 0)
+ return build_int_cst_type (op->type,
+ (TREE_STRING_POINTER (arg0->op0)
+ [TREE_INT_CST_LOW (op->op0)]));
+ }
+
+ return NULL_TREE;
+ }
+
/* Lookup OP in the current hash table, and return the resulting value
number if it exists in the hash table. Return NULL_TREE if it does
not exist in the hash table or if the result field of the structure
*************** vn_reference_lookup (tree op, tree vuse,
*** 1246,1251 ****
--- 1312,1318 ----
{
VEC (vn_reference_op_s, heap) *operands;
struct vn_reference_s vr1;
+ tree cst;

if (vnresult)
*vnresult = NULL;
*************** vn_reference_lookup (tree op, tree vuse,
*** 1255,1260 ****
--- 1322,1329 ----
vr1.type = TREE_TYPE (op);
vr1.set = get_alias_set (op);
vr1.hashcode = vn_reference_compute_hash (&vr1);
+ if ((cst = fully_constant_vn_reference_p (&vr1)))
+ return cst;

if (maywalk
&& vr1.vuse)
Index: gcc/testsuite/gcc.dg/Warray-bounds-7.c
===================================================================
*** /dev/null 1970-01-01 00:00:00.000000000 +0000
--- gcc/testsuite/gcc.dg/Warray-bounds-7.c 2010-03-08 15:11:08.000000000
+0100
***************
*** 0 ****
--- 1,13 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2 -Warray-bounds" } */
+
+ char *p;
+
+ int main()
+ {
+ p = "";
+ if (p[0] == 0
+ || (p[0] == '_' && p[1] == 0)) /* { dg-bogus "array bounds" "" } */
+ return 0;
+ return 1;
+ }
Index: gcc/Makefile.in
===================================================================
*** gcc/Makefile.in.orig 2010-03-08 15:10:59.000000000 +0100
--- gcc/Makefile.in 2010-03-08 15:11:08.000000000 +0100
*************** GCC_WARN_CXXFLAGS = $(LOOSE_WARN) $($(@D
*** 183,188 ****
--- 183,189 ----
build/gengtype-lex.o-warn = -Wno-error
# mips-tfile.c contains -Wcast-qual warnings.
mips-tfile.o-warn = -Wno-error
+ expmed.o-warn = -Wno-error

# All warnings have to be shut off in stage1 if the compiler used then
# isn't gcc; configure determines that. WARN_CFLAGS will be either

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread