From 7e5ced8dfbdbfbbb647e5253784647c5d97285f7 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 1 Oct 2009 08:07:34 +0000 Subject: [PATCH 01/38] 4.4.1-18 --- .cvsignore | 2 +- gcc.spec | 84 +++++++++++------- gcc44-vta-rh521991.patch | 181 +++++++++++++++++++++++++++++++++++++++ sources | 2 +- 4 files changed, 238 insertions(+), 31 deletions(-) create mode 100644 gcc44-vta-rh521991.patch diff --git a/.cvsignore b/.cvsignore index 20d471f..241fa39 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ fastjar-0.97.tar.gz -gcc-4.4.1-20090925.tar.bz2 +gcc-4.4.1-20091001.tar.bz2 diff --git a/gcc.spec b/gcc.spec index 774a47c..5ad8e5b 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,9 +1,9 @@ -%global DATE 20090925 -%global SVNREV 152158 +%global DATE 20091001 +%global SVNREV 152364 %global gcc_version 4.4.1 # Note, gcc_release must be integer, if you want to add suffixes to # %{release}, append them after %{gcc_release} on Release: line. -%global gcc_release 17 +%global gcc_release 18 %global _unpackaged_files_terminate_build 0 %global multilib_64_archs sparc64 ppc64 s390x x86_64 %global include_gappletviewer 1 @@ -160,6 +160,7 @@ Patch16: gcc44-unwind-debug-hook.patch Patch17: gcc44-pr38757.patch Patch18: gcc44-libstdc++-docs.patch Patch19: gcc44-ppc64-aixdesc.patch +Patch20: gcc44-vta-rh521991.patch Patch1000: fastjar-0.97-segfault.patch @@ -466,6 +467,7 @@ which are required to compile with the GNAT. %patch18 -p0 -b .libstdc++-docs~ %endif %patch19 -p0 -b .ppc64-aixdesc~ +%patch20 -p0 -b .vta-rh521991~ # This testcase doesn't compile. rm libjava/testsuite/libjava.lang/PR35020* @@ -1185,55 +1187,65 @@ rm -rf testlogs-%{_target_platform}-%{version}-%{release} rm -rf %{buildroot} %post -/sbin/install-info \ - --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || : +if [ -f %{_infodir}/gcc.info.gz ]; then + /sbin/install-info \ + --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || : +fi %preun -if [ $1 = 0 ]; then +if [ $1 = 0 -a -f %{_infodir}/gcc.info.gz ]; then /sbin/install-info --delete \ --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || : fi %post -n cpp -/sbin/install-info \ - --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || : +if [ -f %{_infodir}/cpp.info.gz ]; then + /sbin/install-info \ + --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || : +fi %preun -n cpp -if [ $1 = 0 ]; then +if [ $1 = 0 -a -f %{_infodir}/cpp.info.gz ]; then /sbin/install-info --delete \ --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || : fi %post gfortran -/sbin/install-info \ - --info-dir=%{_infodir} %{_infodir}/gfortran.info.gz || : +if [ -f %{_infodir}/gfortran.info.gz ]; then + /sbin/install-info \ + --info-dir=%{_infodir} %{_infodir}/gfortran.info.gz || : +fi %preun gfortran -if [ $1 = 0 ]; then +if [ $1 = 0 -a -f %{_infodir}/gfortran.info.gz ]; then /sbin/install-info --delete \ --info-dir=%{_infodir} %{_infodir}/gfortran.info.gz || : fi %post java +if [ -f %{_infodir}/gcj.info.gz ]; then /sbin/install-info \ --info-dir=%{_infodir} %{_infodir}/gcj.info.gz || : +fi %preun java -if [ $1 = 0 ]; then +if [ $1 = 0 -a -f %{_infodir}/gcj.info.gz ]; then /sbin/install-info --delete \ --info-dir=%{_infodir} %{_infodir}/gcj.info.gz || : fi %post gnat -/sbin/install-info \ - --info-dir=%{_infodir} %{_infodir}/gnat_rm.info.gz || : -/sbin/install-info \ - --info-dir=%{_infodir} %{_infodir}/gnat_ugn.info.gz || : -/sbin/install-info \ - --info-dir=%{_infodir} %{_infodir}/gnat-style.info.gz || : +if [ -f %{_infodir}/gnat_rm.info.gz ]; then + /sbin/install-info \ + --info-dir=%{_infodir} %{_infodir}/gnat_rm.info.gz || : + /sbin/install-info \ + --info-dir=%{_infodir} %{_infodir}/gnat_ugn.info.gz || : + /sbin/install-info \ + --info-dir=%{_infodir} %{_infodir}/gnat-style.info.gz || : +fi %preun gnat -if [ $1 = 0 ]; then +if [ $1 = 0 -a -f %{_infodir}/gnat_rm.info.gz ]; then /sbin/install-info --delete \ --info-dir=%{_infodir} %{_infodir}/gnat_rm.info.gz || : /sbin/install-info --delete \ @@ -1257,13 +1269,15 @@ fi %post -n libgcj /sbin/ldconfig -/sbin/install-info \ - --info-dir=%{_infodir} %{_infodir}/cp-tools.info.gz || : -/sbin/install-info \ - --info-dir=%{_infodir} %{_infodir}/fastjar.info.gz || : +if [ -f %{_infodir}/cp-tools.info.gz ]; then + /sbin/install-info \ + --info-dir=%{_infodir} %{_infodir}/cp-tools.info.gz || : + /sbin/install-info \ + --info-dir=%{_infodir} %{_infodir}/fastjar.info.gz || : +fi %preun -n libgcj -if [ $1 = 0 ]; then +if [ $1 = 0 -a -f %{_infodir}/cp-tools.info.gz ]; then /sbin/install-info --delete \ --info-dir=%{_infodir} %{_infodir}/cp-tools.info.gz || : /sbin/install-info --delete \ @@ -1282,11 +1296,13 @@ fi %post -n libgomp /sbin/ldconfig -/sbin/install-info \ - --info-dir=%{_infodir} %{_infodir}/libgomp.info.gz || : +if [ -f %{_infodir}/libgomp.info.gz ]; then + /sbin/install-info \ + --info-dir=%{_infodir} %{_infodir}/libgomp.info.gz || : +fi %preun -n libgomp -if [ $1 = 0 ]; then +if [ $1 = 0 -a -f %{_infodir}/libgomp.info.gz ]; then /sbin/install-info --delete \ --info-dir=%{_infodir} %{_infodir}/libgomp.info.gz || : fi @@ -1354,7 +1370,7 @@ fi %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/immintrin.h %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/avxintrin.h %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/x86intrin.h -%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/mmintrin-common.h +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/fma4intrin.h %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/mm_malloc.h %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/mm3dnow.h %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/cpuid.h @@ -1821,6 +1837,16 @@ fi %doc rpm.doc/changelogs/libmudflap/ChangeLog* %changelog +* Thu Oct 1 2009 Jakub Jelinek 4.4.1-18 +- update from gcc-4_4-branch + - PRs ada/41100, target/22093 +- VTA backports + - PRs debug/41438, debug/41474, target/41279, testsuite/41444 +- fix VTA ICE on Linux kernel (#521991) +- AMD Orochi -mfma4 support +- don't run install-info if info files are missing because of --excludedocs + (#515921, #515960, #515962, #515965, #516000, #516008, #516014) + * Fri Sep 25 2009 Jakub Jelinek 4.4.1-17 - update from gcc-4_4-branch - fix vectorizer for power7 (#463846) diff --git a/gcc44-vta-rh521991.patch b/gcc44-vta-rh521991.patch new file mode 100644 index 0000000..c126ad1 --- /dev/null +++ b/gcc44-vta-rh521991.patch @@ -0,0 +1,181 @@ +2009-09-30 Alexandre Oliva + + * tree-dfa.c (referenced_var_p): New. + (remove_referenced_var): Clear renaming mark. + * tree-flow.h (referenced_var_p): Declare. + (sym_marked_for_renaming, clear_mark_for_renaming): Declare. + * tree-into-ssa.c (clear_mark_for_renaming): New. + (sym_marked_for_renaming): New. + * tree-ssa-operands.c (pop_stmt_changes): Reset debug stmts + that reference otherwise-unreferenced variables. + + * gcc.dg/debug/vta-1.c: New. + +--- gcc/tree-dfa.c.orig 2009-09-30 04:00:45.000000000 -0300 ++++ gcc/tree-dfa.c 2009-09-30 04:01:21.000000000 -0300 +@@ -639,6 +639,23 @@ set_default_def (tree var, tree def) + SSA_NAME_IS_DEFAULT_DEF (def) = true; + } + ++/* Return TRUE if VAR is in the set of referenced variables. */ ++ ++bool ++referenced_var_p (tree var) ++{ ++ struct tree_decl_minimal in; ++ ++ gcc_assert (DECL_P (var)); ++ ++ if (!gimple_referenced_vars (cfun)) ++ return false; ++ ++ in.uid = DECL_UID (var); ++ return htab_find_with_hash (gimple_referenced_vars (cfun), &in, in.uid) ++ != NULL; ++} ++ + /* Add VAR to the list of referenced variables if it isn't already there. */ + + bool +@@ -686,6 +703,15 @@ remove_referenced_var (tree var) + void **loc; + unsigned int uid = DECL_UID (var); + ++ /* Symbols that decayed from addressable to gimple registers, but ++ that are referenced only in debug stmts, may be marked for ++ renaming, but renaming them would fail once they're no longer ++ referenced. Let them rest in peace. */ ++ if (TREE_CODE (var) != SSA_NAME ++ && is_gimple_reg (var) ++ && sym_marked_for_renaming (var)) ++ clear_mark_for_renaming (var); ++ + clear_call_clobbered (var); + bitmap_clear_bit (gimple_call_used_vars (cfun), uid); + if ((v_ann = var_ann (var))) +--- gcc/tree-flow.h.orig 2009-09-30 04:00:46.000000000 -0300 ++++ gcc/tree-flow.h 2009-09-30 04:01:21.000000000 -0300 +@@ -773,6 +773,7 @@ extern void dump_referenced_vars (FILE * + extern void dump_variable (FILE *, tree); + extern void debug_variable (tree); + extern tree get_virtual_var (tree); ++extern bool referenced_var_p (tree); + extern bool add_referenced_var (tree); + extern void remove_referenced_var (tree); + extern void mark_symbols_for_renaming (gimple); +@@ -889,7 +890,9 @@ bool name_registered_for_update_p (tree) + bitmap ssa_names_to_replace (void); + void release_ssa_name_after_update_ssa (tree); + void compute_global_livein (bitmap, bitmap); ++bool sym_marked_for_renaming (tree); + void mark_sym_for_renaming (tree); ++void clear_mark_for_renaming (tree); + void mark_set_for_renaming (bitmap); + tree get_current_def (tree); + void set_current_def (tree, tree); +--- gcc/tree-into-ssa.c.orig 2009-09-30 04:00:45.000000000 -0300 ++++ gcc/tree-into-ssa.c 2009-09-30 04:01:21.000000000 -0300 +@@ -2874,6 +2874,37 @@ mark_sym_for_renaming (tree sym) + } + } + ++/* Unregister symbol SYM to be renamed by update_ssa. SYM must be a ++ gimple register. */ ++ ++void ++clear_mark_for_renaming (tree sym) ++{ ++ if (need_to_initialize_update_ssa_p) ++ return; ++ ++ gcc_assert (is_gimple_reg (sym)); ++ ++ bitmap_clear_bit (syms_to_rename, DECL_UID (sym)); ++ ++ if (bitmap_empty_p (syms_to_rename)) ++ BITMAP_FREE (syms_to_rename); ++} ++ ++/* Return true if a symbol is marked for renaming. This is an ++ exported interface for symbol_marked_for_renaming. */ ++ ++bool ++sym_marked_for_renaming (tree sym) ++{ ++ if (need_to_initialize_update_ssa_p) ++ return false; ++ ++ if (!syms_to_rename) ++ return false; ++ ++ return symbol_marked_for_renaming (sym); ++} + + /* Register all the symbols in SET to be renamed by update_ssa. */ + +--- gcc/tree-ssa-operands.c.orig 2009-09-30 04:00:45.000000000 -0300 ++++ gcc/tree-ssa-operands.c 2009-09-30 04:01:21.000000000 -0300 +@@ -2716,9 +2716,22 @@ pop_stmt_changes (gimple *stmt_p) + mark_difference_for_renaming (stores, buf->stores); + + /* Mark all the naked GIMPLE register operands for renaming. */ +- FOR_EACH_SSA_TREE_OPERAND (op, stmt, iter, SSA_OP_DEF|SSA_OP_USE) +- if (DECL_P (op)) +- mark_sym_for_renaming (op); ++ if (gimple_debug_bind_p (stmt)) ++ { ++ FOR_EACH_SSA_TREE_OPERAND (op, stmt, iter, SSA_OP_DEF|SSA_OP_USE) ++ if (DECL_P (op) && !referenced_var_p (op)) ++ { ++ gimple_debug_bind_reset_value (stmt); ++ update_stmt (stmt); ++ break; ++ } ++ } ++ else ++ { ++ FOR_EACH_SSA_TREE_OPERAND (op, stmt, iter, SSA_OP_DEF|SSA_OP_USE) ++ if (DECL_P (op)) ++ mark_sym_for_renaming (op); ++ } + + /* FIXME, need to add more finalizers here. Cleanup EH info, + recompute invariants for address expressions, add +--- gcc/testsuite/gcc.dg/debug/vta-1.c 1970-01-01 00:00:00.000000000 +0000 ++++ gcc/testsuite/gcc.dg/debug/vta-1.c 2009-09-30 04:01:21.000000000 -0300 +@@ -0,0 +1,35 @@ ++/* https://bugzilla.redhat.com/show_bug.cgi?id=521991#c5 ++ ++ Distilled from Linux XFS source code. foo, inlined into bar, ends ++ up with debug stmts referencing the addressable variable b. ++ Optimization made it non-addressable, and then completely optimized ++ away, before we got a chance to rename (and discard) the occurrence ++ in the debug stmt. When we did, we crashed, attempting to rename ++ an unreference variable. */ ++ ++/* { dg-do compile } */ ++/* { dg-options "-O2 -g" } */ ++ ++static inline int ++foo (void *x, unsigned y) ++{ ++ unsigned z = *(unsigned long *) x % y; ++ *(unsigned long *) x = *(unsigned long *) x / y; ++ return z; ++} ++ ++struct S ++{ ++ unsigned t; ++}; ++ ++void ++bar (struct S *x, int *y) ++{ ++ int a = 0; ++ unsigned long b = x->t; ++ foo (&b, x->t); ++ for (;; a++) ++ if (b) ++ *y = 1; ++} diff --git a/sources b/sources index 8ee9c77..82ebc5e 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz -fe01be0d467f7de14e7e8e169e52cf72 gcc-4.4.1-20090925.tar.bz2 +18fe22db9e055b13b9cc290f6cbbf1fa gcc-4.4.1-20091001.tar.bz2 From 8f4400202c94cf0727d6ffb9309be5370e1b20e7 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 25 Nov 2009 23:19:20 +0000 Subject: [PATCH 02/38] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 2e2e1b0..a72a0ea 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Makefile for source rpm: gcc -# $Id: Makefile,v 1.1 2004/09/09 04:57:24 cvsdist Exp $ +# $Id: Makefile,v 1.2 2007/10/15 18:46:35 notting Exp $ NAME := gcc SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From 462317c02b501137eee4ec4c31acfcf05f89fd76 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 4 Dec 2009 12:41:27 +0000 Subject: [PATCH 03/38] 4.4.2-13 --- .cvsignore | 2 +- gcc.spec | 195 ++++- gcc44-hack.patch | 6 +- gcc44-raw-string.patch | 1495 -------------------------------------- gcc44-vta-rh521991.patch | 181 ----- import.log | 1 + sources | 2 +- 7 files changed, 186 insertions(+), 1696 deletions(-) delete mode 100644 gcc44-raw-string.patch delete mode 100644 gcc44-vta-rh521991.patch diff --git a/.cvsignore b/.cvsignore index 241fa39..f2dfc1c 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ fastjar-0.97.tar.gz -gcc-4.4.1-20091001.tar.bz2 +gcc-4.4.2-20091204.tar.bz2 diff --git a/gcc.spec b/gcc.spec index 5ad8e5b..d86311c 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,9 +1,9 @@ -%global DATE 20091001 -%global SVNREV 152364 -%global gcc_version 4.4.1 +%global DATE 20091204 +%global SVNREV 154977 +%global gcc_version 4.4.2 # Note, gcc_release must be integer, if you want to add suffixes to # %{release}, append them after %{gcc_release} on Release: line. -%global gcc_release 18 +%global gcc_release 14 %global _unpackaged_files_terminate_build 0 %global multilib_64_archs sparc64 ppc64 s390x x86_64 %global include_gappletviewer 1 @@ -40,7 +40,7 @@ Summary: Various compilers (C, C++, Objective-C, Java, ...) Name: gcc Version: %{gcc_version} -Release: %{gcc_release} +Release: %{gcc_release}%{?dist} # libgcc, libgfortran, libmudflap, libgomp, libstdc++ and crtstuff have # GCC Runtime Exception. License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions @@ -65,7 +65,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # Need binutils which support mffgpr and mftgpr >= 2.17.50.0.2-8 # Need binutils which support --build-id >= 2.17.50.0.17-3 # Need binutils which support %gnu_unique_object >= 2.19.51.0.14 -BuildRequires: binutils >= 2.19.51.0.14 +# Need binutils which support .cfi_sections >= 2.19.51.0.14-33 +BuildRequires: binutils >= 2.19.51.0.14-33 # While gcc doesn't include statically linked binaries, during testing # -static is used several times. BuildRequires: glibc-static @@ -118,8 +119,9 @@ Requires: cpp = %{version}-%{release} # Need binutils that supports --hash-style=gnu # Need binutils that support mffgpr/mftgpr # Need binutils that support --build-id -# Need binutils which support %gnu_unique_object -Requires: binutils >= 2.19.51.0.14 +# Need binutils that support %gnu_unique_object +# Need binutils that support .cfi_sections +Requires: binutils >= 2.19.51.0.14-33 # Make sure gdb will understand DW_FORM_strp Conflicts: gdb < 5.1-2 Requires: glibc-devel >= 2.2.90-12 @@ -155,12 +157,10 @@ Patch11: gcc44-sparc-config-detection.patch Patch12: gcc44-libgomp-omp_h-multilib.patch Patch13: gcc44-libtool-no-rpath.patch Patch14: gcc44-cloog-dl.patch -Patch15: gcc44-raw-string.patch Patch16: gcc44-unwind-debug-hook.patch Patch17: gcc44-pr38757.patch Patch18: gcc44-libstdc++-docs.patch Patch19: gcc44-ppc64-aixdesc.patch -Patch20: gcc44-vta-rh521991.patch Patch1000: fastjar-0.97-segfault.patch @@ -218,7 +218,7 @@ C++ Library. %package -n libstdc++-devel Summary: Header files and libraries for C++ development Group: Development/Libraries -Requires: libstdc++ = %{version}-%{release}, %{_prefix}/%{_lib}/libstdc++.so.6 +Requires: libstdc++%{?_isa} = %{version}-%{release} Autoreq: true %description -n libstdc++-devel @@ -362,8 +362,8 @@ programs compiled using the Java compiler from GNU Compiler Collection (gcj). %package -n libgcj-devel Summary: Libraries for Java development using GCC Group: Development/Languages -Requires: libgcj = %{version}-%{release}, %{_prefix}/%{_lib}/libgcj.so.10 -Requires: zlib-devel, %{_prefix}/%{_lib}/libz.so +Requires: libgcj%{?_isa} = %{version}-%{release} +Requires: zlib-devel%{?_isa} Requires: /bin/awk Autoreq: false Autoprov: false @@ -460,14 +460,12 @@ which are required to compile with the GNAT. %if %{build_cloog} %patch14 -p0 -b .cloog-dl~ %endif -%patch15 -p0 -b .raw-string~ %patch16 -p0 -b .unwind-debug-hook~ %patch17 -p0 -b .pr38757~ %if %{build_libstdcxx_docs} %patch18 -p0 -b .libstdc++-docs~ %endif %patch19 -p0 -b .ppc64-aixdesc~ -%patch20 -p0 -b .vta-rh521991~ # This testcase doesn't compile. rm libjava/testsuite/libjava.lang/PR35020* @@ -480,7 +478,7 @@ tar xzf %{SOURCE4} tar xjf %{SOURCE10} %endif -sed -i -e 's/4\.4\.2/4.4.1/' gcc/BASE-VER +sed -i -e 's/4\.4\.3/4.4.2/' gcc/BASE-VER echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE # Default to -gdwarf-3 rather than -gdwarf-2 @@ -643,6 +641,11 @@ CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="`echo $OPT_FLAGS | sed 's/ -Wall / /g'`" %ifarch sparc sparcv9 --host=%{gcc_target_platform} --build=%{gcc_target_platform} --target=%{gcc_target_platform} --with-cpu=v7 %endif +%if 0%{?rhel} >= 6 +%ifarch ppc ppc64 + --with-cpu-32=power4 --with-tune-32=power6 --with-cpu-64=power4 --with-tune-64=power6 \ +%endif +%endif %ifarch ppc --build=%{gcc_target_platform} --target=%{gcc_target_platform} --with-cpu=default32 %endif @@ -1170,6 +1173,13 @@ chmod 644 %{buildroot}%{_mandir}/man1/unprotoize.1 %check cd obj-%{gcc_target_platform} +%if %{build_java} +export PATH=`pwd`/../fastjar-%{fastjar_ver}/obj-%{gcc_target_platform}${PATH:+:$PATH} +%if !%{bootstrap_java} +export PATH=`pwd`/java_hacks${PATH:+:$PATH} +%endif +%endif + # run the tests. make %{?_smp_mflags} -k check ALT_CC_UNDER_TEST=gcc ALT_CXX_UNDER_TEST=g++ RUNTESTFLAGS="--target_board=unix/'{,-fstack-protector}'" || : echo ====================TESTING========================= @@ -1371,6 +1381,8 @@ fi %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/avxintrin.h %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/x86intrin.h %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/fma4intrin.h +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/xopintrin.h +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/lwpintrin.h %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/mm_malloc.h %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/mm3dnow.h %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/cpuid.h @@ -1837,6 +1849,157 @@ fi %doc rpm.doc/changelogs/libmudflap/ChangeLog* %changelog +* Fri Dec 4 2009 Jakub Jelinek 4.4.2-14 +- update from gcc-4_4-branch + - PRs libstdc++/42261, middle-end/42049 +- backport C++0x ICE fix from trunk (PR c++/42266) +- fortran !$omp workshare improvements (PR fortran/35423) +- FMA4 and XOP fixes + +* Wed Dec 2 2009 Jakub Jelinek 4.4.2-13 +- fix security issues in libltdl bundled within libgcj (CVE-2009-3736) + +* Wed Dec 2 2009 Jakub Jelinek 4.4.2-12 +- update from gcc-4_4-branch + - PRs c++/42234, fortran/41278, fortran/41807, fortran/42162, target/42113, + target/42165 + - don't ICE on -O256 (#539923) +- fix -mregnames on ppc/ppc64 +- optimize even COMDAT constructors and destructors without virtual + bases (PR c++/3187) + +* Mon Nov 23 2009 Jakub Jelinek 4.4.2-11 +- update from gcc-4_4-branch + - PRs c++/42059, c++/42061, libgfortran/42090 +- VTA backports + - PRs debug/41886, debug/41888, debug/41926, tree-optimization/42078 +- optimize non-COMDAT constructors and destructors without virtual + bases by making the base and complete ctor or dtor aliases of + each other (PR c++/3187) + +* Sat Nov 14 2009 Jakub Jelinek 4.4.2-10 +- update from gcc-4_4-branch + - PRs c++/21008, c++/37037, c++/41972, c++/41994, middle-end/40946, + middle-end/42029 +- VTA backports + - PR middle-end/41930 +- optimize deleting destructors for size (PR c++/3187) +- try to avoid file Requires by requiring package%%{?_isa} (#533947) + +* Mon Nov 9 2009 Jakub Jelinek 4.4.2-9 +- update from gcc-4_4-branch + - PRs c++/35067, c++/36912, c++/36959, c++/37093, c++/38699, c++/39786, + c++/41856, c++/41876, c++/41967, c++/9381, fortran/41772, + fortran/41909, middle-end/41963, rtl-optimization/41917, + target/41900, tree-optimization/41643 +- selected backports from trunk + - PRs debug/41801, middle-end/41837, target/41985, tree-optimization/41841 +- initial AMD Orochi -mxop and -mlwp support +- try to avoid wrapping CONST_INTs/VOIDmode CONST_DOUBLEs into CONST + +* Mon Nov 2 2009 Jakub Jelinek 4.4.2-8 +- update from gcc-4_4-branch + - PRs c++/41754, fortran/41777, fortran/41850, libstdc++/40852 +- fix ICE with unmatched #pragma GCC visibility push/pop (PR c++/41774) +- fix VTA ICE with -combine (#531385, PR debug/41893) +- fix RTTI for anon namespace classes +- fix incorrect uses of __restrict keyword in valarray (PR libstdc++/41763) + +* Tue Oct 27 2009 Jakub Jelinek 4.4.2-7 +- update from gcc-4_4-branch + - PRs c++/40808, c/41842, cp-tools/39177 +- VTA backports + - PR bootstrap/41345 +- don't emit DW_AT_name: etc. into debug info + (#530304, PR debug/41828) +- power7 ABI fixes (PR target/41787) +- fix ICE in ix86_pic_register_p (PR target/41762) + +* Thu Oct 22 2009 Jakub Jelinek 4.4.2-6 +- update from gcc-4_4-branch + - PR target/41702 + - fix a pod2man error in gcc.1 (#530102) + - fix mangling of very large names +- document -print-multi-os-directory in gcc.info and gcc.1 + (#529659, PR other/25507) + +* Mon Oct 19 2009 Jakub Jelinek 4.4.2-5 +- update from gcc-4_4-branch + - PR fortran/41755 + - s390 z10 tuning fixes +- provide accurate attributes for powerpc builtins (PR target/23983) +- fix -fcompare-debug differences caused by DCE removal of debug stmts +- fix updating of speculation status with VTA (PR debug/41739) + +* Sun Oct 18 2009 Jakub Jelinek 4.4.2-4 +- update from gcc-4_4-branch + - PRs c++/37204, c++/37766, c++/37875, c++/38798, c++/40092, + libstdc++/40654, libstdc++/40826 +- fix VTA ICE on invalid pointer arithmetics (#529512) + +* Sat Oct 17 2009 Jakub Jelinek 4.4.2-3 +- fix VTA handling in the scheduler (PR debug/41535) +- fix up %%check section to be able to find ecj1 + +* Fri Oct 16 2009 Jakub Jelinek 4.4.2-2 +- update from gcc-4_4-branch + - PR target/40913 +- VTA backports + - PR debug/41717 +- fix Ada .eh_frame generation (PR debug/40521) + +* Thu Oct 15 2009 Jakub Jelinek 4.4.2-1 +- update from gcc-4_4-branch + - GCC 4.4.2 release + - PRs middle-end/22072, target/41665 +- don't emit -Wpadded warnings for builtin structures +- don't generate .eh_frame, but generate .debug_frame when -g and none of + -fasynchronous-unwind-tables/-fexceptions/-funwind-tables is used + (PR debug/40521) + +* Wed Oct 14 2009 Jakub Jelinek 4.4.1-22 +- update from gcc-4_4-branch + - PRs target/26515, target/38948 + - fix s390{,x} BLKmode symbol handling + - fix i?86 testqi splitter (#528206, PR target/41680) +- VTA backports + - introduce debug temps (PRs debug/41264, debug/41338, debug/41343, + debug/41447, target/41693) + - build debug stmts on updates (PR debug/41616) + - fix another with/without -save-temps debug info difference + (#526841, PR preprocessor/41543) + - fix invalid ranges in .debug_loc section (PR debug/41695) +%if 0%{?rhel} >= 6 +- if -mcpu= isn't specified, default to -mcpu=power4 (#463549) +%endif + +* Sat Oct 10 2009 Jakub Jelinek 4.4.1-21 +- update from gcc-4_4-branch + - fix s390{,x} prefetch for pre-z10 CPUs (#524552) +- VTA backports + - fix debug info differences with/without -save-temps + (PR preprocessor/41445) +- fix ICE with small BLKmode returning call (#516028, + PR rtl-optimization/41646) + +* Thu Oct 8 2009 Jakub Jelinek 4.4.1-20 +- update from gcc-4_4-branch + - PRs c++/39863, c++/41038 +- avoid redundant DW_AT_const_value when abstract origin already has one + (#527430) +- another VTA debug stmt renaming bugfix (#521991) + +* Mon Oct 5 2009 Jakub Jelinek 4.4.1-19 +- update from gcc-4_4-branch + - PRs fortran/41479, fortran/41515 +- VTA backports + - PRs debug/41353, debug/41404, rtl-optimization/41511 + - another debug info fix for decls passed by reference (#527057, + PR debug/41558) + - don't emit DW_AT_name on DW_TAG_const_type (#526970) +- avoid invalid folding of casts to addresses of first fields + (#527121, PR middle-end/41317) + * Thu Oct 1 2009 Jakub Jelinek 4.4.1-18 - update from gcc-4_4-branch - PRs ada/41100, target/22093 diff --git a/gcc44-hack.patch b/gcc44-hack.patch index c770339..8719d17 100644 --- a/gcc44-hack.patch +++ b/gcc44-hack.patch @@ -1,6 +1,6 @@ --- libada/Makefile.in.jj 2009-01-14 12:07:35.000000000 +0100 +++ libada/Makefile.in 2009-01-15 14:25:33.000000000 +0100 -@@ -67,17 +67,39 @@ version := $(shell cat $(srcdir)/../gcc/ +@@ -69,18 +69,40 @@ version := $(shell cat $(srcdir)/../gcc/ libsubdir := $(libdir)/gcc/$(target_noncanonical)/$(version)$(MULTISUBDIR) ADA_RTS_DIR=$(GCC_DIR)/ada/rts$(subst /,_,$(MULTISUBDIR)) @@ -38,12 +38,14 @@ "SHELL=$(SHELL)" \ - "GNATLIBFLAGS=$(GNATLIBFLAGS) $(MULTIFLAGS)" \ - "GNATLIBCFLAGS=$(GNATLIBCFLAGS) $(MULTIFLAGS)" \ +- "GNATLIBCFLAGS_FOR_C=$(GNATLIBCFLAGS_FOR_C) $(MULTIFLAGS)" \ + "GNATLIBFLAGS=$(strip $(GNATLIBFLAGS) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS))" \ + "GNATLIBCFLAGS=$(strip $(GNATLIBCFLAGS) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS))" \ ++ "GNATLIBCFLAGS_FOR_C=$(strip $(GNATLIBCFLAGS_FOR_C) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS))" \ "TARGET_LIBGCC2_CFLAGS=$(TARGET_LIBGCC2_CFLAGS)" \ "THREAD_KIND=$(THREAD_KIND)" \ "TRACE=$(TRACE)" \ -@@ -88,7 +110,7 @@ LIBADA_FLAGS_TO_PASS = \ +@@ -91,7 +113,7 @@ LIBADA_FLAGS_TO_PASS = \ "exeext=.exeext.should.not.be.used " \ 'CC=the.host.compiler.should.not.be.needed' \ "GCC_FOR_TARGET=$(CC)" \ diff --git a/gcc44-raw-string.patch b/gcc44-raw-string.patch deleted file mode 100644 index 92a2d57..0000000 --- a/gcc44-raw-string.patch +++ /dev/null @@ -1,1495 +0,0 @@ -2008-09-12 Jakub Jelinek - - * charset.c (cpp_init_iconv): Initialize utf8_cset_desc. - (_cpp_destroy_iconv): Destroy utf8_cset_desc, char16_cset_desc - and char32_cset_desc. - (converter_for_type): Handle CPP_UTF8STRING. - (cpp_interpret_string): Handle CPP_UTF8STRING and raw-strings. - * directives.c (get__Pragma_string): Handle CPP_UTF8STRING. - * include/cpplib.h (CPP_UTF8STRING): New token type. - * internal.h (struct cpp_reader): Add utf8_cset_desc field. - * lex.c (lex_raw_string): New function. - (lex_string): Handle u8 string literals, call lex_raw_string - for raw string literals. - (_cpp_lex_direct): Call lex_string even for u8" and {,u,U,L,u8}R" - sequences. - * macro.c (stringify_arg): Handle CPP_UTF8STRING. - - * c-common.c (c_parse_error): Handle CPP_UTF8STRING. - * c-lex.c (c_lex_with_flags, lex_string): Likewise. - * c-parser.c (c_parser_postfix_expression): Likewise. - - * parser.c (cp_lexer_print_token, cp_parser_is_string_literal, - cp_parser_string_literal, cp_parser_primary_expression): Likewise. - - * gcc.dg/raw-string-1.c: New test. - * gcc.dg/raw-string-2.c: New test. - * gcc.dg/raw-string-3.c: New test. - * gcc.dg/raw-string-4.c: New test. - * gcc.dg/raw-string-5.c: New test. - * gcc.dg/raw-string-6.c: New test. - * gcc.dg/raw-string-7.c: New test. - * gcc.dg/utf8-1.c: New test. - * gcc.dg/utf8-2.c: New test. - * gcc.dg/utf-badconcat2.c: New test. - * gcc.dg/utf-dflt2.c: New test. - * g++.dg/ext/raw-string-1.C: New test. - * g++.dg/ext/raw-string-2.C: New test. - * g++.dg/ext/raw-string-3.C: New test. - * g++.dg/ext/raw-string-4.C: New test. - * g++.dg/ext/raw-string-5.C: New test. - * g++.dg/ext/raw-string-6.C: New test. - * g++.dg/ext/raw-string-7.C: New test. - * g++.dg/ext/utf8-1.C: New test. - * g++.dg/ext/utf8-2.C: New test. - * g++.dg/ext/utf-badconcat2.C: New test. - * g++.dg/ext/utf-dflt2.C: New test. - ---- libcpp/charset.c.jj 2008-09-05 12:59:49.000000000 +0200 -+++ libcpp/charset.c 2008-09-11 22:11:02.000000000 +0200 -@@ -721,6 +721,8 @@ cpp_init_iconv (cpp_reader *pfile) - - pfile->narrow_cset_desc = init_iconv_desc (pfile, ncset, SOURCE_CHARSET); - pfile->narrow_cset_desc.width = CPP_OPTION (pfile, char_precision); -+ pfile->utf8_cset_desc = init_iconv_desc (pfile, "UTF-8", SOURCE_CHARSET); -+ pfile->utf8_cset_desc.width = CPP_OPTION (pfile, char_precision); - pfile->char16_cset_desc = init_iconv_desc (pfile, - be ? "UTF-16BE" : "UTF-16LE", - SOURCE_CHARSET); -@@ -741,6 +743,12 @@ _cpp_destroy_iconv (cpp_reader *pfile) - { - if (pfile->narrow_cset_desc.func == convert_using_iconv) - iconv_close (pfile->narrow_cset_desc.cd); -+ if (pfile->utf8_cset_desc.func == convert_using_iconv) -+ iconv_close (pfile->utf8_cset_desc.cd); -+ if (pfile->char16_cset_desc.func == convert_using_iconv) -+ iconv_close (pfile->char16_cset_desc.cd); -+ if (pfile->char32_cset_desc.func == convert_using_iconv) -+ iconv_close (pfile->char32_cset_desc.cd); - if (pfile->wide_cset_desc.func == convert_using_iconv) - iconv_close (pfile->wide_cset_desc.cd); - } -@@ -1330,6 +1338,8 @@ converter_for_type (cpp_reader *pfile, e - { - default: - return pfile->narrow_cset_desc; -+ case CPP_UTF8STRING: -+ return pfile->utf8_cset_desc; - case CPP_CHAR16: - case CPP_STRING16: - return pfile->char16_cset_desc; -@@ -1364,7 +1374,47 @@ cpp_interpret_string (cpp_reader *pfile, - for (i = 0; i < count; i++) - { - p = from[i].text; -- if (*p == 'L' || *p == 'u' || *p == 'U') p++; -+ if (*p == 'u') -+ { -+ if (*++p == '8') -+ p++; -+ } -+ else if (*p == 'L' || *p == 'U') p++; -+ if (*p == 'R') -+ { -+ const uchar *prefix; -+ -+ /* Skip over 'R"'. */ -+ p += 2; -+ prefix = p; -+ while (*p != '[') -+ p++; -+ p++; -+ limit = from[i].text + from[i].len; -+ if (limit >= p + (p - prefix) + 1) -+ limit -= (p - prefix) + 1; -+ -+ for (;;) -+ { -+ base = p; -+ while (p < limit && (*p != '\\' || (p[1] != 'u' && p[1] != 'U'))) -+ p++; -+ if (p > base) -+ { -+ /* We have a run of normal characters; these can be fed -+ directly to convert_cset. */ -+ if (!APPLY_CONVERSION (cvt, base, p - base, &tbuf)) -+ goto fail; -+ } -+ if (p == limit) -+ break; -+ -+ p = convert_ucn (pfile, p + 1, limit, &tbuf, cvt); -+ } -+ -+ continue; -+ } -+ - p++; /* Skip leading quote. */ - limit = from[i].text + from[i].len - 1; /* Skip trailing quote. */ - ---- libcpp/directives.c.jj 2008-09-05 12:59:49.000000000 +0200 -+++ libcpp/directives.c 2008-09-11 20:27:32.000000000 +0200 -@@ -1519,7 +1519,8 @@ get__Pragma_string (cpp_reader *pfile) - if (string->type == CPP_EOF) - _cpp_backup_tokens (pfile, 1); - if (string->type != CPP_STRING && string->type != CPP_WSTRING -- && string->type != CPP_STRING32 && string->type != CPP_STRING16) -+ && string->type != CPP_STRING32 && string->type != CPP_STRING16 -+ && string->type != CPP_UTF8STRING) - return NULL; - - paren = get_token_no_padding (pfile); ---- libcpp/include/cpplib.h.jj 2008-09-05 12:59:47.000000000 +0200 -+++ libcpp/include/cpplib.h 2008-09-11 20:23:53.000000000 +0200 -@@ -131,6 +131,7 @@ struct _cpp_file; - TK(WSTRING, LITERAL) /* L"string" */ \ - TK(STRING16, LITERAL) /* u"string" */ \ - TK(STRING32, LITERAL) /* U"string" */ \ -+ TK(UTF8STRING, LITERAL) /* u8"string" */ \ - TK(OBJC_STRING, LITERAL) /* @"string" - Objective-C */ \ - TK(HEADER_NAME, LITERAL) /* in #include */ \ - \ -@@ -724,10 +725,10 @@ extern const unsigned char *cpp_macro_de - extern void _cpp_backup_tokens (cpp_reader *, unsigned int); - extern const cpp_token *cpp_peek_token (cpp_reader *, int); - --/* Evaluate a CPP_CHAR or CPP_WCHAR token. */ -+/* Evaluate a CPP_*CHAR* token. */ - extern cppchar_t cpp_interpret_charconst (cpp_reader *, const cpp_token *, - unsigned int *, int *); --/* Evaluate a vector of CPP_STRING or CPP_WSTRING tokens. */ -+/* Evaluate a vector of CPP_*STRING* tokens. */ - extern bool cpp_interpret_string (cpp_reader *, - const cpp_string *, size_t, - cpp_string *, enum cpp_ttype); ---- libcpp/internal.h.jj 2008-09-05 12:59:49.000000000 +0200 -+++ libcpp/internal.h 2008-09-11 18:23:02.000000000 +0200 -@@ -400,6 +400,10 @@ struct cpp_reader - struct cset_converter narrow_cset_desc; - - /* Descriptor for converting from the source character set to the -+ UTF-8 execution character set. */ -+ struct cset_converter utf8_cset_desc; -+ -+ /* Descriptor for converting from the source character set to the - UTF-16 execution character set. */ - struct cset_converter char16_cset_desc; - ---- libcpp/lex.c.jj 2008-09-05 12:59:49.000000000 +0200 -+++ libcpp/lex.c 2008-09-12 13:54:01.000000000 +0200 -@@ -610,12 +610,186 @@ create_literal (cpp_reader *pfile, cpp_t - token->val.str.text = dest; - } - -+/* Lexes raw a string. The stored string contains the spelling, including -+ double quotes, delimiter string, '[' and ']', any leading -+ 'L', 'u', 'U' or 'u8' and 'R' modifier. It returns the type of the -+ literal, or CPP_OTHER if it was not properly terminated. -+ -+ The spelling is NUL-terminated, but it is not guaranteed that this -+ is the first NUL since embedded NULs are preserved. */ -+ -+static void -+lex_raw_string (cpp_reader *pfile, cpp_token *token, const uchar *base, -+ const uchar *cur) -+{ -+ bool saw_NUL = false; -+ const uchar *raw_prefix; -+ unsigned int raw_prefix_len = 0; -+ enum cpp_ttype type; -+ size_t total_len = 0; -+ _cpp_buff *first_buff = NULL, *last_buff = NULL; -+ -+ type = (*base == 'L' ? CPP_WSTRING : -+ *base == 'U' ? CPP_STRING32 : -+ *base == 'u' ? (base[1] == '8' ? CPP_UTF8STRING : CPP_STRING16) -+ : CPP_STRING); -+ -+ raw_prefix = cur + 1; -+ while (raw_prefix_len < 16) -+ { -+ switch (raw_prefix[raw_prefix_len]) -+ { -+ case ' ': case '[': case ']': case '\t': -+ case '\v': case '\f': case '\n': default: -+ break; -+ /* Basic source charset except the above chars. */ -+ case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': -+ case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': -+ case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': -+ case 's': case 't': case 'u': case 'v': case 'w': case 'x': -+ case 'y': case 'z': -+ case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': -+ case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': -+ case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': -+ case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': -+ case 'Y': case 'Z': -+ case '0': case '1': case '2': case '3': case '4': case '5': -+ case '6': case '7': case '8': case '9': -+ case '_': case '{': case '}': case '#': case '(': case ')': -+ case '<': case '>': case '%': case ':': case ';': case '.': -+ case '?': case '*': case '+': case '-': case '/': case '^': -+ case '&': case '|': case '~': case '!': case '=': case ',': -+ case '\\': case '"': case '\'': -+ raw_prefix_len++; -+ continue; -+ } -+ break; -+ } -+ -+ if (raw_prefix[raw_prefix_len] != '[') -+ { -+ if (raw_prefix_len == 16) -+ cpp_error (pfile, CPP_DL_ERROR, -+ "raw string delimiter longer than 16 characters"); -+ else -+ cpp_error (pfile, CPP_DL_ERROR, -+ "invalid character '%c' in raw string delimiter", -+ (int) raw_prefix[raw_prefix_len]); -+ pfile->buffer->cur = raw_prefix - 1; -+ create_literal (pfile, token, base, raw_prefix - 1 - base, CPP_OTHER); -+ return; -+ } -+ -+ cur = raw_prefix + raw_prefix_len + 1; -+ for (;;) -+ { -+ cppchar_t c = *cur++; -+ -+ if (c == ']' -+ && strncmp ((const char *) cur, (const char *) raw_prefix, -+ raw_prefix_len) == 0 -+ && cur[raw_prefix_len] == '"') -+ { -+ cur += raw_prefix_len + 1; -+ break; -+ } -+ else if (c == '\n') -+ { -+ if (pfile->state.in_directive -+ || pfile->state.parsing_args -+ || pfile->state.in_deferred_pragma) -+ { -+ cur--; -+ type = CPP_OTHER; -+ cpp_error (pfile, CPP_DL_ERROR, "unterminated raw string"); -+ break; -+ } -+ -+ /* raw strings allow embedded non-escaped newlines, which -+ complicates this routine a lot. */ -+ if (first_buff == NULL) -+ { -+ total_len = cur - base; -+ first_buff = last_buff = _cpp_get_buff (pfile, total_len); -+ memcpy (BUFF_FRONT (last_buff), base, total_len); -+ raw_prefix = BUFF_FRONT (last_buff) + (raw_prefix - base); -+ BUFF_FRONT (last_buff) += total_len; -+ } -+ else -+ { -+ size_t len = cur - base; -+ size_t cur_len = len > BUFF_ROOM (last_buff) -+ ? BUFF_ROOM (last_buff) : len; -+ -+ total_len += len; -+ memcpy (BUFF_FRONT (last_buff), base, cur_len); -+ BUFF_FRONT (last_buff) += cur_len; -+ if (len > cur_len) -+ { -+ last_buff = _cpp_append_extend_buff (pfile, last_buff, -+ len - cur_len); -+ memcpy (BUFF_FRONT (last_buff), base + cur_len, -+ len - cur_len); -+ BUFF_FRONT (last_buff) += len - cur_len; -+ } -+ } -+ -+ if (pfile->buffer->cur < pfile->buffer->rlimit) -+ CPP_INCREMENT_LINE (pfile, 0); -+ pfile->buffer->need_line = true; -+ -+ if (!_cpp_get_fresh_line (pfile)) -+ { -+ token->type = CPP_EOF; -+ /* Tell the compiler the line number of the EOF token. */ -+ token->src_loc = pfile->line_table->highest_line; -+ token->flags = BOL; -+ if (first_buff != NULL) -+ _cpp_release_buff (pfile, first_buff); -+ cpp_error (pfile, CPP_DL_ERROR, "unterminated raw string"); -+ return; -+ } -+ -+ cur = base = pfile->buffer->cur; -+ } -+ else if (c == '\0') -+ saw_NUL = true; -+ } -+ -+ if (saw_NUL && !pfile->state.skipping) -+ cpp_error (pfile, CPP_DL_WARNING, -+ "null character(s) preserved in literal"); -+ -+ pfile->buffer->cur = cur; -+ if (first_buff == NULL) -+ create_literal (pfile, token, base, cur - base, type); -+ else -+ { -+ uchar *dest = _cpp_unaligned_alloc (pfile, total_len + (cur - base) + 1); -+ -+ token->type = type; -+ token->val.str.len = total_len + (cur - base); -+ token->val.str.text = dest; -+ last_buff = first_buff; -+ while (last_buff != NULL) -+ { -+ memcpy (dest, last_buff->base, -+ BUFF_FRONT (last_buff) - last_buff->base); -+ dest += BUFF_FRONT (last_buff) - last_buff->base; -+ last_buff = last_buff->next; -+ } -+ _cpp_release_buff (pfile, first_buff); -+ memcpy (dest, base, cur - base); -+ dest[cur - base] = '\0'; -+ } -+} -+ - /* Lexes a string, character constant, or angle-bracketed header file - name. The stored string contains the spelling, including opening -- quote and leading any leading 'L', 'u' or 'U'. It returns the type -- of the literal, or CPP_OTHER if it was not properly terminated, or -- CPP_LESS for an unterminated header name which must be relexed as -- normal tokens. -+ quote and any leading 'L', 'u', 'U' or 'u8' and optional -+ 'R' modifier. It returns the type of the literal, or CPP_OTHER -+ if it was not properly terminated, or CPP_LESS for an unterminated -+ header name which must be relexed as normal tokens. - - The spelling is NUL-terminated, but it is not guaranteed that this - is the first NUL since embedded NULs are preserved. */ -@@ -629,12 +803,24 @@ lex_string (cpp_reader *pfile, cpp_token - - cur = base; - terminator = *cur++; -- if (terminator == 'L' || terminator == 'u' || terminator == 'U') -+ if (terminator == 'L' || terminator == 'U') - terminator = *cur++; -- if (terminator == '\"') -+ else if (terminator == 'u') -+ { -+ terminator = *cur++; -+ if (terminator == '8') -+ terminator = *cur++; -+ } -+ if (terminator == 'R') -+ { -+ lex_raw_string (pfile, token, base, cur); -+ return; -+ } -+ if (terminator == '"') - type = (*base == 'L' ? CPP_WSTRING : - *base == 'U' ? CPP_STRING32 : -- *base == 'u' ? CPP_STRING16 : CPP_STRING); -+ *base == 'u' ? (base[1] == '8' ? CPP_UTF8STRING : CPP_STRING16) -+ : CPP_STRING); - else if (terminator == '\'') - type = (*base == 'L' ? CPP_WCHAR : - *base == 'U' ? CPP_CHAR32 : -@@ -1094,10 +1280,20 @@ _cpp_lex_direct (cpp_reader *pfile) - case 'L': - case 'u': - case 'U': -+ case 'R': - /* 'L', 'u' or 'U' may introduce wide characters or strings. */ - if (c == 'L' || CPP_OPTION (pfile, uliterals)) - { -- if (*buffer->cur == '\'' || *buffer->cur == '"') -+ if ((*buffer->cur == '\'' && c != 'R') -+ || *buffer->cur == '"' -+ || (*buffer->cur == 'R' -+ && c != 'R' -+ && buffer->cur[1] == '"' -+ && CPP_OPTION (pfile, uliterals)) -+ || (*buffer->cur == '8' -+ && c == 'u' -+ && (buffer->cur[1] == '"' -+ || (buffer->cur[1] == 'R' && buffer->cur[2] == '"')))) - { - lex_string (pfile, result, buffer->cur - 1); - break; -@@ -1113,7 +1309,7 @@ _cpp_lex_direct (cpp_reader *pfile) - case 'y': case 'z': - case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': - case 'G': case 'H': case 'I': case 'J': case 'K': -- case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': -+ case 'M': case 'N': case 'O': case 'P': case 'Q': - case 'S': case 'T': case 'V': case 'W': case 'X': - case 'Y': case 'Z': - result->type = CPP_NAME; ---- libcpp/macro.c.jj 2008-09-05 12:59:49.000000000 +0200 -+++ libcpp/macro.c 2008-09-11 20:25:20.000000000 +0200 -@@ -377,7 +377,8 @@ stringify_arg (cpp_reader *pfile, macro_ - escape_it = (token->type == CPP_STRING || token->type == CPP_CHAR - || token->type == CPP_WSTRING || token->type == CPP_WCHAR - || token->type == CPP_STRING32 || token->type == CPP_CHAR32 -- || token->type == CPP_STRING16 || token->type == CPP_CHAR16); -+ || token->type == CPP_STRING16 || token->type == CPP_CHAR16 -+ || token->type == CPP_UTF8STRING); - - /* Room for each char being written in octal, initial space and - final quote and NUL. */ ---- gcc/c-common.c.jj 2008-09-09 16:08:04.000000000 +0200 -+++ gcc/c-common.c 2008-09-11 20:30:57.000000000 +0200 -@@ -7472,7 +7472,7 @@ c_parse_error (const char *gmsgid, enum - message = NULL; - } - else if (token == CPP_STRING || token == CPP_WSTRING || token == CPP_STRING16 -- || token == CPP_STRING32) -+ || token == CPP_STRING32 || token == CPP_UTF8STRING) - message = catenate_messages (gmsgid, " before string constant"); - else if (token == CPP_NUMBER) - message = catenate_messages (gmsgid, " before numeric constant"); ---- gcc/c-lex.c.jj 2008-09-05 12:56:31.000000000 +0200 -+++ gcc/c-lex.c 2008-09-11 20:34:06.000000000 +0200 -@@ -365,6 +365,7 @@ c_lex_with_flags (tree *value, location_ - case CPP_WSTRING: - case CPP_STRING16: - case CPP_STRING32: -+ case CPP_UTF8STRING: - type = lex_string (tok, value, true, true); - break; - -@@ -423,6 +424,7 @@ c_lex_with_flags (tree *value, location_ - case CPP_WSTRING: - case CPP_STRING16: - case CPP_STRING32: -+ case CPP_UTF8STRING: - if ((lex_flags & C_LEX_RAW_STRINGS) == 0) - { - type = lex_string (tok, value, false, -@@ -830,12 +832,13 @@ interpret_fixed (const cpp_token *token, - return value; - } - --/* Convert a series of STRING, WSTRING, STRING16 and/or STRING32 tokens -- into a tree, performing string constant concatenation. TOK is the -- first of these. VALP is the location to write the string into. -- OBJC_STRING indicates whether an '@' token preceded the incoming token. -+/* Convert a series of STRING, WSTRING, STRING16, STRING32 and/or -+ UTF8STRING tokens into a tree, performing string constant -+ concatenation. TOK is the first of these. VALP is the location -+ to write the string into. OBJC_STRING indicates whether an '@' token -+ preceded the incoming token. - Returns the CPP token type of the result (CPP_STRING, CPP_WSTRING, -- CPP_STRING32, CPP_STRING16, or CPP_OBJC_STRING). -+ CPP_STRING32, CPP_STRING16, CPP_UTF8STRING, or CPP_OBJC_STRING). - - This is unfortunately more work than it should be. If any of the - strings in the series has an L prefix, the result is a wide string -@@ -880,6 +883,7 @@ lex_string (const cpp_token *tok, tree * - case CPP_WSTRING: - case CPP_STRING16: - case CPP_STRING32: -+ case CPP_UTF8STRING: - if (type != tok->type) - { - if (type == CPP_STRING) -@@ -925,6 +929,7 @@ lex_string (const cpp_token *tok, tree * - { - default: - case CPP_STRING: -+ case CPP_UTF8STRING: - value = build_string (1, ""); - break; - case CPP_STRING16: -@@ -950,6 +955,7 @@ lex_string (const cpp_token *tok, tree * - { - default: - case CPP_STRING: -+ case CPP_UTF8STRING: - TREE_TYPE (value) = char_array_type_node; - break; - case CPP_STRING16: ---- gcc/c-parser.c.jj 2008-09-09 16:08:04.000000000 +0200 -+++ gcc/c-parser.c 2008-09-11 20:34:34.000000000 +0200 -@@ -5085,6 +5085,7 @@ c_parser_postfix_expression (c_parser *p - case CPP_STRING16: - case CPP_STRING32: - case CPP_WSTRING: -+ case CPP_UTF8STRING: - expr.value = c_parser_peek_token (parser)->value; - expr.original_code = STRING_CST; - c_parser_consume_token (parser); ---- gcc/cp/parser.c.jj 2008-09-09 16:08:03.000000000 +0200 -+++ gcc/cp/parser.c 2008-09-11 20:36:10.000000000 +0200 -@@ -797,6 +797,7 @@ cp_lexer_print_token (FILE * stream, cp_ - case CPP_STRING16: - case CPP_STRING32: - case CPP_WSTRING: -+ case CPP_UTF8STRING: - fprintf (stream, " \"%s\"", TREE_STRING_POINTER (token->u.value)); - break; - -@@ -2049,7 +2050,8 @@ cp_parser_is_string_literal (cp_token* t - return (token->type == CPP_STRING || - token->type == CPP_STRING16 || - token->type == CPP_STRING32 || -- token->type == CPP_WSTRING); -+ token->type == CPP_WSTRING || -+ token->type == CPP_UTF8STRING); - } - - /* Returns nonzero if TOKEN is the indicated KEYWORD. */ -@@ -2972,6 +2974,7 @@ cp_parser_string_literal (cp_parser *par - { - default: - case CPP_STRING: -+ case CPP_UTF8STRING: - TREE_TYPE (value) = char_array_type_node; - break; - case CPP_STRING16: -@@ -3195,6 +3198,7 @@ cp_parser_primary_expression (cp_parser - case CPP_STRING16: - case CPP_STRING32: - case CPP_WSTRING: -+ case CPP_UTF8STRING: - /* ??? Should wide strings be allowed when parser->translate_strings_p - is false (i.e. in attributes)? If not, we can kill the third - argument to cp_parser_string_literal. */ ---- gcc/testsuite/gcc.dg/raw-string-1.c.jj 2008-09-12 11:48:36.000000000 +0200 -+++ gcc/testsuite/gcc.dg/raw-string-1.c 2008-09-12 14:01:27.000000000 +0200 -@@ -0,0 +1,101 @@ -+/* { dg-do run } */ -+/* { dg-options "-std=gnu99" } */ -+ -+#include -+ -+typedef __CHAR16_TYPE__ char16_t; -+typedef __CHAR32_TYPE__ char32_t; -+ -+const char s0[] = R"[a\ -+\u010d\U0000010D\\\'\"\?\a\b\f\n\r\t\v\0\00\000\xa\xabb -+c]"; -+const char s1[] = "a\U0000010d\u010d\\\\\\'\\\"\\?\\a\\b\\f\\n\\r\\t\\v\\0\\00\\000\\xa\\xabb\nc"; -+const char s2[] = R"*|*[a\ -+b -+c]" -+c]*|" -+c]*|*"; -+const char s3[] = "ab\nc]\"\nc]*|\"\nc"; -+ -+const char t0[] = u8R"[a\ -+\u010d\U0000010D\\\'\"\?\a\b\f\n\r\t\v\0\00\000\xa\xabb -+c]"; -+const char t1[] = u8"a\U0000010d\u010d\\\\\\'\\\"\\?\\a\\b\\f\\n\\r\\t\\v\\0\\00\\000\\xa\\xabb\nc"; -+const char t2[] = u8R"*|*[a\ -+b -+c]" -+c]*|" -+c]*|*"; -+const char t3[] = u8"ab\nc]\"\nc]*|\"\nc"; -+ -+const char16_t u0[] = uR"[a\ -+\u010d\U0000010D\\\'\"\?\a\b\f\n\r\t\v\0\00\000\xa\xabb -+c]"; -+const char16_t u1[] = u"a\U0000010d\u010d\\\\\\'\\\"\\?\\a\\b\\f\\n\\r\\t\\v\\0\\00\\000\\xa\\xabb\nc"; -+const char16_t u2[] = uR"*|*[a\ -+b -+c]" -+c]*|" -+c]*|*"; -+const char16_t u3[] = u"ab\nc]\"\nc]*|\"\nc"; -+ -+const char32_t U0[] = UR"[a\ -+\u010d\U0000010D\\\'\"\?\a\b\f\n\r\t\v\0\00\000\xa\xabb -+c]"; -+const char32_t U1[] = U"a\U0000010d\u010d\\\\\\'\\\"\\?\\a\\b\\f\\n\\r\\t\\v\\0\\00\\000\\xa\\xabb\nc"; -+const char32_t U2[] = UR"*|*[a\ -+b -+c]" -+c]*|" -+c]*|*"; -+const char32_t U3[] = U"ab\nc]\"\nc]*|\"\nc"; -+ -+const wchar_t L0[] = LR"[a\ -+\u010d\U0000010D\\\'\"\?\a\b\f\n\r\t\v\0\00\000\xa\xabb -+c]"; -+const wchar_t L1[] = L"a\U0000010d\u010d\\\\\\'\\\"\\?\\a\\b\\f\\n\\r\\t\\v\\0\\00\\000\\xa\\xabb\nc"; -+const wchar_t L2[] = LR"*|*[a\ -+b -+c]" -+c]*|" -+c]*|*"; -+const wchar_t L3[] = L"ab\nc]\"\nc]*|\"\nc"; -+ -+int -+main (void) -+{ -+ if (sizeof (s0) != sizeof (s1) -+ || __builtin_memcmp (s0, s1, sizeof (s0)) != 0) -+ __builtin_abort (); -+ if (sizeof (s2) != sizeof (s3) -+ || __builtin_memcmp (s2, s3, sizeof (s2)) != 0) -+ __builtin_abort (); -+ if (sizeof (t0) != sizeof (t1) -+ || __builtin_memcmp (t0, t1, sizeof (t0)) != 0) -+ __builtin_abort (); -+ if (sizeof (t2) != sizeof (t3) -+ || __builtin_memcmp (t2, t3, sizeof (t2)) != 0) -+ __builtin_abort (); -+ if (sizeof (u0) != sizeof (u1) -+ || __builtin_memcmp (u0, u1, sizeof (u0)) != 0) -+ __builtin_abort (); -+ if (sizeof (u2) != sizeof (u3) -+ || __builtin_memcmp (u2, u3, sizeof (u2)) != 0) -+ __builtin_abort (); -+ if (sizeof (U0) != sizeof (U1) -+ || __builtin_memcmp (U0, U1, sizeof (U0)) != 0) -+ __builtin_abort (); -+ if (sizeof (U2) != sizeof (U3) -+ || __builtin_memcmp (U2, U3, sizeof (U2)) != 0) -+ __builtin_abort (); -+ if (sizeof (L0) != sizeof (L1) -+ || __builtin_memcmp (L0, L1, sizeof (L0)) != 0) -+ __builtin_abort (); -+ if (sizeof (L2) != sizeof (L3) -+ || __builtin_memcmp (L2, L3, sizeof (L2)) != 0) -+ __builtin_abort (); -+ if (sizeof (R"*[]*") != 1 -+ || __builtin_memcmp (R"*[]*", "", 1) != 0) -+ __builtin_abort (); -+ return 0; -+} ---- gcc/testsuite/gcc.dg/raw-string-2.c.jj 2008-09-12 12:14:42.000000000 +0200 -+++ gcc/testsuite/gcc.dg/raw-string-2.c 2008-09-12 13:37:10.000000000 +0200 -@@ -0,0 +1,109 @@ -+/* { dg-do run } */ -+/* { dg-options "-std=gnu99" } */ -+ -+#include -+ -+typedef __CHAR16_TYPE__ char16_t; -+typedef __CHAR32_TYPE__ char32_t; -+ -+#define R -+#define u -+#define uR -+#define U -+#define UR -+#define u8 -+#define u8R -+#define L -+#define LR -+ -+const char s00[] = R"[a]" "[b]"; -+const char s01[] = "[a]" R"*[b]*"; -+const char s02[] = R"[a]" R"[b]"; -+const char s03[] = R"-[a]-" u8"[b]"; -+const char s04[] = "[a]" u8R"MNOPQRSTUVWXYZ[b]MNOPQRSTUVWXYZ"; -+const char s05[] = R"[a]" u8R"wxyzABCDEFGHIJKL[b]wxyzABCDEFGHIJKL"; -+const char s06[] = u8R";([a];(" "[b]"; -+const char s07[] = u8"[a]" R"[b]"; -+const char s08[] = u8R"[a]" R"_{}#()<>%:;.?*+-[b]_{}#()<>%:;.?*+-"; -+const char s09[] = u8R"/^&|~!=,"'\[a]/^&|~!=,"'\" u8"[b]"; -+const char s10[] = u8"[a]" u8R"0123456789abcdef[b]0123456789abcdef"; -+const char s11[] = u8R"ghijklmnopqrstuv[a]ghijklmnopqrstuv" u8R"w[b]w"; -+ -+const char16_t u03[] = R"-[a]-" u"[b]"; -+const char16_t u04[] = "[a]" uR"MNOPQRSTUVWXYZ[b]MNOPQRSTUVWXYZ"; -+const char16_t u05[] = R"[a]" uR"wxyzABCDEFGHIJKL[b]wxyzABCDEFGHIJKL"; -+const char16_t u06[] = uR";([a];(" "[b]"; -+const char16_t u07[] = u"[a]" R"[b]"; -+const char16_t u08[] = uR"[a]" R"_{}#()<>%:;.?*+-[b]_{}#()<>%:;.?*+-"; -+const char16_t u09[] = uR"/^&|~!=,"'\[a]/^&|~!=,"'\" u"[b]"; -+const char16_t u10[] = u"[a]" uR"0123456789abcdef[b]0123456789abcdef"; -+const char16_t u11[] = uR"ghijklmnopqrstuv[a]ghijklmnopqrstuv" uR"w[b]w"; -+ -+const char32_t U03[] = R"-[a]-" U"[b]"; -+const char32_t U04[] = "[a]" UR"MNOPQRSTUVWXYZ[b]MNOPQRSTUVWXYZ"; -+const char32_t U05[] = R"[a]" UR"wxyzABCDEFGHIJKL[b]wxyzABCDEFGHIJKL"; -+const char32_t U06[] = UR";([a];(" "[b]"; -+const char32_t U07[] = U"[a]" R"[b]"; -+const char32_t U08[] = UR"[a]" R"_{}#()<>%:;.?*+-[b]_{}#()<>%:;.?*+-"; -+const char32_t U09[] = UR"/^&|~!=,"'\[a]/^&|~!=,"'\" U"[b]"; -+const char32_t U10[] = U"[a]" UR"0123456789abcdef[b]0123456789abcdef"; -+const char32_t U11[] = UR"ghijklmnopqrstuv[a]ghijklmnopqrstuv" UR"w[b]w"; -+ -+const wchar_t L03[] = R"-[a]-" L"[b]"; -+const wchar_t L04[] = "[a]" LR"MNOPQRSTUVWXYZ[b]MNOPQRSTUVWXYZ"; -+const wchar_t L05[] = R"[a]" LR"wxyzABCDEFGHIJKL[b]wxyzABCDEFGHIJKL"; -+const wchar_t L06[] = LR";([a];(" "[b]"; -+const wchar_t L07[] = L"[a]" R"[b]"; -+const wchar_t L08[] = LR"[a]" R"_{}#()<>%:;.?*+-[b]_{}#()<>%:;.?*+-"; -+const wchar_t L09[] = LR"/^&|~!=,"'\[a]/^&|~!=,"'\" L"[b]"; -+const wchar_t L10[] = L"[a]" LR"0123456789abcdef[b]0123456789abcdef"; -+const wchar_t L11[] = LR"ghijklmnopqrstuv[a]ghijklmnopqrstuv" LR"w[b]w"; -+ -+int -+main (void) -+{ -+#define TEST(str, val) \ -+ if (sizeof (str) != sizeof (val) \ -+ || __builtin_memcmp (str, val, sizeof (str)) != 0) \ -+ __builtin_abort () -+ TEST (s00, "a[b]"); -+ TEST (s01, "[a]b"); -+ TEST (s02, "ab"); -+ TEST (s03, "a[b]"); -+ TEST (s04, "[a]b"); -+ TEST (s05, "ab"); -+ TEST (s06, "a[b]"); -+ TEST (s07, "[a]b"); -+ TEST (s08, "ab"); -+ TEST (s09, "a[b]"); -+ TEST (s10, "[a]b"); -+ TEST (s11, "ab"); -+ TEST (u03, u"a[b]"); -+ TEST (u04, u"[a]b"); -+ TEST (u05, u"ab"); -+ TEST (u06, u"a[b]"); -+ TEST (u07, u"[a]b"); -+ TEST (u08, u"ab"); -+ TEST (u09, u"a[b]"); -+ TEST (u10, u"[a]b"); -+ TEST (u11, u"ab"); -+ TEST (U03, U"a[b]"); -+ TEST (U04, U"[a]b"); -+ TEST (U05, U"ab"); -+ TEST (U06, U"a[b]"); -+ TEST (U07, U"[a]b"); -+ TEST (U08, U"ab"); -+ TEST (U09, U"a[b]"); -+ TEST (U10, U"[a]b"); -+ TEST (U11, U"ab"); -+ TEST (L03, L"a[b]"); -+ TEST (L04, L"[a]b"); -+ TEST (L05, L"ab"); -+ TEST (L06, L"a[b]"); -+ TEST (L07, L"[a]b"); -+ TEST (L08, L"ab"); -+ TEST (L09, L"a[b]"); -+ TEST (L10, L"[a]b"); -+ TEST (L11, L"ab"); -+ return 0; -+} ---- gcc/testsuite/gcc.dg/raw-string-3.c.jj 2008-09-12 13:27:09.000000000 +0200 -+++ gcc/testsuite/gcc.dg/raw-string-3.c 2008-09-12 13:42:55.000000000 +0200 -@@ -0,0 +1,53 @@ -+/* If not gnu99, the {,u,u8,U,L}R prefix should be parsed as separate -+ token. */ -+/* { dg-do compile } */ -+/* { dg-options "" } */ -+ -+const void *s0 = R"[a]"; /* { dg-error "undeclared" } */ -+ /* { dg-error "expected ',' or ';'" "" { target *-*-* } 6 } */ -+const void *s1 = uR"[a]"; /* { dg-error "undeclared" } */ -+ /* { dg-error "expected ',' or ';'" "" { target *-*-* } 8 } */ -+const void *s2 = UR"[a]"; /* { dg-error "undeclared" } */ -+ /* { dg-error "expected ',' or ';'" "" { target *-*-* } 10 } */ -+const void *s3 = u8R"[a]"; /* { dg-error "undeclared" } */ -+ /* { dg-error "expected ',' or ';'" "" { target *-*-* } 12 } */ -+const void *s4 = LR"[a]"; /* { dg-error "undeclared" } */ -+ /* { dg-error "expected ',' or ';'" "" { target *-*-* } 14 } */ -+ -+const int i0 = R'a'; /* { dg-error "expected ',' or ';'" } */ -+const int i1 = uR'a'; /* { dg-error "expected ',' or ';'" } */ -+const int i2 = UR'a'; /* { dg-error "expected ',' or ';'" } */ -+const int i3 = u8R'a'; /* { dg-error "expected ',' or ';'" } */ -+const int i4 = LR'a'; /* { dg-error "expected ',' or ';'" } */ -+ -+#define R "a" -+#define uR "b" -+#define UR "c" -+#define u8R "d" -+#define LR "e" -+ -+const void *s5 = R"[a]"; -+const void *s6 = uR"[a]"; -+const void *s7 = UR"[a]"; -+const void *s8 = u8R"[a]"; -+const void *s9 = LR"[a]"; -+ -+#undef R -+#undef uR -+#undef UR -+#undef u8R -+#undef LR -+ -+#define R 1 + -+#define uR 2 + -+#define UR 3 + -+#define u8R 4 + -+#define LR 5 + -+ -+const int i5 = R'a'; -+const int i6 = uR'a'; -+const int i7 = UR'a'; -+const int i8 = u8R'a'; -+const int i9 = LR'a'; -+ -+int main () {} ---- gcc/testsuite/gcc.dg/raw-string-4.c.jj 2008-09-12 13:27:09.000000000 +0200 -+++ gcc/testsuite/gcc.dg/raw-string-4.c 2008-09-12 13:33:43.000000000 +0200 -@@ -0,0 +1,28 @@ -+/* R is not applicable for character literals. */ -+/* { dg-do compile } */ -+/* { dg-options "-std=gnu99" } */ -+ -+const int i0 = R'a'; /* { dg-error "undeclared" } */ -+ /* { dg-error "expected ',' or ';'" "" { target *-*-* } 5 } */ -+const int i1 = uR'a'; /* { dg-error "undeclared" } */ -+ /* { dg-error "expected ',' or ';'" "" { target *-*-* } 7 } */ -+const int i2 = UR'a'; /* { dg-error "undeclared" } */ -+ /* { dg-error "expected ',' or ';'" "" { target *-*-* } 9 } */ -+const int i3 = u8R'a'; /* { dg-error "undeclared" } */ -+ /* { dg-error "expected ',' or ';'" "" { target *-*-* } 11 } */ -+const int i4 = LR'a'; /* { dg-error "undeclared" } */ -+ /* { dg-error "expected ',' or ';'" "" { target *-*-* } 13 } */ -+ -+#define R 1 + -+#define uR 2 + -+#define UR 3 + -+#define u8R 4 + -+#define LR 5 + -+ -+const int i5 = R'a'; -+const int i6 = uR'a'; -+const int i7 = UR'a'; -+const int i8 = u8R'a'; -+const int i9 = LR'a'; -+ -+int main () {} ---- gcc/testsuite/gcc.dg/raw-string-5.c.jj 2008-09-12 13:49:58.000000000 +0200 -+++ gcc/testsuite/gcc.dg/raw-string-5.c 2008-09-12 13:59:14.000000000 +0200 -@@ -0,0 +1,23 @@ -+/* { dg-do compile } */ -+/* { dg-options "-std=gnu99" } */ -+ -+const void *s0 = R"0123456789abcdefg[]0123456789abcdefg"; -+ /* { dg-error "raw string delimiter longer" "" { target *-*-* } 4 } */ -+ /* { dg-error "stray" "" { target *-*-* } 4 } */ -+const void *s1 = R" [] "; -+ /* { dg-error "invalid character" "" { target *-*-* } 7 } */ -+ /* { dg-error "stray" "" { target *-*-* } 7 } */ -+const void *s2 = R" [] "; -+ /* { dg-error "invalid character" "" { target *-*-* } 10 } */ -+ /* { dg-error "stray" "" { target *-*-* } 10 } */ -+const void *s3 = R"][]]"; -+ /* { dg-error "invalid character" "" { target *-*-* } 13 } */ -+ /* { dg-error "stray" "" { target *-*-* } 13 } */ -+const void *s4 = R"@[]@"; -+ /* { dg-error "invalid character" "" { target *-*-* } 16 } */ -+ /* { dg-error "stray" "" { target *-*-* } 16 } */ -+const void *s5 = R"$[]$"; -+ /* { dg-error "invalid character" "" { target *-*-* } 19 } */ -+ /* { dg-error "stray" "" { target *-*-* } 19 } */ -+ -+int main () {} ---- gcc/testsuite/gcc.dg/raw-string-6.c.jj 2008-09-12 13:59:33.000000000 +0200 -+++ gcc/testsuite/gcc.dg/raw-string-6.c 2008-09-12 14:03:46.000000000 +0200 -@@ -0,0 +1,5 @@ -+/* { dg-do compile } */ -+/* { dg-options "-std=gnu99" } */ -+ -+const void *s0 = R"ouch[]ouCh"; /* { dg-error "expected expression at end of input" } */ -+ /* { dg-error "unterminated raw string" "" { target *-*-* } 6 } */ ---- gcc/testsuite/gcc.dg/raw-string-7.c.jj 2008-09-12 14:27:39.000000000 +0200 -+++ gcc/testsuite/gcc.dg/raw-string-7.c 2008-09-12 14:34:17.000000000 +0200 -@@ -0,0 +1,23 @@ -+/* The trailing whitespace after \ and before newline extension -+ breaks full compliance for raw strings. */ -+/* { dg-do run { xfail *-*-* } } */ -+/* { dg-options "-std=gnu99" } */ -+ -+/* Note, there is a single space after \ on the following line. */ -+const void *s0 = R"[\ -+]"; -+/* { dg-bogus "backslash and newline separated by space" "" { xfail *-*-* } 7 } */ -+ -+/* Note, there is a single tab after \ on the following line. */ -+const void *s1 = R"[\ -+]"; -+/* { dg-bogus "backslash and newline separated by space" "" { xfail *-*-* } 12 } */ -+ -+int -+main (void) -+{ -+ if (__builtin_strcmp (s0, "\\ \n") != 0 -+ || __builtin_strcmp (s1, "\\\t\n") != 0) -+ __builtin_abort (); -+ return 0; -+} ---- gcc/testsuite/gcc.dg/utf8-1.c.jj 2008-09-12 10:01:47.000000000 +0200 -+++ gcc/testsuite/gcc.dg/utf8-1.c 2008-09-12 11:45:48.000000000 +0200 -@@ -0,0 +1,45 @@ -+/* { dg-do run } */ -+/* { dg-require-iconv "ISO-8859-2" } */ -+/* { dg-options "-std=gnu99 -fexec-charset=ISO-8859-2" } */ -+ -+const char *str1 = "h\u00e1\U0000010Dky "; -+const char *str2 = "\u010d\u00E1rky\n"; -+const char *str3 = u8"h\u00e1\U0000010Dky "; -+const char *str4 = u8"\u010d\u00E1rky\n"; -+const char *str5 = "h\u00e1\U0000010Dky " "\u010d\u00E1rky\n"; -+const char *str6 = u8"h\u00e1\U0000010Dky " "\u010d\u00E1rky\n"; -+const char *str7 = "h\u00e1\U0000010Dky " u8"\u010d\u00E1rky\n"; -+#define u8 -+const char *str8 = u8"h\u00e1\U0000010Dky " u8"\u010d\u00E1rky\n"; -+ -+const char latin2_1[] = "\x68\xe1\xe8\x6b\x79\x20"; -+const char latin2_2[] = "\xe8\xe1\x72\x6b\x79\n"; -+const char utf8_1[] = "\x68\xc3\xa1\xc4\x8d\x6b\x79\x20"; -+const char utf8_2[] = "\xc4\x8d\xc3\xa1\x72\x6b\x79\n"; -+ -+int -+main (void) -+{ -+ if (__builtin_strcmp (str1, latin2_1) != 0 -+ || __builtin_strcmp (str2, latin2_2) != 0 -+ || __builtin_strcmp (str3, utf8_1) != 0 -+ || __builtin_strcmp (str4, utf8_2) != 0 -+ || __builtin_strncmp (str5, latin2_1, sizeof (latin2_1) - 1) != 0 -+ || __builtin_strcmp (str5 + sizeof (latin2_1) - 1, latin2_2) != 0 -+ || __builtin_strncmp (str6, utf8_1, sizeof (utf8_1) - 1) != 0 -+ || __builtin_strcmp (str6 + sizeof (utf8_1) - 1, utf8_2) != 0 -+ || __builtin_strncmp (str7, utf8_1, sizeof (utf8_1) - 1) != 0 -+ || __builtin_strcmp (str7 + sizeof (utf8_1) - 1, utf8_2) != 0 -+ || __builtin_strncmp (str8, utf8_1, sizeof (utf8_1) - 1) != 0 -+ || __builtin_strcmp (str8 + sizeof (utf8_1) - 1, utf8_2) != 0) -+ __builtin_abort (); -+ if (sizeof ("a" u8"b"[0]) != 1 -+ || sizeof (u8"a" "b"[0]) != 1 -+ || sizeof (u8"a" u8"b"[0]) != 1 -+ || sizeof ("a" "\u010d") != 3 -+ || sizeof ("a" u8"\u010d") != 4 -+ || sizeof (u8"a" "\u010d") != 4 -+ || sizeof (u8"a" "\u010d") != 4) -+ __builtin_abort (); -+ return 0; -+} ---- gcc/testsuite/gcc.dg/utf8-2.c.jj 2008-09-12 11:27:51.000000000 +0200 -+++ gcc/testsuite/gcc.dg/utf8-2.c 2008-09-12 11:36:48.000000000 +0200 -@@ -0,0 +1,26 @@ -+/* { dg-do compile } */ -+/* { dg-options "-std=gnu99" } */ -+ -+#include -+ -+typedef __CHAR16_TYPE__ char16_t; -+typedef __CHAR32_TYPE__ char32_t; -+ -+const char s0[] = u8"ab"; -+const char16_t s1[] = u8"ab"; /* { dg-error "from non-wide" } */ -+const char32_t s2[] = u8"ab"; /* { dg-error "from non-wide" } */ -+const wchar_t s3[] = u8"ab"; /* { dg-error "from non-wide" } */ -+ -+const char t0[0] = u8"ab"; /* { dg-warning "chars is too long" } */ -+const char t1[1] = u8"ab"; /* { dg-warning "chars is too long" } */ -+const char t2[2] = u8"ab"; -+const char t3[3] = u8"ab"; -+const char t4[4] = u8"ab"; -+ -+const char u0[0] = u8"\u2160."; /* { dg-warning "chars is too long" } */ -+const char u1[1] = u8"\u2160."; /* { dg-warning "chars is too long" } */ -+const char u2[2] = u8"\u2160."; /* { dg-warning "chars is too long" } */ -+const char u3[3] = u8"\u2160."; /* { dg-warning "chars is too long" } */ -+const char u4[4] = u8"\u2160."; -+const char u5[5] = u8"\u2160."; -+const char u6[6] = u8"\u2160."; ---- gcc/testsuite/gcc.dg/utf-badconcat2.c.jj 2008-09-12 11:28:26.000000000 +0200 -+++ gcc/testsuite/gcc.dg/utf-badconcat2.c 2008-09-12 11:30:53.000000000 +0200 -@@ -0,0 +1,15 @@ -+/* Test unsupported concatenation of UTF-8 string literals. */ -+/* { dg-do compile } */ -+/* { dg-options "-std=gnu99" } */ -+ -+void *s0 = u8"a" "b"; -+void *s1 = "a" u8"b"; -+void *s2 = u8"a" u8"b"; -+void *s3 = u8"a" u"b"; /* { dg-error "non-standard concatenation" } */ -+void *s4 = u"a" u8"b"; /* { dg-error "non-standard concatenation" } */ -+void *s5 = u8"a" U"b"; /* { dg-error "non-standard concatenation" } */ -+void *s6 = U"a" u8"b"; /* { dg-error "non-standard concatenation" } */ -+void *s7 = u8"a" L"b"; /* { dg-error "non-standard concatenation" } */ -+void *s8 = L"a" u8"b"; /* { dg-error "non-standard concatenation" } */ -+ -+int main () {} ---- gcc/testsuite/gcc.dg/utf-dflt2.c.jj 2008-09-12 11:32:03.000000000 +0200 -+++ gcc/testsuite/gcc.dg/utf-dflt2.c 2008-09-12 13:24:39.000000000 +0200 -@@ -0,0 +1,12 @@ -+/* If not gnu99, the u8 prefix should be parsed as separate tokens. */ -+/* { dg-do compile } */ -+/* { dg-options "" } */ -+ -+const void *s0 = u8"a"; /* { dg-error "undeclared" } */ -+ /* { dg-error "expected ',' or ';'" "" { target *-*-* } 5 } */ -+ -+#define u8 "a" -+ -+const void *s1 = u8"a"; -+ -+int main () {} ---- gcc/testsuite/g++.dg/ext/raw-string-1.C.jj 2008-09-12 11:48:36.000000000 +0200 -+++ gcc/testsuite/g++.dg/ext/raw-string-1.C 2008-09-12 14:18:07.000000000 +0200 -@@ -0,0 +1,96 @@ -+// { dg-do run } -+// { dg-options "-std=c++0x" } -+ -+const char s0[] = R"[a\ -+\u010d\U0000010D\\\'\"\?\a\b\f\n\r\t\v\0\00\000\xa\xabb -+c]"; -+const char s1[] = "a\U0000010d\u010d\\\\\\'\\\"\\?\\a\\b\\f\\n\\r\\t\\v\\0\\00\\000\\xa\\xabb\nc"; -+const char s2[] = R"*|*[a\ -+b -+c]" -+c]*|" -+c]*|*"; -+const char s3[] = "ab\nc]\"\nc]*|\"\nc"; -+ -+const char t0[] = u8R"[a\ -+\u010d\U0000010D\\\'\"\?\a\b\f\n\r\t\v\0\00\000\xa\xabb -+c]"; -+const char t1[] = u8"a\U0000010d\u010d\\\\\\'\\\"\\?\\a\\b\\f\\n\\r\\t\\v\\0\\00\\000\\xa\\xabb\nc"; -+const char t2[] = u8R"*|*[a\ -+b -+c]" -+c]*|" -+c]*|*"; -+const char t3[] = u8"ab\nc]\"\nc]*|\"\nc"; -+ -+const char16_t u0[] = uR"[a\ -+\u010d\U0000010D\\\'\"\?\a\b\f\n\r\t\v\0\00\000\xa\xabb -+c]"; -+const char16_t u1[] = u"a\U0000010d\u010d\\\\\\'\\\"\\?\\a\\b\\f\\n\\r\\t\\v\\0\\00\\000\\xa\\xabb\nc"; -+const char16_t u2[] = uR"*|*[a\ -+b -+c]" -+c]*|" -+c]*|*"; -+const char16_t u3[] = u"ab\nc]\"\nc]*|\"\nc"; -+ -+const char32_t U0[] = UR"[a\ -+\u010d\U0000010D\\\'\"\?\a\b\f\n\r\t\v\0\00\000\xa\xabb -+c]"; -+const char32_t U1[] = U"a\U0000010d\u010d\\\\\\'\\\"\\?\\a\\b\\f\\n\\r\\t\\v\\0\\00\\000\\xa\\xabb\nc"; -+const char32_t U2[] = UR"*|*[a\ -+b -+c]" -+c]*|" -+c]*|*"; -+const char32_t U3[] = U"ab\nc]\"\nc]*|\"\nc"; -+ -+const wchar_t L0[] = LR"[a\ -+\u010d\U0000010D\\\'\"\?\a\b\f\n\r\t\v\0\00\000\xa\xabb -+c]"; -+const wchar_t L1[] = L"a\U0000010d\u010d\\\\\\'\\\"\\?\\a\\b\\f\\n\\r\\t\\v\\0\\00\\000\\xa\\xabb\nc"; -+const wchar_t L2[] = LR"*|*[a\ -+b -+c]" -+c]*|" -+c]*|*"; -+const wchar_t L3[] = L"ab\nc]\"\nc]*|\"\nc"; -+ -+int -+main (void) -+{ -+ if (sizeof (s0) != sizeof (s1) -+ || __builtin_memcmp (s0, s1, sizeof (s0)) != 0) -+ __builtin_abort (); -+ if (sizeof (s2) != sizeof (s3) -+ || __builtin_memcmp (s2, s3, sizeof (s2)) != 0) -+ __builtin_abort (); -+ if (sizeof (t0) != sizeof (t1) -+ || __builtin_memcmp (t0, t1, sizeof (t0)) != 0) -+ __builtin_abort (); -+ if (sizeof (t2) != sizeof (t3) -+ || __builtin_memcmp (t2, t3, sizeof (t2)) != 0) -+ __builtin_abort (); -+ if (sizeof (u0) != sizeof (u1) -+ || __builtin_memcmp (u0, u1, sizeof (u0)) != 0) -+ __builtin_abort (); -+ if (sizeof (u2) != sizeof (u3) -+ || __builtin_memcmp (u2, u3, sizeof (u2)) != 0) -+ __builtin_abort (); -+ if (sizeof (U0) != sizeof (U1) -+ || __builtin_memcmp (U0, U1, sizeof (U0)) != 0) -+ __builtin_abort (); -+ if (sizeof (U2) != sizeof (U3) -+ || __builtin_memcmp (U2, U3, sizeof (U2)) != 0) -+ __builtin_abort (); -+ if (sizeof (L0) != sizeof (L1) -+ || __builtin_memcmp (L0, L1, sizeof (L0)) != 0) -+ __builtin_abort (); -+ if (sizeof (L2) != sizeof (L3) -+ || __builtin_memcmp (L2, L3, sizeof (L2)) != 0) -+ __builtin_abort (); -+ if (sizeof (R"*[]*") != 1 -+ || __builtin_memcmp (R"*[]*", "", 1) != 0) -+ __builtin_abort (); -+ return 0; -+} ---- gcc/testsuite/g++.dg/ext/raw-string-2.C.jj 2008-09-12 12:14:42.000000000 +0200 -+++ gcc/testsuite/g++.dg/ext/raw-string-2.C 2008-09-12 14:18:14.000000000 +0200 -@@ -0,0 +1,104 @@ -+// { dg-do run } -+// { dg-options "-std=c++0x" } -+ -+#define R -+#define u -+#define uR -+#define U -+#define UR -+#define u8 -+#define u8R -+#define L -+#define LR -+ -+const char s00[] = R"[a]" "[b]"; -+const char s01[] = "[a]" R"*[b]*"; -+const char s02[] = R"[a]" R"[b]"; -+const char s03[] = R"-[a]-" u8"[b]"; -+const char s04[] = "[a]" u8R"MNOPQRSTUVWXYZ[b]MNOPQRSTUVWXYZ"; -+const char s05[] = R"[a]" u8R"wxyzABCDEFGHIJKL[b]wxyzABCDEFGHIJKL"; -+const char s06[] = u8R";([a];(" "[b]"; -+const char s07[] = u8"[a]" R"[b]"; -+const char s08[] = u8R"[a]" R"_{}#()<>%:;.?*+-[b]_{}#()<>%:;.?*+-"; -+const char s09[] = u8R"/^&|~!=,"'\[a]/^&|~!=,"'\" u8"[b]"; -+const char s10[] = u8"[a]" u8R"0123456789abcdef[b]0123456789abcdef"; -+const char s11[] = u8R"ghijklmnopqrstuv[a]ghijklmnopqrstuv" u8R"w[b]w"; -+ -+const char16_t u03[] = R"-[a]-" u"[b]"; -+const char16_t u04[] = "[a]" uR"MNOPQRSTUVWXYZ[b]MNOPQRSTUVWXYZ"; -+const char16_t u05[] = R"[a]" uR"wxyzABCDEFGHIJKL[b]wxyzABCDEFGHIJKL"; -+const char16_t u06[] = uR";([a];(" "[b]"; -+const char16_t u07[] = u"[a]" R"[b]"; -+const char16_t u08[] = uR"[a]" R"_{}#()<>%:;.?*+-[b]_{}#()<>%:;.?*+-"; -+const char16_t u09[] = uR"/^&|~!=,"'\[a]/^&|~!=,"'\" u"[b]"; -+const char16_t u10[] = u"[a]" uR"0123456789abcdef[b]0123456789abcdef"; -+const char16_t u11[] = uR"ghijklmnopqrstuv[a]ghijklmnopqrstuv" uR"w[b]w"; -+ -+const char32_t U03[] = R"-[a]-" U"[b]"; -+const char32_t U04[] = "[a]" UR"MNOPQRSTUVWXYZ[b]MNOPQRSTUVWXYZ"; -+const char32_t U05[] = R"[a]" UR"wxyzABCDEFGHIJKL[b]wxyzABCDEFGHIJKL"; -+const char32_t U06[] = UR";([a];(" "[b]"; -+const char32_t U07[] = U"[a]" R"[b]"; -+const char32_t U08[] = UR"[a]" R"_{}#()<>%:;.?*+-[b]_{}#()<>%:;.?*+-"; -+const char32_t U09[] = UR"/^&|~!=,"'\[a]/^&|~!=,"'\" U"[b]"; -+const char32_t U10[] = U"[a]" UR"0123456789abcdef[b]0123456789abcdef"; -+const char32_t U11[] = UR"ghijklmnopqrstuv[a]ghijklmnopqrstuv" UR"w[b]w"; -+ -+const wchar_t L03[] = R"-[a]-" L"[b]"; -+const wchar_t L04[] = "[a]" LR"MNOPQRSTUVWXYZ[b]MNOPQRSTUVWXYZ"; -+const wchar_t L05[] = R"[a]" LR"wxyzABCDEFGHIJKL[b]wxyzABCDEFGHIJKL"; -+const wchar_t L06[] = LR";([a];(" "[b]"; -+const wchar_t L07[] = L"[a]" R"[b]"; -+const wchar_t L08[] = LR"[a]" R"_{}#()<>%:;.?*+-[b]_{}#()<>%:;.?*+-"; -+const wchar_t L09[] = LR"/^&|~!=,"'\[a]/^&|~!=,"'\" L"[b]"; -+const wchar_t L10[] = L"[a]" LR"0123456789abcdef[b]0123456789abcdef"; -+const wchar_t L11[] = LR"ghijklmnopqrstuv[a]ghijklmnopqrstuv" LR"w[b]w"; -+ -+int -+main (void) -+{ -+#define TEST(str, val) \ -+ if (sizeof (str) != sizeof (val) \ -+ || __builtin_memcmp (str, val, sizeof (str)) != 0) \ -+ __builtin_abort () -+ TEST (s00, "a[b]"); -+ TEST (s01, "[a]b"); -+ TEST (s02, "ab"); -+ TEST (s03, "a[b]"); -+ TEST (s04, "[a]b"); -+ TEST (s05, "ab"); -+ TEST (s06, "a[b]"); -+ TEST (s07, "[a]b"); -+ TEST (s08, "ab"); -+ TEST (s09, "a[b]"); -+ TEST (s10, "[a]b"); -+ TEST (s11, "ab"); -+ TEST (u03, u"a[b]"); -+ TEST (u04, u"[a]b"); -+ TEST (u05, u"ab"); -+ TEST (u06, u"a[b]"); -+ TEST (u07, u"[a]b"); -+ TEST (u08, u"ab"); -+ TEST (u09, u"a[b]"); -+ TEST (u10, u"[a]b"); -+ TEST (u11, u"ab"); -+ TEST (U03, U"a[b]"); -+ TEST (U04, U"[a]b"); -+ TEST (U05, U"ab"); -+ TEST (U06, U"a[b]"); -+ TEST (U07, U"[a]b"); -+ TEST (U08, U"ab"); -+ TEST (U09, U"a[b]"); -+ TEST (U10, U"[a]b"); -+ TEST (U11, U"ab"); -+ TEST (L03, L"a[b]"); -+ TEST (L04, L"[a]b"); -+ TEST (L05, L"ab"); -+ TEST (L06, L"a[b]"); -+ TEST (L07, L"[a]b"); -+ TEST (L08, L"ab"); -+ TEST (L09, L"a[b]"); -+ TEST (L10, L"[a]b"); -+ TEST (L11, L"ab"); -+ return 0; -+} ---- gcc/testsuite/g++.dg/ext/raw-string-3.C.jj 2008-09-12 13:27:09.000000000 +0200 -+++ gcc/testsuite/g++.dg/ext/raw-string-3.C 2008-09-12 14:17:57.000000000 +0200 -@@ -0,0 +1,58 @@ -+// If c++98, the {,u,u8,U,L}R prefix should be parsed as separate -+// token. -+// { dg-do compile } -+// { dg-options "-std=c++98" } -+ -+const void *s0 = R"[a]"; // { dg-error "was not declared" } -+ // { dg-error "expected ',' or ';'" "" { target *-*-* } 6 } -+const void *s1 = uR"[a]"; // { dg-error "was not declared" } -+ // { dg-error "expected ',' or ';'" "" { target *-*-* } 8 } -+const void *s2 = UR"[a]"; // { dg-error "was not declared" } -+ // { dg-error "expected ',' or ';'" "" { target *-*-* } 10 } -+const void *s3 = u8R"[a]"; // { dg-error "was not declared" } -+ // { dg-error "expected ',' or ';'" "" { target *-*-* } 12 } -+const void *s4 = LR"[a]"; // { dg-error "was not declared" } -+ // { dg-error "expected ',' or ';'" "" { target *-*-* } 14 } -+ -+const int i0 = R'a'; // { dg-error "was not declared" } -+ // { dg-error "expected ',' or ';'" "" { target *-*-* } 17 } -+const int i1 = uR'a'; // { dg-error "was not declared" } -+ // { dg-error "expected ',' or ';'" "" { target *-*-* } 19 } -+const int i2 = UR'a'; // { dg-error "was not declared" } -+ // { dg-error "expected ',' or ';'" "" { target *-*-* } 21 } -+const int i3 = u8R'a'; // { dg-error "was not declared" } -+ // { dg-error "expected ',' or ';'" "" { target *-*-* } 23 } -+const int i4 = LR'a'; // { dg-error "was not declared" } -+ // { dg-error "expected ',' or ';'" "" { target *-*-* } 25 } -+ -+#define R "a" -+#define uR "b" -+#define UR "c" -+#define u8R "d" -+#define LR "e" -+ -+const void *s5 = R"[a]"; -+const void *s6 = uR"[a]"; -+const void *s7 = UR"[a]"; -+const void *s8 = u8R"[a]"; -+const void *s9 = LR"[a]"; -+ -+#undef R -+#undef uR -+#undef UR -+#undef u8R -+#undef LR -+ -+#define R 1 + -+#define uR 2 + -+#define UR 3 + -+#define u8R 4 + -+#define LR 5 + -+ -+const int i5 = R'a'; -+const int i6 = uR'a'; -+const int i7 = UR'a'; -+const int i8 = u8R'a'; -+const int i9 = LR'a'; -+ -+int main () {} ---- gcc/testsuite/g++.dg/ext/raw-string-4.C.jj 2008-09-12 13:27:09.000000000 +0200 -+++ gcc/testsuite/g++.dg/ext/raw-string-4.C 2008-09-12 14:18:23.000000000 +0200 -@@ -0,0 +1,28 @@ -+// R is not applicable for character literals. -+// { dg-do compile } -+// { dg-options "-std=c++0x" } -+ -+const int i0 = R'a'; // { dg-error "was not declared" } -+ // { dg-error "expected ',' or ';'" "" { target *-*-* } 5 } -+const int i1 = uR'a'; // { dg-error "was not declared" } -+ // { dg-error "expected ',' or ';'" "" { target *-*-* } 7 } -+const int i2 = UR'a'; // { dg-error "was not declared" } -+ // { dg-error "expected ',' or ';'" "" { target *-*-* } 9 } -+const int i3 = u8R'a'; // { dg-error "was not declared" } -+ // { dg-error "expected ',' or ';'" "" { target *-*-* } 11 } -+const int i4 = LR'a'; // { dg-error "was not declared" } -+ // { dg-error "expected ',' or ';'" "" { target *-*-* } 13 } -+ -+#define R 1 + -+#define uR 2 + -+#define UR 3 + -+#define u8R 4 + -+#define LR 5 + -+ -+const int i5 = R'a'; -+const int i6 = uR'a'; -+const int i7 = UR'a'; -+const int i8 = u8R'a'; -+const int i9 = LR'a'; -+ -+int main () {} ---- gcc/testsuite/g++.dg/ext/raw-string-5.C.jj 2008-09-12 13:49:58.000000000 +0200 -+++ gcc/testsuite/g++.dg/ext/raw-string-5.C 2008-09-12 14:18:32.000000000 +0200 -@@ -0,0 +1,23 @@ -+// { dg-do compile } -+// { dg-options "-std=c++0x" } -+ -+const void *s0 = R"0123456789abcdefg[]0123456789abcdefg"; -+ // { dg-error "raw string delimiter longer" "" { target *-*-* } 4 } -+ // { dg-error "stray" "" { target *-*-* } 4 } -+const void *s1 = R" [] "; -+ // { dg-error "invalid character" "" { target *-*-* } 7 } -+ // { dg-error "stray" "" { target *-*-* } 7 } -+const void *s2 = R" [] "; -+ // { dg-error "invalid character" "" { target *-*-* } 10 } -+ // { dg-error "stray" "" { target *-*-* } 10 } -+const void *s3 = R"][]]"; -+ // { dg-error "invalid character" "" { target *-*-* } 13 } -+ // { dg-error "stray" "" { target *-*-* } 13 } -+const void *s4 = R"@[]@"; -+ // { dg-error "invalid character" "" { target *-*-* } 16 } -+ // { dg-error "stray" "" { target *-*-* } 16 } -+const void *s5 = R"$[]$"; -+ // { dg-error "invalid character" "" { target *-*-* } 19 } -+ // { dg-error "stray" "" { target *-*-* } 19 } -+ -+int main () {} ---- gcc/testsuite/g++.dg/ext/raw-string-6.C.jj 2008-09-12 13:59:33.000000000 +0200 -+++ gcc/testsuite/g++.dg/ext/raw-string-6.C 2008-09-12 14:20:21.000000000 +0200 -@@ -0,0 +1,5 @@ -+// { dg-do compile } -+// { dg-options "-std=c++0x" } -+ -+const void *s0 = R"ouch[]ouCh"; // { dg-error "at end of input" } -+ // { dg-error "unterminated raw string" "" { target *-*-* } 6 } ---- gcc/testsuite/g++.dg/ext/raw-string-7.C.jj 2008-09-12 14:34:54.000000000 +0200 -+++ gcc/testsuite/g++.dg/ext/raw-string-7.C 2008-09-12 14:36:40.000000000 +0200 -@@ -0,0 +1,23 @@ -+// The trailing whitespace after \ and before newline extension -+// breaks full compliance for raw strings. -+// { dg-do run { xfail *-*-* } } -+// { dg-options "-std=c++0x" } -+ -+// Note, there is a single space after \ on the following line. -+const char *s0 = R"[\ -+]"; -+// { dg-bogus "backslash and newline separated by space" "" { xfail *-*-* } 7 } -+ -+// Note, there is a single tab after \ on the following line. -+const char *s1 = R"[\ -+]"; -+// { dg-bogus "backslash and newline separated by space" "" { xfail *-*-* } 12 } -+ -+int -+main (void) -+{ -+ if (__builtin_strcmp (s0, "\\ \n") != 0 -+ || __builtin_strcmp (s1, "\\\t\n") != 0) -+ __builtin_abort (); -+ return 0; -+} ---- gcc/testsuite/g++.dg/ext/utf8-1.C.jj 2008-09-12 10:01:47.000000000 +0200 -+++ gcc/testsuite/g++.dg/ext/utf8-1.C 2008-09-12 14:18:53.000000000 +0200 -@@ -0,0 +1,45 @@ -+// { dg-do run } -+// { dg-require-iconv "ISO-8859-2" } -+// { dg-options "-std=c++0x -fexec-charset=ISO-8859-2" } -+ -+const char *str1 = "h\u00e1\U0000010Dky "; -+const char *str2 = "\u010d\u00E1rky\n"; -+const char *str3 = u8"h\u00e1\U0000010Dky "; -+const char *str4 = u8"\u010d\u00E1rky\n"; -+const char *str5 = "h\u00e1\U0000010Dky " "\u010d\u00E1rky\n"; -+const char *str6 = u8"h\u00e1\U0000010Dky " "\u010d\u00E1rky\n"; -+const char *str7 = "h\u00e1\U0000010Dky " u8"\u010d\u00E1rky\n"; -+#define u8 -+const char *str8 = u8"h\u00e1\U0000010Dky " u8"\u010d\u00E1rky\n"; -+ -+const char latin2_1[] = "\x68\xe1\xe8\x6b\x79\x20"; -+const char latin2_2[] = "\xe8\xe1\x72\x6b\x79\n"; -+const char utf8_1[] = "\x68\xc3\xa1\xc4\x8d\x6b\x79\x20"; -+const char utf8_2[] = "\xc4\x8d\xc3\xa1\x72\x6b\x79\n"; -+ -+int -+main (void) -+{ -+ if (__builtin_strcmp (str1, latin2_1) != 0 -+ || __builtin_strcmp (str2, latin2_2) != 0 -+ || __builtin_strcmp (str3, utf8_1) != 0 -+ || __builtin_strcmp (str4, utf8_2) != 0 -+ || __builtin_strncmp (str5, latin2_1, sizeof (latin2_1) - 1) != 0 -+ || __builtin_strcmp (str5 + sizeof (latin2_1) - 1, latin2_2) != 0 -+ || __builtin_strncmp (str6, utf8_1, sizeof (utf8_1) - 1) != 0 -+ || __builtin_strcmp (str6 + sizeof (utf8_1) - 1, utf8_2) != 0 -+ || __builtin_strncmp (str7, utf8_1, sizeof (utf8_1) - 1) != 0 -+ || __builtin_strcmp (str7 + sizeof (utf8_1) - 1, utf8_2) != 0 -+ || __builtin_strncmp (str8, utf8_1, sizeof (utf8_1) - 1) != 0 -+ || __builtin_strcmp (str8 + sizeof (utf8_1) - 1, utf8_2) != 0) -+ __builtin_abort (); -+ if (sizeof ("a" u8"b"[0]) != 1 -+ || sizeof (u8"a" "b"[0]) != 1 -+ || sizeof (u8"a" u8"b"[0]) != 1 -+ || sizeof ("a" "\u010d") != 3 -+ || sizeof ("a" u8"\u010d") != 4 -+ || sizeof (u8"a" "\u010d") != 4 -+ || sizeof (u8"a" "\u010d") != 4) -+ __builtin_abort (); -+ return 0; -+} ---- gcc/testsuite/g++.dg/ext/utf8-2.C.jj 2008-09-12 11:27:51.000000000 +0200 -+++ gcc/testsuite/g++.dg/ext/utf8-2.C 2008-09-12 14:19:01.000000000 +0200 -@@ -0,0 +1,21 @@ -+// { dg-do compile } -+// { dg-options "-std=c++0x" } -+ -+const char s0[] = u8"ab"; -+const char16_t s1[] = u8"ab"; // { dg-error "from non-wide" } -+const char32_t s2[] = u8"ab"; // { dg-error "from non-wide" } -+const wchar_t s3[] = u8"ab"; // { dg-error "from non-wide" } -+ -+const char t0[0] = u8"ab"; // { dg-error "chars is too long" } -+const char t1[1] = u8"ab"; // { dg-error "chars is too long" } -+const char t2[2] = u8"ab"; // { dg-error "chars is too long" } -+const char t3[3] = u8"ab"; -+const char t4[4] = u8"ab"; -+ -+const char u0[0] = u8"\u2160."; // { dg-error "chars is too long" } -+const char u1[1] = u8"\u2160."; // { dg-error "chars is too long" } -+const char u2[2] = u8"\u2160."; // { dg-error "chars is too long" } -+const char u3[3] = u8"\u2160."; // { dg-error "chars is too long" } -+const char u4[4] = u8"\u2160."; // { dg-error "chars is too long" } -+const char u5[5] = u8"\u2160."; -+const char u6[6] = u8"\u2160."; ---- gcc/testsuite/g++.dg/ext/utf-badconcat2.C.jj 2008-09-12 11:28:26.000000000 +0200 -+++ gcc/testsuite/g++.dg/ext/utf-badconcat2.C 2008-09-12 14:19:17.000000000 +0200 -@@ -0,0 +1,15 @@ -+// Test unsupported concatenation of UTF-8 string literals. -+// { dg-do compile } -+// { dg-options "-std=c++0x" } -+ -+const void *s0 = u8"a" "b"; -+const void *s1 = "a" u8"b"; -+const void *s2 = u8"a" u8"b"; -+const void *s3 = u8"a" u"b"; // { dg-error "non-standard concatenation" } -+const void *s4 = u"a" u8"b"; // { dg-error "non-standard concatenation" } -+const void *s5 = u8"a" U"b"; // { dg-error "non-standard concatenation" } -+const void *s6 = U"a" u8"b"; // { dg-error "non-standard concatenation" } -+const void *s7 = u8"a" L"b"; // { dg-error "non-standard concatenation" } -+const void *s8 = L"a" u8"b"; // { dg-error "non-standard concatenation" } -+ -+int main () {} ---- gcc/testsuite/g++.dg/ext/utf-dflt2.C.jj 2008-09-12 11:32:03.000000000 +0200 -+++ gcc/testsuite/g++.dg/ext/utf-dflt2.C 2008-09-12 14:19:28.000000000 +0200 -@@ -0,0 +1,12 @@ -+// In C++0x, the u8 prefix should be parsed as separate tokens. -+// { dg-do compile } -+// { dg-options "-std=c++98" } -+ -+const void *s0 = u8"a"; // { dg-error "was not declared" } -+ // { dg-error "expected ',' or ';'" "" { target *-*-* } 5 } -+ -+#define u8 "a" -+ -+const void *s1 = u8"a"; -+ -+int main () {} diff --git a/gcc44-vta-rh521991.patch b/gcc44-vta-rh521991.patch deleted file mode 100644 index c126ad1..0000000 --- a/gcc44-vta-rh521991.patch +++ /dev/null @@ -1,181 +0,0 @@ -2009-09-30 Alexandre Oliva - - * tree-dfa.c (referenced_var_p): New. - (remove_referenced_var): Clear renaming mark. - * tree-flow.h (referenced_var_p): Declare. - (sym_marked_for_renaming, clear_mark_for_renaming): Declare. - * tree-into-ssa.c (clear_mark_for_renaming): New. - (sym_marked_for_renaming): New. - * tree-ssa-operands.c (pop_stmt_changes): Reset debug stmts - that reference otherwise-unreferenced variables. - - * gcc.dg/debug/vta-1.c: New. - ---- gcc/tree-dfa.c.orig 2009-09-30 04:00:45.000000000 -0300 -+++ gcc/tree-dfa.c 2009-09-30 04:01:21.000000000 -0300 -@@ -639,6 +639,23 @@ set_default_def (tree var, tree def) - SSA_NAME_IS_DEFAULT_DEF (def) = true; - } - -+/* Return TRUE if VAR is in the set of referenced variables. */ -+ -+bool -+referenced_var_p (tree var) -+{ -+ struct tree_decl_minimal in; -+ -+ gcc_assert (DECL_P (var)); -+ -+ if (!gimple_referenced_vars (cfun)) -+ return false; -+ -+ in.uid = DECL_UID (var); -+ return htab_find_with_hash (gimple_referenced_vars (cfun), &in, in.uid) -+ != NULL; -+} -+ - /* Add VAR to the list of referenced variables if it isn't already there. */ - - bool -@@ -686,6 +703,15 @@ remove_referenced_var (tree var) - void **loc; - unsigned int uid = DECL_UID (var); - -+ /* Symbols that decayed from addressable to gimple registers, but -+ that are referenced only in debug stmts, may be marked for -+ renaming, but renaming them would fail once they're no longer -+ referenced. Let them rest in peace. */ -+ if (TREE_CODE (var) != SSA_NAME -+ && is_gimple_reg (var) -+ && sym_marked_for_renaming (var)) -+ clear_mark_for_renaming (var); -+ - clear_call_clobbered (var); - bitmap_clear_bit (gimple_call_used_vars (cfun), uid); - if ((v_ann = var_ann (var))) ---- gcc/tree-flow.h.orig 2009-09-30 04:00:46.000000000 -0300 -+++ gcc/tree-flow.h 2009-09-30 04:01:21.000000000 -0300 -@@ -773,6 +773,7 @@ extern void dump_referenced_vars (FILE * - extern void dump_variable (FILE *, tree); - extern void debug_variable (tree); - extern tree get_virtual_var (tree); -+extern bool referenced_var_p (tree); - extern bool add_referenced_var (tree); - extern void remove_referenced_var (tree); - extern void mark_symbols_for_renaming (gimple); -@@ -889,7 +890,9 @@ bool name_registered_for_update_p (tree) - bitmap ssa_names_to_replace (void); - void release_ssa_name_after_update_ssa (tree); - void compute_global_livein (bitmap, bitmap); -+bool sym_marked_for_renaming (tree); - void mark_sym_for_renaming (tree); -+void clear_mark_for_renaming (tree); - void mark_set_for_renaming (bitmap); - tree get_current_def (tree); - void set_current_def (tree, tree); ---- gcc/tree-into-ssa.c.orig 2009-09-30 04:00:45.000000000 -0300 -+++ gcc/tree-into-ssa.c 2009-09-30 04:01:21.000000000 -0300 -@@ -2874,6 +2874,37 @@ mark_sym_for_renaming (tree sym) - } - } - -+/* Unregister symbol SYM to be renamed by update_ssa. SYM must be a -+ gimple register. */ -+ -+void -+clear_mark_for_renaming (tree sym) -+{ -+ if (need_to_initialize_update_ssa_p) -+ return; -+ -+ gcc_assert (is_gimple_reg (sym)); -+ -+ bitmap_clear_bit (syms_to_rename, DECL_UID (sym)); -+ -+ if (bitmap_empty_p (syms_to_rename)) -+ BITMAP_FREE (syms_to_rename); -+} -+ -+/* Return true if a symbol is marked for renaming. This is an -+ exported interface for symbol_marked_for_renaming. */ -+ -+bool -+sym_marked_for_renaming (tree sym) -+{ -+ if (need_to_initialize_update_ssa_p) -+ return false; -+ -+ if (!syms_to_rename) -+ return false; -+ -+ return symbol_marked_for_renaming (sym); -+} - - /* Register all the symbols in SET to be renamed by update_ssa. */ - ---- gcc/tree-ssa-operands.c.orig 2009-09-30 04:00:45.000000000 -0300 -+++ gcc/tree-ssa-operands.c 2009-09-30 04:01:21.000000000 -0300 -@@ -2716,9 +2716,22 @@ pop_stmt_changes (gimple *stmt_p) - mark_difference_for_renaming (stores, buf->stores); - - /* Mark all the naked GIMPLE register operands for renaming. */ -- FOR_EACH_SSA_TREE_OPERAND (op, stmt, iter, SSA_OP_DEF|SSA_OP_USE) -- if (DECL_P (op)) -- mark_sym_for_renaming (op); -+ if (gimple_debug_bind_p (stmt)) -+ { -+ FOR_EACH_SSA_TREE_OPERAND (op, stmt, iter, SSA_OP_DEF|SSA_OP_USE) -+ if (DECL_P (op) && !referenced_var_p (op)) -+ { -+ gimple_debug_bind_reset_value (stmt); -+ update_stmt (stmt); -+ break; -+ } -+ } -+ else -+ { -+ FOR_EACH_SSA_TREE_OPERAND (op, stmt, iter, SSA_OP_DEF|SSA_OP_USE) -+ if (DECL_P (op)) -+ mark_sym_for_renaming (op); -+ } - - /* FIXME, need to add more finalizers here. Cleanup EH info, - recompute invariants for address expressions, add ---- gcc/testsuite/gcc.dg/debug/vta-1.c 1970-01-01 00:00:00.000000000 +0000 -+++ gcc/testsuite/gcc.dg/debug/vta-1.c 2009-09-30 04:01:21.000000000 -0300 -@@ -0,0 +1,35 @@ -+/* https://bugzilla.redhat.com/show_bug.cgi?id=521991#c5 -+ -+ Distilled from Linux XFS source code. foo, inlined into bar, ends -+ up with debug stmts referencing the addressable variable b. -+ Optimization made it non-addressable, and then completely optimized -+ away, before we got a chance to rename (and discard) the occurrence -+ in the debug stmt. When we did, we crashed, attempting to rename -+ an unreference variable. */ -+ -+/* { dg-do compile } */ -+/* { dg-options "-O2 -g" } */ -+ -+static inline int -+foo (void *x, unsigned y) -+{ -+ unsigned z = *(unsigned long *) x % y; -+ *(unsigned long *) x = *(unsigned long *) x / y; -+ return z; -+} -+ -+struct S -+{ -+ unsigned t; -+}; -+ -+void -+bar (struct S *x, int *y) -+{ -+ int a = 0; -+ unsigned long b = x->t; -+ foo (&b, x->t); -+ for (;; a++) -+ if (b) -+ *y = 1; -+} diff --git a/import.log b/import.log index cd3d10d..356803f 100644 --- a/import.log +++ b/import.log @@ -1,2 +1,3 @@ gcc-4_4_0-0_3:HEAD:gcc-4.4.0-0.3.src.rpm:1232130841 gcc-4_4_0-5:HEAD:gcc-4.4.0-5.src.rpm:1242291126 +gcc-4_4_2-14_fc13:HEAD:gcc-4.4.2-14.fc13.src.rpm:1259930464 diff --git a/sources b/sources index 82ebc5e..63d5e1e 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz -18fe22db9e055b13b9cc290f6cbbf1fa gcc-4.4.1-20091001.tar.bz2 +dcff137d5ba8e70cd5cf8fcd0b34ede6 gcc-4.4.2-20091204.tar.bz2 From 6e98f300dcc809278841e4f90a5305dc9d1c8adf Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 22 Dec 2009 12:22:32 +0000 Subject: [PATCH 04/38] 4.4.2-20.fc13 --- .cvsignore | 2 +- fastjar-0.97-len1.patch | 16 +++++++++++ gcc.spec | 62 ++++++++++++++++++++++++++++++++++++++--- import.log | 1 + sources | 2 +- 5 files changed, 77 insertions(+), 6 deletions(-) create mode 100644 fastjar-0.97-len1.patch diff --git a/.cvsignore b/.cvsignore index f2dfc1c..7174c81 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ fastjar-0.97.tar.gz -gcc-4.4.2-20091204.tar.bz2 +gcc-4.4.2-20091222.tar.bz2 diff --git a/fastjar-0.97-len1.patch b/fastjar-0.97-len1.patch new file mode 100644 index 0000000..722351d --- /dev/null +++ b/fastjar-0.97-len1.patch @@ -0,0 +1,16 @@ +2009-12-21 Chris Ball + + * jartool.c (add_file_to_jar): Test write return value against -1 + instead of 1. + +--- fastjar-0.97/jartool.c.jj 2008-10-15 12:35:37.000000000 -0400 ++++ fastjar-0.97/jartool.c 2009-12-22 06:48:09.309530000 -0500 +@@ -1257,7 +1257,7 @@ int add_file_to_jar(int jfd, int ffd, co + exit_on_error("write"); + + /* write the file name to the zip file */ +- if (1 == write(jfd, fname, file_name_length)) ++ if (-1 == write(jfd, fname, file_name_length)) + exit_on_error("write"); + + if(verbose){ diff --git a/gcc.spec b/gcc.spec index d86311c..15a3347 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,12 +1,16 @@ -%global DATE 20091204 -%global SVNREV 154977 +%global DATE 20091222 +%global SVNREV 155395 %global gcc_version 4.4.2 # Note, gcc_release must be integer, if you want to add suffixes to # %{release}, append them after %{gcc_release} on Release: line. -%global gcc_release 14 +%global gcc_release 20 %global _unpackaged_files_terminate_build 0 %global multilib_64_archs sparc64 ppc64 s390x x86_64 +%if 0%{?fedora} >= 13 +%global include_gappletviewer 0 +%else %global include_gappletviewer 1 +%endif %ifarch %{ix86} x86_64 ia64 ppc ppc64 alpha %global build_ada 1 %else @@ -163,6 +167,7 @@ Patch18: gcc44-libstdc++-docs.patch Patch19: gcc44-ppc64-aixdesc.patch Patch1000: fastjar-0.97-segfault.patch +Patch1001: fastjar-0.97-len1.patch # On ARM EABI systems, we do want -gnueabi to be part of the # target triple. @@ -347,7 +352,9 @@ Requires: libart_lgpl >= 2.1.0 %if %{build_java} BuildRequires: gtk2-devel >= 2.4.0 BuildRequires: glib2-devel >= 2.4.0 +%if %{include_gappletviewer} BuildRequires: xulrunner-devel +%endif BuildRequires: libart_lgpl-devel >= 2.1.0 BuildRequires: alsa-lib-devel BuildRequires: libXtst-devel @@ -473,6 +480,7 @@ rm libjava/testsuite/libjava.lang/PR35020* tar xzf %{SOURCE4} %patch1000 -p0 -b .fastjar-0.97-segfault~ +%patch1001 -p0 -b .fastjar-0.97-len1~ %if %{bootstrap_java} tar xjf %{SOURCE10} @@ -611,7 +619,10 @@ CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="`echo $OPT_FLAGS | sed 's/ -Wall / /g'`" %if !%{build_java} --disable-libgcj \ %else - --enable-java-awt=gtk --disable-dssi --enable-plugin \ + --enable-java-awt=gtk --disable-dssi \ +%if %{include_gappletviewer} + --enable-plugin \ +%endif --with-java-home=%{_prefix}/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre \ --enable-libgcj-multifile \ %if !%{bootstrap_java} @@ -1383,6 +1394,8 @@ fi %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/fma4intrin.h %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/xopintrin.h %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/lwpintrin.h +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/abmintrin.h +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/popcntintrin.h %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/mm_malloc.h %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/mm3dnow.h %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/cpuid.h @@ -1849,6 +1862,47 @@ fi %doc rpm.doc/changelogs/libmudflap/ChangeLog* %changelog +* Tue Dec 22 2009 Jakub Jelinek 4.4.2-20 +- fix MEM_SIZE of reload created stack slots (#548825, + PR rtl-optimization/42429) +%if !%{include_gappletviewer} +- remove gappletviewer, gcjwebplugin and related files for F13 (#548783) +%endif +- fix addition of one character long filenames in fastjar (#549493) + +* Thu Dec 17 2009 Jakub Jelinek 4.4.2-18 +- update from gcc-4_4-branch + - PRs c++/42387 +- another C++ virtual dtors fix (PR c++/42386) +- VTA mode and COND_EXEC fixes (PR debug/41679) +- fix ICE in chrec_convert_1 (#547775) +- fix debuginfo for optimized out TLS vars +- use DW_AT_location with DW_OP_addr + DW_OP_stack_value instead of + DW_AT_const_value with address in it, use DW_OP_addr + DW_OP_stack_value + instead of DW_OP_implicit_value with address (#546017) + +* Mon Dec 14 2009 Jakub Jelinek 4.4.2-17 +- propagate TREE_NOTHROW/TREE_READONLY/DECL_PURE_P from ipa-pure-const and + EH opt to all same body aliases (#547286) +- don't emit DWARF location list entries with no location or DW_AT_location + with empty blocks (PR debug/41473) +- fix up AMD LWP support +- don't crash when mangling C++ decls inside of middle-end generated functions + (PR c++/41183) + +* Fri Dec 11 2009 Jakub Jelinek 4.4.2-16 +- update from gcc-4_4-branch + - PRs c++/27425, c++/34274, c++/42301, fortran/42268, java/41991, + libstdc++/42273, rtl-optimization/41574, target/41196, target/41939 + target/42263 + +* Wed Dec 9 2009 Jakub Jelinek 4.4.2-15 +- VTA backports + - PRs debug/42166, debug/42234, debug/42244, debug/42299 +- fix handling of C++ COMDAT virtual destructors +- some x86/x86_64 FMA4, XOP, ABM and LWP fixes +- fix a decltype handling bug in templates (PR c++/42277) + * Fri Dec 4 2009 Jakub Jelinek 4.4.2-14 - update from gcc-4_4-branch - PRs libstdc++/42261, middle-end/42049 diff --git a/import.log b/import.log index 356803f..782650e 100644 --- a/import.log +++ b/import.log @@ -1,3 +1,4 @@ gcc-4_4_0-0_3:HEAD:gcc-4.4.0-0.3.src.rpm:1232130841 gcc-4_4_0-5:HEAD:gcc-4.4.0-5.src.rpm:1242291126 gcc-4_4_2-14_fc13:HEAD:gcc-4.4.2-14.fc13.src.rpm:1259930464 +gcc-4_4_2-20_fc13:HEAD:gcc-4.4.2-20.fc13.src.rpm:1261484502 diff --git a/sources b/sources index 63d5e1e..1098a1d 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz -dcff137d5ba8e70cd5cf8fcd0b34ede6 gcc-4.4.2-20091204.tar.bz2 +190cf32f4e2f3e5261cda2ba32be0912 gcc-4.4.2-20091222.tar.bz2 From 1fd246efa8a9bc3c3c125ad0a0143fe5132e4e6d Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 14 Jan 2010 16:45:40 +0000 Subject: [PATCH 05/38] 4.4.2-25 --- .cvsignore | 2 +- gcc.spec | 61 ++++++++- gcc44-max-vartrack-size.patch | 230 ++++++++++++++++++++++++++++++++++ gcc44-pr42608.patch | 68 ++++++++++ gcc44-pr42657.patch | 73 +++++++++++ gcc44-pr42674.patch | 49 ++++++++ import.log | 1 + sources | 2 +- 8 files changed, 480 insertions(+), 6 deletions(-) create mode 100644 gcc44-max-vartrack-size.patch create mode 100644 gcc44-pr42608.patch create mode 100644 gcc44-pr42657.patch create mode 100644 gcc44-pr42674.patch diff --git a/.cvsignore b/.cvsignore index 7174c81..bc790a9 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ fastjar-0.97.tar.gz -gcc-4.4.2-20091222.tar.bz2 +gcc-4.4.2-20100114.tar.bz2 diff --git a/gcc.spec b/gcc.spec index 15a3347..854c041 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,9 +1,9 @@ -%global DATE 20091222 -%global SVNREV 155395 +%global DATE 20100114 +%global SVNREV 155909 %global gcc_version 4.4.2 # Note, gcc_release must be integer, if you want to add suffixes to # %{release}, append them after %{gcc_release} on Release: line. -%global gcc_release 20 +%global gcc_release 25 %global _unpackaged_files_terminate_build 0 %global multilib_64_archs sparc64 ppc64 s390x x86_64 %if 0%{?fedora} >= 13 @@ -165,6 +165,10 @@ Patch16: gcc44-unwind-debug-hook.patch Patch17: gcc44-pr38757.patch Patch18: gcc44-libstdc++-docs.patch Patch19: gcc44-ppc64-aixdesc.patch +Patch20: gcc44-max-vartrack-size.patch +Patch21: gcc44-pr42657.patch +Patch22: gcc44-pr42608.patch +Patch23: gcc44-pr42674.patch Patch1000: fastjar-0.97-segfault.patch Patch1001: fastjar-0.97-len1.patch @@ -473,6 +477,10 @@ which are required to compile with the GNAT. %patch18 -p0 -b .libstdc++-docs~ %endif %patch19 -p0 -b .ppc64-aixdesc~ +%patch20 -p0 -b .max-vartrack-size~ +%patch21 -p0 -b .pr42657~ +%patch22 -p0 -b .pr42608~ +%patch23 -p0 -b .pr42674~ # This testcase doesn't compile. rm libjava/testsuite/libjava.lang/PR35020* @@ -1862,6 +1870,51 @@ fi %doc rpm.doc/changelogs/libmudflap/ChangeLog* %changelog +* Thu Jan 14 2010 Jakub Jelinek 4.4.2-25 +- update from gcc-4_4-branch + - PRs c/42721, middle-end/40281, middle-end/42667, rtl-optimization/42699 +- re-add --param max-vartrack-size patch, but this time with default 50mil + instead of 5mil (#531218, #548826) +- don't emit -Wreturn-type warnings in noreturn functions + (PR middle-end/42674) +- march=native fixes for ix86/x86_64 + +* Tue Jan 12 2010 Jakub Jelinek 4.4.2-24 +- update from gcc-4_4-branch + - PRs debug/42662, libjava/40859 +- speed up var-tracking on various KDE sources (PR debug/41371) +- revert --param max-vartrack-size=NNNN hack +- fix up epilogue unwinding with -fsched2-use-superblocks (PR middle-end/41883) +- fix a -fcompare-debug failure (PR tree-optimization/42645) +- don't make undef symbols weak just because they are known to have C++ vague + linkage (PR c++/42608) + +* Sat Jan 9 2010 Jakub Jelinek 4.4.2-23 +- update from gcc-4_4-branch + - PRs target/42511, target/42542, target/42564 +- VTA backports + - PRs debug/42630, debug/42631 +- improve construction of ppc64 constants between 0x80000000 and 0xffffffff +- fix inliner and var-tracking not to drop location info needlessly in certain + cases (#552376, PR debug/42657) + +* Wed Jan 6 2010 Jakub Jelinek 4.4.2-22 +- add --param max-vartrack-size=NNNN parameter, give up on + -fvar-tracking-assignments if var-tracking hash tables are over that limit +- fix VTA bugs in the vectorizer (PRs debug/42604, debug/42395) +- fix VTA bug with noreturn calls (PR middle-end/42363) + +* Tue Jan 5 2010 Jakub Jelinek 4.4.2-21 +- update from gcc-4_4-branch + - PRs c++/42331, middle-end/41344, middle-end/42099, other/42611, + rtl-optimization/42475, target/40134, target/42448, target/42503, + target/42549, tree-optimization/41956, tree-optimization/42231, + tree-optimization/42337, tree-optimization/42614 +- fix -m*=native with several sources on the command line (PR driver/42442) +- avoid code size differences from traversing decl hash tables hashed by uid + if uid gap sizes differ +- fix .debug_ranges with -ffunction-sections (PR debug/42454) + * Tue Dec 22 2009 Jakub Jelinek 4.4.2-20 - fix MEM_SIZE of reload created stack slots (#548825, PR rtl-optimization/42429) @@ -2040,7 +2093,7 @@ fi - update from gcc-4_4-branch - PRs c++/39863, c++/41038 - avoid redundant DW_AT_const_value when abstract origin already has one - (#527430) + (#527430) - another VTA debug stmt renaming bugfix (#521991) * Mon Oct 5 2009 Jakub Jelinek 4.4.1-19 diff --git a/gcc44-max-vartrack-size.patch b/gcc44-max-vartrack-size.patch new file mode 100644 index 0000000..496e346 --- /dev/null +++ b/gcc44-max-vartrack-size.patch @@ -0,0 +1,230 @@ +2010-01-05 Alexandre Oliva + + * params.def (PARAM_MAX_VARTRACK_SIZE): New. + * doc/invoke.texi: Document it. + * var-tracking.c: Include toplev.h and params.h. + (vt_find_locations): Return bool indicating success. Compute + hash sizes unconditionally. Check new parameter, report. + (variable_tracking_main_1): Check vt_find_locations results and + retry. Renamed from... + (variable_tracking_main): ... this. New wrapper to preserve + flag_var_tracking_assignments. + * Makefile.in (var-tracking.o): Adjust dependencies. + +--- gcc/doc/invoke.texi.jj 2009-12-09 00:36:51.000000000 +0100 ++++ gcc/doc/invoke.texi 2010-01-05 10:23:34.000000000 +0100 +@@ -7937,6 +7937,15 @@ with more basic blocks than this paramet + motion optimization performed on them. The default value of the + parameter is 1000 for -O1 and 10000 for -O2 and above. + ++@item max-vartrack-size ++Sets a maximum number of hash table slots to use during variable ++tracking dataflow analysis of any function. If this limit is exceeded ++with variable tracking at assignments enabled, analysis for that ++function is retried without it, after removing all debug insns from ++the function. If the limit is exceeded even without debug insns, var ++tracking analysis is completely disabled for the function. Setting ++the parameter to zero makes it unlimited. ++ + @item min-nondebug-insn-uid + Use uids starting at this parameter for nondebug insns. The range below + the parameter is reserved exclusively for debug insns created by +--- gcc/params.def.jj 2009-09-16 21:35:17.000000000 +0200 ++++ gcc/params.def 2010-01-06 10:18:04.000000000 +0100 +@@ -771,6 +771,13 @@ DEFPARAM (PARAM_LOOP_INVARIANT_MAX_BBS_I + "max basic blocks number in loop for loop invariant motion", + 10000, 0, 0) + ++/* Set maximum hash table size for var tracking. */ ++ ++DEFPARAM (PARAM_MAX_VARTRACK_SIZE, ++ "max-vartrack-size", ++ "Max. size of var tracking hash tables", ++ 50000000, 0, 0) ++ + /* Set minimum insn uid for non-debug insns. */ + + DEFPARAM (PARAM_MIN_NONDEBUG_INSN_UID, +--- gcc/var-tracking.c.jj 2009-12-17 20:42:04.000000000 +0100 ++++ gcc/var-tracking.c 2010-01-06 10:17:28.000000000 +0100 +@@ -108,6 +108,8 @@ + #include "tree-pass.h" + #include "cselib.h" + #include "target.h" ++#include "toplev.h" ++#include "params.h" + + /* Type of micro operation. */ + enum micro_operation_type +@@ -443,7 +445,7 @@ static int add_uses (rtx *, void *); + static void add_uses_1 (rtx *, void *); + static void add_stores (rtx, const_rtx, void *); + static bool compute_bb_dataflow (basic_block); +-static void vt_find_locations (void); ++static bool vt_find_locations (void); + + static void dump_attrs_list (attrs); + static int dump_variable_slot (void **, void *); +@@ -5454,7 +5456,7 @@ compute_bb_dataflow (basic_block bb) + + /* Find the locations of variables in the whole function. */ + +-static void ++static bool + vt_find_locations (void) + { + fibheap_t worklist, pending, fibheap_swap; +@@ -5465,6 +5467,8 @@ vt_find_locations (void) + int *rc_order; + int i; + int htabsz = 0; ++ int htabmax = PARAM_VALUE (PARAM_MAX_VARTRACK_SIZE); ++ bool success = true; + + /* Compute reverse completion order of depth first search of the CFG + so that the data-flow runs faster. */ +@@ -5486,7 +5490,7 @@ vt_find_locations (void) + fibheap_insert (pending, bb_order[bb->index], bb); + sbitmap_ones (in_pending); + +- while (!fibheap_empty (pending)) ++ while (success && !fibheap_empty (pending)) + { + fibheap_swap = pending; + pending = worklist; +@@ -5509,11 +5513,11 @@ vt_find_locations (void) + + SET_BIT (visited, bb->index); + +- if (dump_file && VTI (bb)->in.vars) ++ if (VTI (bb)->in.vars) + { + htabsz +- -= htab_size (shared_hash_htab (VTI (bb)->in.vars)) +- + htab_size (shared_hash_htab (VTI (bb)->out.vars)); ++ -= (htab_size (shared_hash_htab (VTI (bb)->in.vars)) ++ + htab_size (shared_hash_htab (VTI (bb)->out.vars))); + oldinsz + = htab_elements (shared_hash_htab (VTI (bb)->in.vars)); + oldoutsz +@@ -5577,9 +5581,20 @@ vt_find_locations (void) + } + + changed = compute_bb_dataflow (bb); +- if (dump_file) +- htabsz += htab_size (shared_hash_htab (VTI (bb)->in.vars)) +- + htab_size (shared_hash_htab (VTI (bb)->out.vars)); ++ htabsz += (htab_size (shared_hash_htab (VTI (bb)->in.vars)) ++ + htab_size (shared_hash_htab (VTI (bb)->out.vars))); ++ ++ if (htabmax && htabsz > htabmax) ++ { ++ if (MAY_HAVE_DEBUG_INSNS) ++ inform (DECL_SOURCE_LOCATION (cfun->decl), ++ "variable tracking size limit exceeded with debug insns, retrying without"); ++ else ++ inform (DECL_SOURCE_LOCATION (cfun->decl), ++ "variable tracking size limit exceeded"); ++ success = false; ++ break; ++ } + + if (changed) + { +@@ -5630,7 +5645,7 @@ vt_find_locations (void) + } + } + +- if (MAY_HAVE_DEBUG_INSNS) ++ if (success && MAY_HAVE_DEBUG_INSNS) + FOR_EACH_BB (bb) + gcc_assert (VTI (bb)->flooded); + +@@ -5640,6 +5655,8 @@ vt_find_locations (void) + sbitmap_free (visited); + sbitmap_free (in_worklist); + sbitmap_free (in_pending); ++ ++ return success; + } + + /* Print the content of the LIST to dump file. */ +@@ -7542,9 +7558,11 @@ vt_finalize (void) + + /* The entry point to variable tracking pass. */ + +-unsigned int +-variable_tracking_main (void) ++static inline unsigned int ++variable_tracking_main_1 (void) + { ++ bool success; ++ + if (flag_var_tracking_assignments < 0) + { + delete_debug_insns (); +@@ -7569,7 +7587,31 @@ variable_tracking_main (void) + } + } + +- vt_find_locations (); ++ success = vt_find_locations (); ++ ++ if (!success && flag_var_tracking_assignments > 0) ++ { ++ vt_finalize (); ++ ++ delete_debug_insns (); ++ ++ /* This is later restored by our caller. */ ++ flag_var_tracking_assignments = 0; ++ ++ vt_initialize (); ++ ++ if (!frame_pointer_needed && !vt_stack_adjustments ()) ++ gcc_unreachable (); ++ ++ success = vt_find_locations (); ++ } ++ ++ if (!success) ++ { ++ vt_finalize (); ++ vt_debug_insns_local (false); ++ return 0; ++ } + + if (dump_file && (dump_flags & TDF_DETAILS)) + { +@@ -7583,6 +7625,19 @@ variable_tracking_main (void) + vt_debug_insns_local (false); + return 0; + } ++ ++unsigned int ++variable_tracking_main (void) ++{ ++ unsigned int ret; ++ int save = flag_var_tracking_assignments; ++ ++ ret = variable_tracking_main_1 (); ++ ++ flag_var_tracking_assignments = save; ++ ++ return ret; ++} + + static bool + gate_handle_var_tracking (void) +--- gcc/Makefile.in.jj 2010-01-04 10:07:40.000000000 +0100 ++++ gcc/Makefile.in 2010-01-05 10:24:39.000000000 +0100 +@@ -2750,7 +2750,8 @@ regstat.o : regstat.c $(CONFIG_H) $(SYST + var-tracking.o : var-tracking.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ + $(RTL_H) $(TREE_H) hard-reg-set.h insn-config.h reload.h $(FLAGS_H) \ + $(BASIC_BLOCK_H) output.h sbitmap.h alloc-pool.h $(FIBHEAP_H) $(HASHTAB_H) \ +- $(REGS_H) $(EXPR_H) $(TIMEVAR_H) tree-pass.h cselib.h $(TARGET_H) ++ $(REGS_H) $(EXPR_H) $(TIMEVAR_H) tree-pass.h cselib.h $(TARGET_H) \ ++ $(TOPLEV_H) $(PARAMS_H) + profile.o : profile.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ + $(TREE_H) $(FLAGS_H) output.h $(REGS_H) $(EXPR_H) $(FUNCTION_H) \ + $(TOPLEV_H) $(COVERAGE_H) $(TREE_FLOW_H) value-prof.h cfghooks.h \ diff --git a/gcc44-pr42608.patch b/gcc44-pr42608.patch new file mode 100644 index 0000000..6002f21 --- /dev/null +++ b/gcc44-pr42608.patch @@ -0,0 +1,68 @@ +2010-01-09 Jakub Jelinek + + PR c++/42608 + * varasm.c (declare_weak): Add weak attribute to decl if it + doesn't have one already. + (assemble_external): Only add decls to weak_decls if they also + have weak attribute. + + * g++.dg/template/instantiate11.C: New test. + +--- gcc/varasm.c.jj 2009-11-09 16:38:29.000000000 +0100 ++++ gcc/varasm.c 2010-01-08 13:30:12.000000000 +0100 +@@ -2309,13 +2309,15 @@ assemble_external (tree decl ATTRIBUTE_U + /* We want to output annotation for weak and external symbols at + very last to check if they are references or not. */ + +- if (SUPPORTS_WEAK && DECL_WEAK (decl) ++ if (SUPPORTS_WEAK ++ && DECL_WEAK (decl) + /* TREE_STATIC is a weird and abused creature which is not + generally the right test for whether an entity has been + locally emitted, inlined or otherwise not-really-extern, but + for declarations that can be weak, it happens to be + match. */ +- && !TREE_STATIC (decl)) ++ && !TREE_STATIC (decl) ++ && lookup_attribute ("weak", DECL_ATTRIBUTES (decl))) + weak_decls = tree_cons (NULL, decl, weak_decls); + + #ifdef ASM_OUTPUT_EXTERNAL +@@ -5008,6 +5010,9 @@ declare_weak (tree decl) + warning (0, "weak declaration of %q+D not supported", decl); + + mark_weak (decl); ++ if (!lookup_attribute ("weak", DECL_ATTRIBUTES (decl))) ++ DECL_ATTRIBUTES (decl) ++ = tree_cons (get_identifier ("weak"), NULL, DECL_ATTRIBUTES (decl)); + } + + static void +--- gcc/testsuite/g++.dg/template/instantiate11.C.jj 2010-01-08 13:48:58.000000000 +0100 ++++ gcc/testsuite/g++.dg/template/instantiate11.C 2010-01-08 14:18:44.000000000 +0100 +@@ -0,0 +1,25 @@ ++// PR c++/42608 ++// { dg-do compile } ++ ++template ++struct A; ++ ++template ++struct A ++{ ++ void f (); ++}; ++ ++template struct A; ++ ++int ++main () ++{ ++ A a; ++ a.f (); ++ return 0; ++} ++ ++// Make sure we get undefined reference error if ++// A::f () isn't instantiated elsewhere. ++// { dg-final { scan-assembler-not "weak\[\n\t\]*_ZN1AIiiE1fEv" } } diff --git a/gcc44-pr42657.patch b/gcc44-pr42657.patch new file mode 100644 index 0000000..af7f4a9 --- /dev/null +++ b/gcc44-pr42657.patch @@ -0,0 +1,73 @@ +2010-01-09 Alexandre Oliva + + PR debug/42657 + * var-tracking.c (var_reg_delete): Don't delete the association + between REGs and values or one-part variables if the register + isn't clobbered. + +2010-01-08 Jakub Jelinek + + PR debug/42657 + * tree-inline.c (copy_debug_stmt): Don't reset debug stmt just + because its first operand is a non-localized variable. + +--- gcc/tree-inline.c.jj 2010-01-08 10:21:30.000000000 +0100 ++++ gcc/tree-inline.c 2010-01-08 10:19:49.000000000 +0100 +@@ -2043,6 +2043,12 @@ copy_debug_stmt (gimple stmt, copy_body_ + gcc_assert (TREE_CODE (*n) == VAR_DECL); + t = *n; + } ++ else if (TREE_CODE (t) == VAR_DECL ++ && !TREE_STATIC (t) ++ && gimple_in_ssa_p (cfun) ++ && !pointer_map_contains (id->decl_map, t) ++ && !var_ann (t)) ++ /* T is a non-localized variable. */; + else + walk_tree (&t, remap_gimple_op_r, &wi, NULL); + +--- gcc/var-tracking.c.orig 2010-01-09 07:00:12.000000000 -0200 ++++ gcc/var-tracking.c 2010-01-09 07:00:14.000000000 -0200 +@@ -1401,14 +1401,15 @@ var_reg_delete_and_set (dataflow_set *se + var_reg_set (set, loc, initialized, set_src); + } + +-/* Delete current content of register LOC in dataflow set SET. If +- CLOBBER is true, also delete any other live copies of the same +- variable part. */ ++/* Delete the association of register LOC in dataflow set SET with any ++ variables that aren't onepart. If CLOBBER is true, also delete any ++ other live copies of the same variable part, and delete the ++ association with onepart dvs too. */ + + static void + var_reg_delete (dataflow_set *set, rtx loc, bool clobber) + { +- attrs *reg = &set->regs[REGNO (loc)]; ++ attrs *nextp = &set->regs[REGNO (loc)]; + attrs node, next; + + if (clobber) +@@ -1421,13 +1422,18 @@ var_reg_delete (dataflow_set *set, rtx l + clobber_variable_part (set, NULL, dv_from_decl (decl), offset, NULL); + } + +- for (node = *reg; node; node = next) ++ for (node = *nextp; node; node = next) + { + next = node->next; +- delete_variable_part (set, node->loc, node->dv, node->offset); +- pool_free (attrs_pool, node); ++ if (clobber || !dv_onepart_p (node->dv)) ++ { ++ delete_variable_part (set, node->loc, node->dv, node->offset); ++ pool_free (attrs_pool, node); ++ *nextp = next; ++ } ++ else ++ nextp = &node->next; + } +- *reg = NULL; + } + + /* Delete content of register with number REGNO in dataflow set SET. */ diff --git a/gcc44-pr42674.patch b/gcc44-pr42674.patch new file mode 100644 index 0000000..4319834 --- /dev/null +++ b/gcc44-pr42674.patch @@ -0,0 +1,49 @@ +2010-01-13 Jakub Jelinek + + PR middle-end/42674 + * c-decl.c (finish_function): Don't emit -Wreturn-type warnings in + functions with noreturn attribute. + + * decl.c (finish_function): Don't emit -Wreturn-type warnings in + functions with noreturn attribute. + + * c-c++-common/pr42674.c: New test. + +--- gcc/c-decl.c.jj 2010-01-04 10:46:33.000000000 +0100 ++++ gcc/c-decl.c 2010-01-13 18:41:44.000000000 +0100 +@@ -8032,6 +8032,8 @@ finish_function (void) + && !current_function_returns_value && !current_function_returns_null + /* Don't complain if we are no-return. */ + && !current_function_returns_abnormally ++ /* Don't complain if we are declared noreturn. */ ++ && !TREE_THIS_VOLATILE (fndecl) + /* Don't warn for main(). */ + && !MAIN_NAME_P (DECL_NAME (fndecl)) + /* Or if they didn't actually specify a return type. */ +--- gcc/cp/decl.c.jj 2009-12-23 17:31:06.000000000 +0100 ++++ gcc/cp/decl.c 2010-01-13 18:43:01.000000000 +0100 +@@ -12541,6 +12541,8 @@ finish_function (int flags) + && !current_function_returns_value && !current_function_returns_null + /* Don't complain if we abort or throw. */ + && !current_function_returns_abnormally ++ /* Don't complain if we are declared noreturn. */ ++ && !TREE_THIS_VOLATILE (fndecl) + && !DECL_NAME (DECL_RESULT (fndecl)) + && !TREE_NO_WARNING (fndecl) + /* Structor return values (if any) are set by the compiler. */ +--- gcc/testsuite/c-c++-common/pr42674.c.jj 2010-01-13 18:57:20.000000000 +0100 ++++ gcc/testsuite/c-c++-common/pr42674.c 2010-01-13 18:57:58.000000000 +0100 +@@ -0,0 +1,13 @@ ++/* PR middle-end/42674 */ ++/* { dg-do compile } */ ++/* { dg-options "-Wreturn-type" } */ ++ ++extern void bar (void); ++static int foo (void) __attribute__ ((__noreturn__, __used__)); ++ ++static int ++foo (void) ++{ ++ while (1) ++ bar (); ++} diff --git a/import.log b/import.log index 782650e..68225f6 100644 --- a/import.log +++ b/import.log @@ -2,3 +2,4 @@ gcc-4_4_0-0_3:HEAD:gcc-4.4.0-0.3.src.rpm:1232130841 gcc-4_4_0-5:HEAD:gcc-4.4.0-5.src.rpm:1242291126 gcc-4_4_2-14_fc13:HEAD:gcc-4.4.2-14.fc13.src.rpm:1259930464 gcc-4_4_2-20_fc13:HEAD:gcc-4.4.2-20.fc13.src.rpm:1261484502 +gcc-4_4_2-25_fc13:HEAD:gcc-4.4.2-25.fc13.src.rpm:1263487371 diff --git a/sources b/sources index 1098a1d..f8ddaaa 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz -190cf32f4e2f3e5261cda2ba32be0912 gcc-4.4.2-20091222.tar.bz2 +43b87119460d344d8052a51eb87cd05e gcc-4.4.2-20100114.tar.bz2 From 108494b92dc60fa9d1b33556b9efa956bc33fa2d Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 21 Jan 2010 17:25:47 +0000 Subject: [PATCH 06/38] 4.4.3-1 --- .cvsignore | 2 +- gcc.spec | 44 +++++++++++++----- gcc44-max-vartrack-size.patch | 57 ++++++++++++----------- gcc44-pr42608.patch | 68 ---------------------------- gcc44-pr42657.patch | 73 ------------------------------ gcc44-pr42674.patch | 49 -------------------- gcc44-vta-non-call-exception.patch | 38 ++++++++++++++++ import.log | 1 + sources | 2 +- 9 files changed, 102 insertions(+), 232 deletions(-) delete mode 100644 gcc44-pr42608.patch delete mode 100644 gcc44-pr42657.patch delete mode 100644 gcc44-pr42674.patch create mode 100644 gcc44-vta-non-call-exception.patch diff --git a/.cvsignore b/.cvsignore index bc790a9..b0e15f9 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ fastjar-0.97.tar.gz -gcc-4.4.2-20100114.tar.bz2 +gcc-4.4.3-20100121.tar.bz2 diff --git a/gcc.spec b/gcc.spec index 854c041..2719dc0 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,9 +1,9 @@ -%global DATE 20100114 -%global SVNREV 155909 -%global gcc_version 4.4.2 +%global DATE 20100121 +%global SVNREV 156157 +%global gcc_version 4.4.3 # Note, gcc_release must be integer, if you want to add suffixes to # %{release}, append them after %{gcc_release} on Release: line. -%global gcc_release 25 +%global gcc_release 1 %global _unpackaged_files_terminate_build 0 %global multilib_64_archs sparc64 ppc64 s390x x86_64 %if 0%{?fedora} >= 13 @@ -166,9 +166,7 @@ Patch17: gcc44-pr38757.patch Patch18: gcc44-libstdc++-docs.patch Patch19: gcc44-ppc64-aixdesc.patch Patch20: gcc44-max-vartrack-size.patch -Patch21: gcc44-pr42657.patch -Patch22: gcc44-pr42608.patch -Patch23: gcc44-pr42674.patch +Patch21: gcc44-vta-non-call-exception.patch Patch1000: fastjar-0.97-segfault.patch Patch1001: fastjar-0.97-len1.patch @@ -478,9 +476,7 @@ which are required to compile with the GNAT. %endif %patch19 -p0 -b .ppc64-aixdesc~ %patch20 -p0 -b .max-vartrack-size~ -%patch21 -p0 -b .pr42657~ -%patch22 -p0 -b .pr42608~ -%patch23 -p0 -b .pr42674~ +%patch21 -p0 -b .vta-non-call-exception~ # This testcase doesn't compile. rm libjava/testsuite/libjava.lang/PR35020* @@ -494,7 +490,7 @@ tar xzf %{SOURCE4} tar xjf %{SOURCE10} %endif -sed -i -e 's/4\.4\.3/4.4.2/' gcc/BASE-VER +sed -i -e 's/4\.4\.4/4.4.3/' gcc/BASE-VER echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE # Default to -gdwarf-3 rather than -gdwarf-2 @@ -1870,6 +1866,32 @@ fi %doc rpm.doc/changelogs/libmudflap/ChangeLog* %changelog +* Thu Jan 21 2010 Jakub Jelinek 4.4.3-1 +- update from gcc-4_4-branch + - GCC 4.4.3 release +- don't insert DEBUG_STMTs after stmts that can throw, instead insert them + at the start of the next bb + +* Thu Jan 21 2010 Jakub Jelinek 4.4.2-28 +- update from gcc-4_4-branch + - PRs middle-end/42803, rtl-optimization/42691, target/42542, target/42774, + tree-optimization/41826, tree-optimization/42773 + - fix DW_OP_mod handling in the unwinder +- VTA backports + - PRs debug/42782, debug/42767 + - avoid dead VALUES to magically reappear during var-tracking + (#557068, PR debug/42715) + - don't assume non-addressable automatic MEMs die at each call + during var-tracking (#556975, PR debug/42728) + +* Fri Jan 15 2010 Jakub Jelinek 4.4.2-27 +- fix ICE with std::complex copy (#555705, PR middle-end/42760) +- avoid exponential hangs in gen_lsm_tmp_name + +* Fri Jan 15 2010 Jakub Jelinek 4.4.2-26 +- update from gcc-4_4-branch + - PR c++/42655 + * Thu Jan 14 2010 Jakub Jelinek 4.4.2-25 - update from gcc-4_4-branch - PRs c/42721, middle-end/40281, middle-end/42667, rtl-optimization/42699 diff --git a/gcc44-max-vartrack-size.patch b/gcc44-max-vartrack-size.patch index 496e346..70bcd75 100644 --- a/gcc44-max-vartrack-size.patch +++ b/gcc44-max-vartrack-size.patch @@ -11,8 +11,8 @@ flag_var_tracking_assignments. * Makefile.in (var-tracking.o): Adjust dependencies. ---- gcc/doc/invoke.texi.jj 2009-12-09 00:36:51.000000000 +0100 -+++ gcc/doc/invoke.texi 2010-01-05 10:23:34.000000000 +0100 +--- gcc/doc/invoke.texi.jj 2010-01-09 20:39:58.000000000 +0100 ++++ gcc/doc/invoke.texi 2010-01-21 10:00:15.979730377 +0100 @@ -7937,6 +7937,15 @@ with more basic blocks than this paramet motion optimization performed on them. The default value of the parameter is 1000 for -O1 and 10000 for -O2 and above. @@ -29,8 +29,8 @@ @item min-nondebug-insn-uid Use uids starting at this parameter for nondebug insns. The range below the parameter is reserved exclusively for debug insns created by ---- gcc/params.def.jj 2009-09-16 21:35:17.000000000 +0200 -+++ gcc/params.def 2010-01-06 10:18:04.000000000 +0100 +--- gcc/params.def.jj 2010-01-09 20:39:58.000000000 +0100 ++++ gcc/params.def 2010-01-21 10:00:15.980730943 +0100 @@ -771,6 +771,13 @@ DEFPARAM (PARAM_LOOP_INVARIANT_MAX_BBS_I "max basic blocks number in loop for loop invariant motion", 10000, 0, 0) @@ -45,18 +45,18 @@ /* Set minimum insn uid for non-debug insns. */ DEFPARAM (PARAM_MIN_NONDEBUG_INSN_UID, ---- gcc/var-tracking.c.jj 2009-12-17 20:42:04.000000000 +0100 -+++ gcc/var-tracking.c 2010-01-06 10:17:28.000000000 +0100 -@@ -108,6 +108,8 @@ - #include "tree-pass.h" +--- gcc/var-tracking.c.jj 2010-01-21 09:10:37.000000000 +0100 ++++ gcc/var-tracking.c 2010-01-21 10:00:15.983740989 +0100 +@@ -109,6 +109,8 @@ + #include "tree-flow.h" #include "cselib.h" #include "target.h" +#include "toplev.h" +#include "params.h" - /* Type of micro operation. */ - enum micro_operation_type -@@ -443,7 +445,7 @@ static int add_uses (rtx *, void *); + /* var-tracking.c assumes that tree code with the same value as VALUE rtx code + has no chance to appear in REG_EXPR/MEM_EXPRs and isn't a decl. +@@ -451,7 +453,7 @@ static int add_uses (rtx *, void *); static void add_uses_1 (rtx *, void *); static void add_stores (rtx, const_rtx, void *); static bool compute_bb_dataflow (basic_block); @@ -64,8 +64,8 @@ +static bool vt_find_locations (void); static void dump_attrs_list (attrs); - static int dump_variable_slot (void **, void *); -@@ -5454,7 +5456,7 @@ compute_bb_dataflow (basic_block bb) + static int dump_var_slot (void **, void *); +@@ -5511,7 +5513,7 @@ compute_bb_dataflow (basic_block bb) /* Find the locations of variables in the whole function. */ @@ -74,7 +74,7 @@ vt_find_locations (void) { fibheap_t worklist, pending, fibheap_swap; -@@ -5465,6 +5467,8 @@ vt_find_locations (void) +@@ -5522,6 +5524,8 @@ vt_find_locations (void) int *rc_order; int i; int htabsz = 0; @@ -83,7 +83,7 @@ /* Compute reverse completion order of depth first search of the CFG so that the data-flow runs faster. */ -@@ -5486,7 +5490,7 @@ vt_find_locations (void) +@@ -5543,7 +5547,7 @@ vt_find_locations (void) fibheap_insert (pending, bb_order[bb->index], bb); sbitmap_ones (in_pending); @@ -92,7 +92,7 @@ { fibheap_swap = pending; pending = worklist; -@@ -5509,11 +5513,11 @@ vt_find_locations (void) +@@ -5566,11 +5570,11 @@ vt_find_locations (void) SET_BIT (visited, bb->index); @@ -107,7 +107,7 @@ oldinsz = htab_elements (shared_hash_htab (VTI (bb)->in.vars)); oldoutsz -@@ -5577,9 +5581,20 @@ vt_find_locations (void) +@@ -5634,9 +5638,20 @@ vt_find_locations (void) } changed = compute_bb_dataflow (bb); @@ -131,7 +131,7 @@ if (changed) { -@@ -5630,7 +5645,7 @@ vt_find_locations (void) +@@ -5687,7 +5702,7 @@ vt_find_locations (void) } } @@ -140,7 +140,7 @@ FOR_EACH_BB (bb) gcc_assert (VTI (bb)->flooded); -@@ -5640,6 +5655,8 @@ vt_find_locations (void) +@@ -5698,6 +5713,8 @@ vt_find_locations (void) sbitmap_free (visited); sbitmap_free (in_worklist); sbitmap_free (in_pending); @@ -149,7 +149,7 @@ } /* Print the content of the LIST to dump file. */ -@@ -7542,9 +7558,11 @@ vt_finalize (void) +@@ -7600,9 +7617,11 @@ vt_finalize (void) /* The entry point to variable tracking pass. */ @@ -163,7 +163,7 @@ if (flag_var_tracking_assignments < 0) { delete_debug_insns (); -@@ -7569,7 +7587,31 @@ variable_tracking_main (void) +@@ -7627,7 +7646,31 @@ variable_tracking_main (void) } } @@ -196,7 +196,7 @@ if (dump_file && (dump_flags & TDF_DETAILS)) { -@@ -7583,6 +7625,19 @@ variable_tracking_main (void) +@@ -7641,6 +7684,19 @@ variable_tracking_main (void) vt_debug_insns_local (false); return 0; } @@ -216,15 +216,14 @@ static bool gate_handle_var_tracking (void) ---- gcc/Makefile.in.jj 2010-01-04 10:07:40.000000000 +0100 -+++ gcc/Makefile.in 2010-01-05 10:24:39.000000000 +0100 -@@ -2750,7 +2750,8 @@ regstat.o : regstat.c $(CONFIG_H) $(SYST - var-tracking.o : var-tracking.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ +--- gcc/Makefile.in.jj 2010-01-21 08:58:12.000000000 +0100 ++++ gcc/Makefile.in 2010-01-21 10:00:45.555730868 +0100 +@@ -2751,7 +2751,7 @@ var-tracking.o : var-tracking.c $(CONFIG $(RTL_H) $(TREE_H) hard-reg-set.h insn-config.h reload.h $(FLAGS_H) \ $(BASIC_BLOCK_H) output.h sbitmap.h alloc-pool.h $(FIBHEAP_H) $(HASHTAB_H) \ -- $(REGS_H) $(EXPR_H) $(TIMEVAR_H) tree-pass.h cselib.h $(TARGET_H) -+ $(REGS_H) $(EXPR_H) $(TIMEVAR_H) tree-pass.h cselib.h $(TARGET_H) \ -+ $(TOPLEV_H) $(PARAMS_H) + $(REGS_H) $(EXPR_H) $(TIMEVAR_H) tree-pass.h cselib.h $(TARGET_H) \ +- $(TREE_FLOW_H) ++ $(TREE_FLOW_H) $(TOPLEV_H) $(PARAMS_H) profile.o : profile.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(TREE_H) $(FLAGS_H) output.h $(REGS_H) $(EXPR_H) $(FUNCTION_H) \ $(TOPLEV_H) $(COVERAGE_H) $(TREE_FLOW_H) value-prof.h cfghooks.h \ diff --git a/gcc44-pr42608.patch b/gcc44-pr42608.patch deleted file mode 100644 index 6002f21..0000000 --- a/gcc44-pr42608.patch +++ /dev/null @@ -1,68 +0,0 @@ -2010-01-09 Jakub Jelinek - - PR c++/42608 - * varasm.c (declare_weak): Add weak attribute to decl if it - doesn't have one already. - (assemble_external): Only add decls to weak_decls if they also - have weak attribute. - - * g++.dg/template/instantiate11.C: New test. - ---- gcc/varasm.c.jj 2009-11-09 16:38:29.000000000 +0100 -+++ gcc/varasm.c 2010-01-08 13:30:12.000000000 +0100 -@@ -2309,13 +2309,15 @@ assemble_external (tree decl ATTRIBUTE_U - /* We want to output annotation for weak and external symbols at - very last to check if they are references or not. */ - -- if (SUPPORTS_WEAK && DECL_WEAK (decl) -+ if (SUPPORTS_WEAK -+ && DECL_WEAK (decl) - /* TREE_STATIC is a weird and abused creature which is not - generally the right test for whether an entity has been - locally emitted, inlined or otherwise not-really-extern, but - for declarations that can be weak, it happens to be - match. */ -- && !TREE_STATIC (decl)) -+ && !TREE_STATIC (decl) -+ && lookup_attribute ("weak", DECL_ATTRIBUTES (decl))) - weak_decls = tree_cons (NULL, decl, weak_decls); - - #ifdef ASM_OUTPUT_EXTERNAL -@@ -5008,6 +5010,9 @@ declare_weak (tree decl) - warning (0, "weak declaration of %q+D not supported", decl); - - mark_weak (decl); -+ if (!lookup_attribute ("weak", DECL_ATTRIBUTES (decl))) -+ DECL_ATTRIBUTES (decl) -+ = tree_cons (get_identifier ("weak"), NULL, DECL_ATTRIBUTES (decl)); - } - - static void ---- gcc/testsuite/g++.dg/template/instantiate11.C.jj 2010-01-08 13:48:58.000000000 +0100 -+++ gcc/testsuite/g++.dg/template/instantiate11.C 2010-01-08 14:18:44.000000000 +0100 -@@ -0,0 +1,25 @@ -+// PR c++/42608 -+// { dg-do compile } -+ -+template -+struct A; -+ -+template -+struct A -+{ -+ void f (); -+}; -+ -+template struct A; -+ -+int -+main () -+{ -+ A a; -+ a.f (); -+ return 0; -+} -+ -+// Make sure we get undefined reference error if -+// A::f () isn't instantiated elsewhere. -+// { dg-final { scan-assembler-not "weak\[\n\t\]*_ZN1AIiiE1fEv" } } diff --git a/gcc44-pr42657.patch b/gcc44-pr42657.patch deleted file mode 100644 index af7f4a9..0000000 --- a/gcc44-pr42657.patch +++ /dev/null @@ -1,73 +0,0 @@ -2010-01-09 Alexandre Oliva - - PR debug/42657 - * var-tracking.c (var_reg_delete): Don't delete the association - between REGs and values or one-part variables if the register - isn't clobbered. - -2010-01-08 Jakub Jelinek - - PR debug/42657 - * tree-inline.c (copy_debug_stmt): Don't reset debug stmt just - because its first operand is a non-localized variable. - ---- gcc/tree-inline.c.jj 2010-01-08 10:21:30.000000000 +0100 -+++ gcc/tree-inline.c 2010-01-08 10:19:49.000000000 +0100 -@@ -2043,6 +2043,12 @@ copy_debug_stmt (gimple stmt, copy_body_ - gcc_assert (TREE_CODE (*n) == VAR_DECL); - t = *n; - } -+ else if (TREE_CODE (t) == VAR_DECL -+ && !TREE_STATIC (t) -+ && gimple_in_ssa_p (cfun) -+ && !pointer_map_contains (id->decl_map, t) -+ && !var_ann (t)) -+ /* T is a non-localized variable. */; - else - walk_tree (&t, remap_gimple_op_r, &wi, NULL); - ---- gcc/var-tracking.c.orig 2010-01-09 07:00:12.000000000 -0200 -+++ gcc/var-tracking.c 2010-01-09 07:00:14.000000000 -0200 -@@ -1401,14 +1401,15 @@ var_reg_delete_and_set (dataflow_set *se - var_reg_set (set, loc, initialized, set_src); - } - --/* Delete current content of register LOC in dataflow set SET. If -- CLOBBER is true, also delete any other live copies of the same -- variable part. */ -+/* Delete the association of register LOC in dataflow set SET with any -+ variables that aren't onepart. If CLOBBER is true, also delete any -+ other live copies of the same variable part, and delete the -+ association with onepart dvs too. */ - - static void - var_reg_delete (dataflow_set *set, rtx loc, bool clobber) - { -- attrs *reg = &set->regs[REGNO (loc)]; -+ attrs *nextp = &set->regs[REGNO (loc)]; - attrs node, next; - - if (clobber) -@@ -1421,13 +1422,18 @@ var_reg_delete (dataflow_set *set, rtx l - clobber_variable_part (set, NULL, dv_from_decl (decl), offset, NULL); - } - -- for (node = *reg; node; node = next) -+ for (node = *nextp; node; node = next) - { - next = node->next; -- delete_variable_part (set, node->loc, node->dv, node->offset); -- pool_free (attrs_pool, node); -+ if (clobber || !dv_onepart_p (node->dv)) -+ { -+ delete_variable_part (set, node->loc, node->dv, node->offset); -+ pool_free (attrs_pool, node); -+ *nextp = next; -+ } -+ else -+ nextp = &node->next; - } -- *reg = NULL; - } - - /* Delete content of register with number REGNO in dataflow set SET. */ diff --git a/gcc44-pr42674.patch b/gcc44-pr42674.patch deleted file mode 100644 index 4319834..0000000 --- a/gcc44-pr42674.patch +++ /dev/null @@ -1,49 +0,0 @@ -2010-01-13 Jakub Jelinek - - PR middle-end/42674 - * c-decl.c (finish_function): Don't emit -Wreturn-type warnings in - functions with noreturn attribute. - - * decl.c (finish_function): Don't emit -Wreturn-type warnings in - functions with noreturn attribute. - - * c-c++-common/pr42674.c: New test. - ---- gcc/c-decl.c.jj 2010-01-04 10:46:33.000000000 +0100 -+++ gcc/c-decl.c 2010-01-13 18:41:44.000000000 +0100 -@@ -8032,6 +8032,8 @@ finish_function (void) - && !current_function_returns_value && !current_function_returns_null - /* Don't complain if we are no-return. */ - && !current_function_returns_abnormally -+ /* Don't complain if we are declared noreturn. */ -+ && !TREE_THIS_VOLATILE (fndecl) - /* Don't warn for main(). */ - && !MAIN_NAME_P (DECL_NAME (fndecl)) - /* Or if they didn't actually specify a return type. */ ---- gcc/cp/decl.c.jj 2009-12-23 17:31:06.000000000 +0100 -+++ gcc/cp/decl.c 2010-01-13 18:43:01.000000000 +0100 -@@ -12541,6 +12541,8 @@ finish_function (int flags) - && !current_function_returns_value && !current_function_returns_null - /* Don't complain if we abort or throw. */ - && !current_function_returns_abnormally -+ /* Don't complain if we are declared noreturn. */ -+ && !TREE_THIS_VOLATILE (fndecl) - && !DECL_NAME (DECL_RESULT (fndecl)) - && !TREE_NO_WARNING (fndecl) - /* Structor return values (if any) are set by the compiler. */ ---- gcc/testsuite/c-c++-common/pr42674.c.jj 2010-01-13 18:57:20.000000000 +0100 -+++ gcc/testsuite/c-c++-common/pr42674.c 2010-01-13 18:57:58.000000000 +0100 -@@ -0,0 +1,13 @@ -+/* PR middle-end/42674 */ -+/* { dg-do compile } */ -+/* { dg-options "-Wreturn-type" } */ -+ -+extern void bar (void); -+static int foo (void) __attribute__ ((__noreturn__, __used__)); -+ -+static int -+foo (void) -+{ -+ while (1) -+ bar (); -+} diff --git a/gcc44-vta-non-call-exception.patch b/gcc44-vta-non-call-exception.patch new file mode 100644 index 0000000..d7e633d --- /dev/null +++ b/gcc44-vta-non-call-exception.patch @@ -0,0 +1,38 @@ +2010-01-21 Jakub Jelinek + + * tree-into-ssa.c (maybe_register_def): If stmt ends the bb, + insert the debug stmt on the single non-EH edge from the stmt. + +--- gcc/tree-into-ssa.c.jj 2010-01-21 09:58:38.000000000 +0100 ++++ gcc/tree-into-ssa.c 2010-01-21 12:25:22.000000000 +0100 +@@ -1968,7 +1968,29 @@ maybe_register_def (def_operand_p def_p, + if (tracked_var) + { + gimple note = gimple_build_debug_bind (tracked_var, def, stmt); +- gsi_insert_after (&gsi, note, GSI_SAME_STMT); ++ if (gsi_one_before_end_p (gsi) && stmt_ends_bb_p (stmt)) ++ { ++ basic_block bb = gsi_bb (gsi); ++ edge_iterator ei; ++ edge e, ef = NULL; ++ FOR_EACH_EDGE (e, ei, bb->succs) ++ if (!(e->flags & EDGE_EH)) ++ { ++ if (ef) ++ { ++ ef = NULL; ++ break; ++ } ++ ef = e; ++ } ++ if (ef ++ && single_pred_p (ef->dest) ++ && !phi_nodes (ef->dest) ++ && ef->dest != EXIT_BLOCK_PTR) ++ gsi_insert_on_edge_immediate (ef, note); ++ } ++ else ++ gsi_insert_after (&gsi, note, GSI_SAME_STMT); + } + } + diff --git a/import.log b/import.log index 68225f6..e0e9ee7 100644 --- a/import.log +++ b/import.log @@ -3,3 +3,4 @@ gcc-4_4_0-5:HEAD:gcc-4.4.0-5.src.rpm:1242291126 gcc-4_4_2-14_fc13:HEAD:gcc-4.4.2-14.fc13.src.rpm:1259930464 gcc-4_4_2-20_fc13:HEAD:gcc-4.4.2-20.fc13.src.rpm:1261484502 gcc-4_4_2-25_fc13:HEAD:gcc-4.4.2-25.fc13.src.rpm:1263487371 +gcc-4_4_3-1_fc13:HEAD:gcc-4.4.3-1.fc13.src.rpm:1264094717 diff --git a/sources b/sources index f8ddaaa..f1c292e 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz -43b87119460d344d8052a51eb87cd05e gcc-4.4.2-20100114.tar.bz2 +6583a7c9552f341f1fc386e31e580d42 gcc-4.4.3-20100121.tar.bz2 From 3b7f0ed37ea3156a44623d0987efe3669d12e79d Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sun, 24 Jan 2010 15:33:25 +0000 Subject: [PATCH 07/38] add patch for sparc elf handling --- gcc.spec | 7 ++++- gcc44-sparc.patch | 71 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 gcc44-sparc.patch diff --git a/gcc.spec b/gcc.spec index 2719dc0..ebe8ecf 100644 --- a/gcc.spec +++ b/gcc.spec @@ -3,7 +3,7 @@ %global gcc_version 4.4.3 # Note, gcc_release must be integer, if you want to add suffixes to # %{release}, append them after %{gcc_release} on Release: line. -%global gcc_release 1 +%global gcc_release 2 %global _unpackaged_files_terminate_build 0 %global multilib_64_archs sparc64 ppc64 s390x x86_64 %if 0%{?fedora} >= 13 @@ -167,6 +167,7 @@ Patch18: gcc44-libstdc++-docs.patch Patch19: gcc44-ppc64-aixdesc.patch Patch20: gcc44-max-vartrack-size.patch Patch21: gcc44-vta-non-call-exception.patch +Patch22: gcc44-sparc.patch Patch1000: fastjar-0.97-segfault.patch Patch1001: fastjar-0.97-len1.patch @@ -477,6 +478,7 @@ which are required to compile with the GNAT. %patch19 -p0 -b .ppc64-aixdesc~ %patch20 -p0 -b .max-vartrack-size~ %patch21 -p0 -b .vta-non-call-exception~ +%patch22 -p1 -b .sparc-elf # This testcase doesn't compile. rm libjava/testsuite/libjava.lang/PR35020* @@ -1866,6 +1868,9 @@ fi %doc rpm.doc/changelogs/libmudflap/ChangeLog* %changelog +* Sat Jan 23 2010 Dennis Gilmore 4.4.3-2 +- sparc patch from davem for elf handling + * Thu Jan 21 2010 Jakub Jelinek 4.4.3-1 - update from gcc-4_4-branch - GCC 4.4.3 release diff --git a/gcc44-sparc.patch b/gcc44-sparc.patch new file mode 100644 index 0000000..a867149 --- /dev/null +++ b/gcc44-sparc.patch @@ -0,0 +1,71 @@ +2010-01-22 David S. Miller + + * gcc/config/sparc/sysv4.h (TARGET_ASM_NAMED_SECTION): Don't define. + * gcc/config/sparc/sparc.c (sparc_elf_asm_named_section): Delete. + +diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c +index 4b904b4..563f9f4 100644 +--- a/gcc/config/sparc/sparc.c ++++ b/gcc/config/sparc/sparc.c +@@ -368,9 +368,6 @@ static int save_or_restore_regs (int, int, rtx, int, int); + static void emit_save_or_restore_regs (int); + static void sparc_asm_function_prologue (FILE *, HOST_WIDE_INT); + static void sparc_asm_function_epilogue (FILE *, HOST_WIDE_INT); +-#ifdef OBJECT_FORMAT_ELF +-static void sparc_elf_asm_named_section (const char *, unsigned int, tree); +-#endif + + static int sparc_adjust_cost (rtx, rtx, rtx, int); + static int sparc_issue_rate (void); +@@ -7986,36 +7983,6 @@ sparc_profile_hook (int labelno) + } + } + +-#ifdef OBJECT_FORMAT_ELF +-static void +-sparc_elf_asm_named_section (const char *name, unsigned int flags, +- tree decl) +-{ +- if (flags & SECTION_MERGE) +- { +- /* entsize cannot be expressed in this section attributes +- encoding style. */ +- default_elf_asm_named_section (name, flags, decl); +- return; +- } +- +- fprintf (asm_out_file, "\t.section\t\"%s\"", name); +- +- if (!(flags & SECTION_DEBUG)) +- fputs (",#alloc", asm_out_file); +- if (flags & SECTION_WRITE) +- fputs (",#write", asm_out_file); +- if (flags & SECTION_TLS) +- fputs (",#tls", asm_out_file); +- if (flags & SECTION_CODE) +- fputs (",#execinstr", asm_out_file); +- +- /* ??? Handle SECTION_BSS. */ +- +- fputc ('\n', asm_out_file); +-} +-#endif /* OBJECT_FORMAT_ELF */ +- + /* We do not allow indirect calls to be optimized into sibling calls. + + We cannot use sibling calls when delayed branches are disabled +diff --git a/gcc/config/sparc/sysv4.h b/gcc/config/sparc/sysv4.h +index edfe59b..2fb2ec5 100644 +--- a/gcc/config/sparc/sysv4.h ++++ b/gcc/config/sparc/sysv4.h +@@ -126,10 +126,6 @@ do { ASM_OUTPUT_ALIGN ((FILE), Pmode == SImode ? 2 : 3); \ + #undef DTORS_SECTION_ASM_OP + #define DTORS_SECTION_ASM_OP "\t.section\t\".dtors\",#alloc,#write" + +-/* Switch into a generic section. */ +-#undef TARGET_ASM_NAMED_SECTION +-#define TARGET_ASM_NAMED_SECTION sparc_elf_asm_named_section +- + #undef ASM_OUTPUT_ALIGNED_BSS + #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ + asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN) From bc7138a9a2f49c043a86dcebf12cbd518c50271b Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 27 Jan 2010 19:49:01 +0000 Subject: [PATCH 08/38] 4.4.3-4 --- .cvsignore | 2 +- gcc.spec | 24 ++++++---- gcc44-rh559186.patch | 65 +++++++++++++++++++++++++++ gcc44-sparc.patch | 71 ------------------------------ gcc44-vta-non-call-exception.patch | 38 ---------------- import.log | 1 + sources | 2 +- 7 files changed, 84 insertions(+), 119 deletions(-) create mode 100644 gcc44-rh559186.patch delete mode 100644 gcc44-sparc.patch delete mode 100644 gcc44-vta-non-call-exception.patch diff --git a/.cvsignore b/.cvsignore index b0e15f9..c05d45c 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ fastjar-0.97.tar.gz -gcc-4.4.3-20100121.tar.bz2 +gcc-4.4.3-20100127.tar.bz2 diff --git a/gcc.spec b/gcc.spec index ebe8ecf..dda7e66 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,9 +1,9 @@ -%global DATE 20100121 -%global SVNREV 156157 +%global DATE 20100127 +%global SVNREV 156296 %global gcc_version 4.4.3 # Note, gcc_release must be integer, if you want to add suffixes to # %{release}, append them after %{gcc_release} on Release: line. -%global gcc_release 2 +%global gcc_release 4 %global _unpackaged_files_terminate_build 0 %global multilib_64_archs sparc64 ppc64 s390x x86_64 %if 0%{?fedora} >= 13 @@ -166,8 +166,7 @@ Patch17: gcc44-pr38757.patch Patch18: gcc44-libstdc++-docs.patch Patch19: gcc44-ppc64-aixdesc.patch Patch20: gcc44-max-vartrack-size.patch -Patch21: gcc44-vta-non-call-exception.patch -Patch22: gcc44-sparc.patch +Patch21: gcc44-rh559186.patch Patch1000: fastjar-0.97-segfault.patch Patch1001: fastjar-0.97-len1.patch @@ -477,8 +476,7 @@ which are required to compile with the GNAT. %endif %patch19 -p0 -b .ppc64-aixdesc~ %patch20 -p0 -b .max-vartrack-size~ -%patch21 -p0 -b .vta-non-call-exception~ -%patch22 -p1 -b .sparc-elf +%patch21 -p0 -b .rh559186~ # This testcase doesn't compile. rm libjava/testsuite/libjava.lang/PR35020* @@ -1868,8 +1866,18 @@ fi %doc rpm.doc/changelogs/libmudflap/ChangeLog* %changelog +* Wed Jan 27 2010 Jakub Jelinek 4.4.3-4 +- update from gcc-4_4-branch + - PRs bootstrap/42786, fortran/42866, target/38697, target/42841 +- fix up handling of constant pool elements in dwarf2out +- fix acats norun.lst handling +- fix asm redirection of builtin ffs on 64-bit arches (#559186) + +* Mon Jan 25 2010 Jakub Jelinek 4.4.3-3 +- VTA improvements (#556975, PR debug/42861) + * Sat Jan 23 2010 Dennis Gilmore 4.4.3-2 -- sparc patch from davem for elf handling +- use gas .section syntax (#530847) * Thu Jan 21 2010 Jakub Jelinek 4.4.3-1 - update from gcc-4_4-branch diff --git a/gcc44-rh559186.patch b/gcc44-rh559186.patch new file mode 100644 index 0000000..0544f72 --- /dev/null +++ b/gcc44-rh559186.patch @@ -0,0 +1,65 @@ +2010-01-27 Jakub Jelinek + + * Makefile.in (c-common.o): Depend on $(OPTABS_H). + * c-common.c: Include optabs.h. + (set_builtin_user_assembler_name): Also handle + ffs if int is smaller than word. + + * gcc.dg/builtin-ffs-1.c: New test. + +--- gcc/Makefile.in.jj 2010-01-21 08:58:12.000000000 +0100 ++++ gcc/Makefile.in 2010-01-27 19:17:05.000000000 +0100 +@@ -1890,7 +1890,7 @@ c-common.o : c-common.c $(CONFIG_H) $(SY + $(TARGET_H) $(C_TREE_H) tree-iterator.h langhooks.h tree-mudflap.h \ + intl.h opts.h $(REAL_H) $(CPPLIB_H) $(TREE_INLINE_H) $(HASHTAB_H) \ + $(BUILTINS_DEF) $(CGRAPH_H) $(BASIC_BLOCK_H) $(TARGET_DEF_H) \ +- $(GIMPLE_H) libfuncs.h ++ $(GIMPLE_H) libfuncs.h $(OPTABS_H) + + c-pretty-print.o : c-pretty-print.c $(C_PRETTY_PRINT_H) \ + $(C_TREE_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(REAL_H) \ +--- gcc/c-common.c.jj 2009-11-09 16:38:29.000000000 +0100 ++++ gcc/c-common.c 2010-01-27 19:16:35.000000000 +0100 +@@ -52,6 +52,7 @@ along with GCC; see the file COPYING3. + #include "gimple.h" + #include "fixed-value.h" + #include "libfuncs.h" ++#include "optabs.h" + + cpp_reader *parse_in; /* Declared in c-pragma.h. */ + +@@ -4421,6 +4422,14 @@ set_builtin_user_assembler_name (tree de + case BUILT_IN_ABORT: + abort_libfunc = set_user_assembler_libfunc ("abort", asmspec); + break; ++ case BUILT_IN_FFS: ++ if (INT_TYPE_SIZE < BITS_PER_WORD) ++ { ++ set_user_assembler_libfunc ("ffs", asmspec); ++ set_optab_libfunc (ffs_optab, mode_for_size (INT_TYPE_SIZE, ++ MODE_INT, 0), "ffs"); ++ } ++ break; + default: + break; + } +--- gcc/testsuite/gcc.dg/builtin-ffs-1.c.jj 2010-01-27 14:27:45.000000000 +0100 ++++ gcc/testsuite/gcc.dg/builtin-ffs-1.c 2010-01-27 14:27:10.000000000 +0100 +@@ -0,0 +1,17 @@ ++/* { dg-do compile } */ ++/* { dg-options "-O2" } */ ++ ++extern int ffs (int) __asm ("__GI_ffs") __attribute__ ((nothrow, const)); ++ ++int ++ffsll (long long int i) ++{ ++ unsigned long long int x = i & -i; ++ ++ if (x <= 0xffffffff) ++ return ffs (i); ++ else ++ return 32 + ffs (i >> 32); ++} ++ ++/* { dg-final { scan-assembler-not "\nffs\n|\nffs\[^a-zA-Z0-9_\]|\[^a-zA-Z0-9_\]ffs\n" } } */ diff --git a/gcc44-sparc.patch b/gcc44-sparc.patch deleted file mode 100644 index a867149..0000000 --- a/gcc44-sparc.patch +++ /dev/null @@ -1,71 +0,0 @@ -2010-01-22 David S. Miller - - * gcc/config/sparc/sysv4.h (TARGET_ASM_NAMED_SECTION): Don't define. - * gcc/config/sparc/sparc.c (sparc_elf_asm_named_section): Delete. - -diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c -index 4b904b4..563f9f4 100644 ---- a/gcc/config/sparc/sparc.c -+++ b/gcc/config/sparc/sparc.c -@@ -368,9 +368,6 @@ static int save_or_restore_regs (int, int, rtx, int, int); - static void emit_save_or_restore_regs (int); - static void sparc_asm_function_prologue (FILE *, HOST_WIDE_INT); - static void sparc_asm_function_epilogue (FILE *, HOST_WIDE_INT); --#ifdef OBJECT_FORMAT_ELF --static void sparc_elf_asm_named_section (const char *, unsigned int, tree); --#endif - - static int sparc_adjust_cost (rtx, rtx, rtx, int); - static int sparc_issue_rate (void); -@@ -7986,36 +7983,6 @@ sparc_profile_hook (int labelno) - } - } - --#ifdef OBJECT_FORMAT_ELF --static void --sparc_elf_asm_named_section (const char *name, unsigned int flags, -- tree decl) --{ -- if (flags & SECTION_MERGE) -- { -- /* entsize cannot be expressed in this section attributes -- encoding style. */ -- default_elf_asm_named_section (name, flags, decl); -- return; -- } -- -- fprintf (asm_out_file, "\t.section\t\"%s\"", name); -- -- if (!(flags & SECTION_DEBUG)) -- fputs (",#alloc", asm_out_file); -- if (flags & SECTION_WRITE) -- fputs (",#write", asm_out_file); -- if (flags & SECTION_TLS) -- fputs (",#tls", asm_out_file); -- if (flags & SECTION_CODE) -- fputs (",#execinstr", asm_out_file); -- -- /* ??? Handle SECTION_BSS. */ -- -- fputc ('\n', asm_out_file); --} --#endif /* OBJECT_FORMAT_ELF */ -- - /* We do not allow indirect calls to be optimized into sibling calls. - - We cannot use sibling calls when delayed branches are disabled -diff --git a/gcc/config/sparc/sysv4.h b/gcc/config/sparc/sysv4.h -index edfe59b..2fb2ec5 100644 ---- a/gcc/config/sparc/sysv4.h -+++ b/gcc/config/sparc/sysv4.h -@@ -126,10 +126,6 @@ do { ASM_OUTPUT_ALIGN ((FILE), Pmode == SImode ? 2 : 3); \ - #undef DTORS_SECTION_ASM_OP - #define DTORS_SECTION_ASM_OP "\t.section\t\".dtors\",#alloc,#write" - --/* Switch into a generic section. */ --#undef TARGET_ASM_NAMED_SECTION --#define TARGET_ASM_NAMED_SECTION sparc_elf_asm_named_section -- - #undef ASM_OUTPUT_ALIGNED_BSS - #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ - asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN) diff --git a/gcc44-vta-non-call-exception.patch b/gcc44-vta-non-call-exception.patch deleted file mode 100644 index d7e633d..0000000 --- a/gcc44-vta-non-call-exception.patch +++ /dev/null @@ -1,38 +0,0 @@ -2010-01-21 Jakub Jelinek - - * tree-into-ssa.c (maybe_register_def): If stmt ends the bb, - insert the debug stmt on the single non-EH edge from the stmt. - ---- gcc/tree-into-ssa.c.jj 2010-01-21 09:58:38.000000000 +0100 -+++ gcc/tree-into-ssa.c 2010-01-21 12:25:22.000000000 +0100 -@@ -1968,7 +1968,29 @@ maybe_register_def (def_operand_p def_p, - if (tracked_var) - { - gimple note = gimple_build_debug_bind (tracked_var, def, stmt); -- gsi_insert_after (&gsi, note, GSI_SAME_STMT); -+ if (gsi_one_before_end_p (gsi) && stmt_ends_bb_p (stmt)) -+ { -+ basic_block bb = gsi_bb (gsi); -+ edge_iterator ei; -+ edge e, ef = NULL; -+ FOR_EACH_EDGE (e, ei, bb->succs) -+ if (!(e->flags & EDGE_EH)) -+ { -+ if (ef) -+ { -+ ef = NULL; -+ break; -+ } -+ ef = e; -+ } -+ if (ef -+ && single_pred_p (ef->dest) -+ && !phi_nodes (ef->dest) -+ && ef->dest != EXIT_BLOCK_PTR) -+ gsi_insert_on_edge_immediate (ef, note); -+ } -+ else -+ gsi_insert_after (&gsi, note, GSI_SAME_STMT); - } - } - diff --git a/import.log b/import.log index e0e9ee7..51233ea 100644 --- a/import.log +++ b/import.log @@ -4,3 +4,4 @@ gcc-4_4_2-14_fc13:HEAD:gcc-4.4.2-14.fc13.src.rpm:1259930464 gcc-4_4_2-20_fc13:HEAD:gcc-4.4.2-20.fc13.src.rpm:1261484502 gcc-4_4_2-25_fc13:HEAD:gcc-4.4.2-25.fc13.src.rpm:1263487371 gcc-4_4_3-1_fc13:HEAD:gcc-4.4.3-1.fc13.src.rpm:1264094717 +gcc-4_4_3-4_fc13:HEAD:gcc-4.4.3-4.fc13.src.rpm:1264621537 diff --git a/sources b/sources index f1c292e..5ad077a 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz -6583a7c9552f341f1fc386e31e580d42 gcc-4.4.3-20100121.tar.bz2 +68beb615235531be563805873737509f gcc-4.4.3-20100127.tar.bz2 From 08e9ee2de573578a2f13a3be6ab7fdb4f5e44c04 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 8 Feb 2010 20:09:15 +0000 Subject: [PATCH 09/38] 4.4.3-5 --- .cvsignore | 2 +- gcc.spec | 32 +++++++++++++++++++++--- gcc44-no-add-needed.patch | 52 +++++++++++++++++++++++++++++++++++++++ import.log | 1 + sources | 2 +- 5 files changed, 84 insertions(+), 5 deletions(-) create mode 100644 gcc44-no-add-needed.patch diff --git a/.cvsignore b/.cvsignore index c05d45c..b828f90 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ fastjar-0.97.tar.gz -gcc-4.4.3-20100127.tar.bz2 +gcc-4.4.3-20100208.tar.bz2 diff --git a/gcc.spec b/gcc.spec index dda7e66..2083525 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,9 +1,9 @@ -%global DATE 20100127 -%global SVNREV 156296 +%global DATE 20100208 +%global SVNREV 156609 %global gcc_version 4.4.3 # Note, gcc_release must be integer, if you want to add suffixes to # %{release}, append them after %{gcc_release} on Release: line. -%global gcc_release 4 +%global gcc_release 5 %global _unpackaged_files_terminate_build 0 %global multilib_64_archs sparc64 ppc64 s390x x86_64 %if 0%{?fedora} >= 13 @@ -70,7 +70,12 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # Need binutils which support --build-id >= 2.17.50.0.17-3 # Need binutils which support %gnu_unique_object >= 2.19.51.0.14 # Need binutils which support .cfi_sections >= 2.19.51.0.14-33 +%if 0%{?fedora} >= 13 +# Need binutils which support --no-add-needed >= 2.20.51.0.2-12 +BuildRequires: binutils >= 2.20.51.0.2-12 +%else BuildRequires: binutils >= 2.19.51.0.14-33 +%endif # While gcc doesn't include statically linked binaries, during testing # -static is used several times. BuildRequires: glibc-static @@ -125,7 +130,12 @@ Requires: cpp = %{version}-%{release} # Need binutils that support --build-id # Need binutils that support %gnu_unique_object # Need binutils that support .cfi_sections +%if 0%{?fedora} >= 13 +# Need binutils that support --no-add-needed +Requires: binutils >= 2.20.51.0.2-12 +%else Requires: binutils >= 2.19.51.0.14-33 +%endif # Make sure gdb will understand DW_FORM_strp Conflicts: gdb < 5.1-2 Requires: glibc-devel >= 2.2.90-12 @@ -167,6 +177,7 @@ Patch18: gcc44-libstdc++-docs.patch Patch19: gcc44-ppc64-aixdesc.patch Patch20: gcc44-max-vartrack-size.patch Patch21: gcc44-rh559186.patch +Patch22: gcc44-no-add-needed.patch Patch1000: fastjar-0.97-segfault.patch Patch1001: fastjar-0.97-len1.patch @@ -477,6 +488,9 @@ which are required to compile with the GNAT. %patch19 -p0 -b .ppc64-aixdesc~ %patch20 -p0 -b .max-vartrack-size~ %patch21 -p0 -b .rh559186~ +%if 0%{?fedora} >= 13 +%patch22 -p0 -b .no-add-needed~ +%endif # This testcase doesn't compile. rm libjava/testsuite/libjava.lang/PR35020* @@ -1866,6 +1880,18 @@ fi %doc rpm.doc/changelogs/libmudflap/ChangeLog* %changelog +* Mon Feb 8 2010 Jakub Jelinek 4.4.3-5 +- update from gcc-4_4-branch + - PRs fortran/38324, fortran/41044, fortran/41167, fortran/42309, + fortran/42650, fortran/42736, libfortran/42901, middle-end/42898, + middle-end/42995, rtl-optimization/42952, tree-optimization/42462, + tree-optimization/42890, tree-optimization/42931 +- VTA backports + - PRs target/42924, debug/42896, rtl-optimization/42889 +%if 0%{?fedora} >= 13 +- pass --no-add-needed to the linker +%endif + * Wed Jan 27 2010 Jakub Jelinek 4.4.3-4 - update from gcc-4_4-branch - PRs bootstrap/42786, fortran/42866, target/38697, target/42841 diff --git a/gcc44-no-add-needed.patch b/gcc44-no-add-needed.patch new file mode 100644 index 0000000..4570c0c --- /dev/null +++ b/gcc44-no-add-needed.patch @@ -0,0 +1,52 @@ +2010-02-08 Roland McGrath + + * config/rs6000/sysv4.h (LINK_EH_SPEC): Pass --no-add-needed to the + linker. + * config/linux.h (LINK_EH_SPEC): Likewise. + * config/alpha/elf.h (LINK_EH_SPEC): Likewise. + * config/ia64/linux.h (LINK_EH_SPEC): Likewise. + +--- gcc/config/alpha/elf.h.~1~ ++++ gcc/config/alpha/elf.h +@@ -421,7 +421,7 @@ extern int alpha_this_gpdisp_sequence_nu + I imagine that other systems will catch up. In the meantime, it + doesn't harm to make sure that the data exists to be used later. */ + #if defined(HAVE_LD_EH_FRAME_HDR) +-#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} %{!r:--build-id} " ++#define LINK_EH_SPEC "--no-add-needed %{!static:--eh-frame-hdr} %{!r:--build-id} " + #endif + + /* A C statement (sans semicolon) to output to the stdio stream STREAM +--- gcc/config/ia64/linux.h.~1~ ++++ gcc/config/ia64/linux.h +@@ -58,7 +58,7 @@ do { \ + Signalize that because we have fde-glibc, we don't need all C shared libs + linked against -lgcc_s. */ + #undef LINK_EH_SPEC +-#define LINK_EH_SPEC "%{!r:--build-id} " ++#define LINK_EH_SPEC "--no-add-needed %{!r:--build-id} " + + #define MD_UNWIND_SUPPORT "config/ia64/linux-unwind.h" + +--- gcc/config/linux.h.~1~ ++++ gcc/config/linux.h +@@ -89,7 +89,7 @@ see the files COPYING3 and COPYING.RUNTI + } while (0) + + #if defined(HAVE_LD_EH_FRAME_HDR) +-#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} %{!r:--build-id} " ++#define LINK_EH_SPEC "--no-add-needed %{!static:--eh-frame-hdr} %{!r:--build-id} " + #endif + + /* Define this so we can compile MS code for use with WINE. */ +--- gcc/config/rs6000/sysv4.h.~1~ ++++ gcc/config/rs6000/sysv4.h +@@ -917,7 +917,7 @@ SVR4_ASM_SPEC \ + %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}}}" + + #if defined(HAVE_LD_EH_FRAME_HDR) +-# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} %{!r:--build-id} " ++# define LINK_EH_SPEC "--no-add-needed %{!static:--eh-frame-hdr} %{!r:--build-id} " + #endif + + #define CPP_OS_LINUX_SPEC "-D__unix__ -D__gnu_linux__ -D__linux__ \ diff --git a/import.log b/import.log index 51233ea..f4eb3cf 100644 --- a/import.log +++ b/import.log @@ -5,3 +5,4 @@ gcc-4_4_2-20_fc13:HEAD:gcc-4.4.2-20.fc13.src.rpm:1261484502 gcc-4_4_2-25_fc13:HEAD:gcc-4.4.2-25.fc13.src.rpm:1263487371 gcc-4_4_3-1_fc13:HEAD:gcc-4.4.3-1.fc13.src.rpm:1264094717 gcc-4_4_3-4_fc13:HEAD:gcc-4.4.3-4.fc13.src.rpm:1264621537 +gcc-4_4_3-5_fc13:HEAD:gcc-4.4.3-5.fc13.src.rpm:1265659730 diff --git a/sources b/sources index 5ad077a..07ff5c1 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz -68beb615235531be563805873737509f gcc-4.4.3-20100127.tar.bz2 +8a74f4d502b3b282863fd579b3ab3968 gcc-4.4.3-20100208.tar.bz2 From 1d0a646cc534e6534b0b7b45150ddf5e41404a54 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 11 Feb 2010 21:58:44 +0000 Subject: [PATCH 10/38] 4.4.3-6 --- .cvsignore | 2 +- gcc.spec | 20 +++++++++----- gcc44-rh559186.patch | 65 -------------------------------------------- import.log | 1 + sources | 2 +- 5 files changed, 16 insertions(+), 74 deletions(-) delete mode 100644 gcc44-rh559186.patch diff --git a/.cvsignore b/.cvsignore index b828f90..4e1ffc9 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ fastjar-0.97.tar.gz -gcc-4.4.3-20100208.tar.bz2 +gcc-4.4.3-20100211.tar.bz2 diff --git a/gcc.spec b/gcc.spec index 2083525..864f8f1 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,9 +1,9 @@ -%global DATE 20100208 -%global SVNREV 156609 +%global DATE 20100211 +%global SVNREV 156726 %global gcc_version 4.4.3 # Note, gcc_release must be integer, if you want to add suffixes to # %{release}, append them after %{gcc_release} on Release: line. -%global gcc_release 5 +%global gcc_release 6 %global _unpackaged_files_terminate_build 0 %global multilib_64_archs sparc64 ppc64 s390x x86_64 %if 0%{?fedora} >= 13 @@ -176,8 +176,7 @@ Patch17: gcc44-pr38757.patch Patch18: gcc44-libstdc++-docs.patch Patch19: gcc44-ppc64-aixdesc.patch Patch20: gcc44-max-vartrack-size.patch -Patch21: gcc44-rh559186.patch -Patch22: gcc44-no-add-needed.patch +Patch21: gcc44-no-add-needed.patch Patch1000: fastjar-0.97-segfault.patch Patch1001: fastjar-0.97-len1.patch @@ -487,9 +486,8 @@ which are required to compile with the GNAT. %endif %patch19 -p0 -b .ppc64-aixdesc~ %patch20 -p0 -b .max-vartrack-size~ -%patch21 -p0 -b .rh559186~ %if 0%{?fedora} >= 13 -%patch22 -p0 -b .no-add-needed~ +%patch21 -p0 -b .no-add-needed~ %endif # This testcase doesn't compile. @@ -1880,6 +1878,14 @@ fi %doc rpm.doc/changelogs/libmudflap/ChangeLog* %changelog +* Thu Feb 11 2010 Jakub Jelinek 4.4.3-6 +- update from gcc-4_4-branch + - PR tree-optimization/42705 + - fix up -femit-struct-debug-baseonly (#561320, PR debug/43010) + - --enable-checking=valgrind bugfixes (PRs fortran/43029, fortran/43030) +- VTA backports (#562312) +- some further --enable-checking=valgrind bugfixes (PR target/38781) + * Mon Feb 8 2010 Jakub Jelinek 4.4.3-5 - update from gcc-4_4-branch - PRs fortran/38324, fortran/41044, fortran/41167, fortran/42309, diff --git a/gcc44-rh559186.patch b/gcc44-rh559186.patch deleted file mode 100644 index 0544f72..0000000 --- a/gcc44-rh559186.patch +++ /dev/null @@ -1,65 +0,0 @@ -2010-01-27 Jakub Jelinek - - * Makefile.in (c-common.o): Depend on $(OPTABS_H). - * c-common.c: Include optabs.h. - (set_builtin_user_assembler_name): Also handle - ffs if int is smaller than word. - - * gcc.dg/builtin-ffs-1.c: New test. - ---- gcc/Makefile.in.jj 2010-01-21 08:58:12.000000000 +0100 -+++ gcc/Makefile.in 2010-01-27 19:17:05.000000000 +0100 -@@ -1890,7 +1890,7 @@ c-common.o : c-common.c $(CONFIG_H) $(SY - $(TARGET_H) $(C_TREE_H) tree-iterator.h langhooks.h tree-mudflap.h \ - intl.h opts.h $(REAL_H) $(CPPLIB_H) $(TREE_INLINE_H) $(HASHTAB_H) \ - $(BUILTINS_DEF) $(CGRAPH_H) $(BASIC_BLOCK_H) $(TARGET_DEF_H) \ -- $(GIMPLE_H) libfuncs.h -+ $(GIMPLE_H) libfuncs.h $(OPTABS_H) - - c-pretty-print.o : c-pretty-print.c $(C_PRETTY_PRINT_H) \ - $(C_TREE_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(REAL_H) \ ---- gcc/c-common.c.jj 2009-11-09 16:38:29.000000000 +0100 -+++ gcc/c-common.c 2010-01-27 19:16:35.000000000 +0100 -@@ -52,6 +52,7 @@ along with GCC; see the file COPYING3. - #include "gimple.h" - #include "fixed-value.h" - #include "libfuncs.h" -+#include "optabs.h" - - cpp_reader *parse_in; /* Declared in c-pragma.h. */ - -@@ -4421,6 +4422,14 @@ set_builtin_user_assembler_name (tree de - case BUILT_IN_ABORT: - abort_libfunc = set_user_assembler_libfunc ("abort", asmspec); - break; -+ case BUILT_IN_FFS: -+ if (INT_TYPE_SIZE < BITS_PER_WORD) -+ { -+ set_user_assembler_libfunc ("ffs", asmspec); -+ set_optab_libfunc (ffs_optab, mode_for_size (INT_TYPE_SIZE, -+ MODE_INT, 0), "ffs"); -+ } -+ break; - default: - break; - } ---- gcc/testsuite/gcc.dg/builtin-ffs-1.c.jj 2010-01-27 14:27:45.000000000 +0100 -+++ gcc/testsuite/gcc.dg/builtin-ffs-1.c 2010-01-27 14:27:10.000000000 +0100 -@@ -0,0 +1,17 @@ -+/* { dg-do compile } */ -+/* { dg-options "-O2" } */ -+ -+extern int ffs (int) __asm ("__GI_ffs") __attribute__ ((nothrow, const)); -+ -+int -+ffsll (long long int i) -+{ -+ unsigned long long int x = i & -i; -+ -+ if (x <= 0xffffffff) -+ return ffs (i); -+ else -+ return 32 + ffs (i >> 32); -+} -+ -+/* { dg-final { scan-assembler-not "\nffs\n|\nffs\[^a-zA-Z0-9_\]|\[^a-zA-Z0-9_\]ffs\n" } } */ diff --git a/import.log b/import.log index f4eb3cf..dca725e 100644 --- a/import.log +++ b/import.log @@ -6,3 +6,4 @@ gcc-4_4_2-25_fc13:HEAD:gcc-4.4.2-25.fc13.src.rpm:1263487371 gcc-4_4_3-1_fc13:HEAD:gcc-4.4.3-1.fc13.src.rpm:1264094717 gcc-4_4_3-4_fc13:HEAD:gcc-4.4.3-4.fc13.src.rpm:1264621537 gcc-4_4_3-5_fc13:HEAD:gcc-4.4.3-5.fc13.src.rpm:1265659730 +gcc-4_4_3-6_fc13:HEAD:gcc-4.4.3-6.fc13.src.rpm:1265925505 diff --git a/sources b/sources index 07ff5c1..b9841eb 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz -8a74f4d502b3b282863fd579b3ab3968 gcc-4.4.3-20100208.tar.bz2 +080254256e618fa9f8f28e03698b016a gcc-4.4.3-20100211.tar.bz2 From 420e395efa4a065cb691333c64d21140342a05c6 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Wed, 17 Feb 2010 01:23:17 +0000 Subject: [PATCH 11/38] Initialize branch F-13 for gcc --- branch | 1 + 1 file changed, 1 insertion(+) create mode 100644 branch diff --git a/branch b/branch new file mode 100644 index 0000000..baa94ef --- /dev/null +++ b/branch @@ -0,0 +1 @@ +F-13 From f3a89dbfed24dfe2bf9a0f35dca3aac253299e06 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Sun, 21 Feb 2010 23:03:20 +0000 Subject: [PATCH 12/38] 4.4.3-7 --- .cvsignore | 2 +- gcc.spec | 28 +- gcc44-max-vartrack-size.patch | 229 ------- gcc44-pr42233.patch | 973 +++++++++++++++++++++++++++++ gcc44-pr43051.patch | 331 ++++++++++ gcc44-sparc-config-detection.patch | 4 +- import.log | 1 + sources | 2 +- 8 files changed, 1329 insertions(+), 241 deletions(-) delete mode 100644 gcc44-max-vartrack-size.patch create mode 100644 gcc44-pr42233.patch create mode 100644 gcc44-pr43051.patch diff --git a/.cvsignore b/.cvsignore index 4e1ffc9..a36c3e4 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ fastjar-0.97.tar.gz -gcc-4.4.3-20100211.tar.bz2 +gcc-4.4.3-20100221.tar.bz2 diff --git a/gcc.spec b/gcc.spec index 864f8f1..8849bd6 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,9 +1,9 @@ -%global DATE 20100211 -%global SVNREV 156726 +%global DATE 20100221 +%global SVNREV 156936 %global gcc_version 4.4.3 # Note, gcc_release must be integer, if you want to add suffixes to # %{release}, append them after %{gcc_release} on Release: line. -%global gcc_release 6 +%global gcc_release 7 %global _unpackaged_files_terminate_build 0 %global multilib_64_archs sparc64 ppc64 s390x x86_64 %if 0%{?fedora} >= 13 @@ -175,8 +175,9 @@ Patch16: gcc44-unwind-debug-hook.patch Patch17: gcc44-pr38757.patch Patch18: gcc44-libstdc++-docs.patch Patch19: gcc44-ppc64-aixdesc.patch -Patch20: gcc44-max-vartrack-size.patch -Patch21: gcc44-no-add-needed.patch +Patch20: gcc44-no-add-needed.patch +Patch21: gcc44-pr42233.patch +Patch22: gcc44-pr43051.patch Patch1000: fastjar-0.97-segfault.patch Patch1001: fastjar-0.97-len1.patch @@ -485,10 +486,11 @@ which are required to compile with the GNAT. %patch18 -p0 -b .libstdc++-docs~ %endif %patch19 -p0 -b .ppc64-aixdesc~ -%patch20 -p0 -b .max-vartrack-size~ %if 0%{?fedora} >= 13 -%patch21 -p0 -b .no-add-needed~ +%patch20 -p0 -b .no-add-needed~ %endif +%patch21 -p0 -b .pr42233~ +#%patch22 -p0 -b .pr43051~ # This testcase doesn't compile. rm libjava/testsuite/libjava.lang/PR35020* @@ -686,7 +688,7 @@ CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="`echo $OPT_FLAGS | sed 's/ -Wall / /g'`" --with-arch_32=i686 \ %endif %ifarch s390 s390x - --with-arch=z9-109 --with-tune=z10 \ + --with-arch=z9-109 --with-tune=z10 --enable-decimal-float \ %endif %ifnarch sparc sparcv9 ppc --build=%{gcc_target_platform} @@ -1878,6 +1880,16 @@ fi %doc rpm.doc/changelogs/libmudflap/ChangeLog* %changelog +* Sun Feb 21 2010 Jakub Jelinek 4.4.3-7 +- update from gcc-4_4-branch + - PRs c++/43024, c++/43033, fortran/41869, target/40887, + tree-optimization/42871, tree-optimization/43074 +- VTA backports (PRs debug/42918, debug/43084) +- --enable-decimal-float on s390{,x} (#565871) +- improve __builtin_expect handling, propagate branch probabilities + during expansion even for sequences with more than one jump + (PR middle-end/42233) + * Thu Feb 11 2010 Jakub Jelinek 4.4.3-6 - update from gcc-4_4-branch - PR tree-optimization/42705 diff --git a/gcc44-max-vartrack-size.patch b/gcc44-max-vartrack-size.patch deleted file mode 100644 index 70bcd75..0000000 --- a/gcc44-max-vartrack-size.patch +++ /dev/null @@ -1,229 +0,0 @@ -2010-01-05 Alexandre Oliva - - * params.def (PARAM_MAX_VARTRACK_SIZE): New. - * doc/invoke.texi: Document it. - * var-tracking.c: Include toplev.h and params.h. - (vt_find_locations): Return bool indicating success. Compute - hash sizes unconditionally. Check new parameter, report. - (variable_tracking_main_1): Check vt_find_locations results and - retry. Renamed from... - (variable_tracking_main): ... this. New wrapper to preserve - flag_var_tracking_assignments. - * Makefile.in (var-tracking.o): Adjust dependencies. - ---- gcc/doc/invoke.texi.jj 2010-01-09 20:39:58.000000000 +0100 -+++ gcc/doc/invoke.texi 2010-01-21 10:00:15.979730377 +0100 -@@ -7937,6 +7937,15 @@ with more basic blocks than this paramet - motion optimization performed on them. The default value of the - parameter is 1000 for -O1 and 10000 for -O2 and above. - -+@item max-vartrack-size -+Sets a maximum number of hash table slots to use during variable -+tracking dataflow analysis of any function. If this limit is exceeded -+with variable tracking at assignments enabled, analysis for that -+function is retried without it, after removing all debug insns from -+the function. If the limit is exceeded even without debug insns, var -+tracking analysis is completely disabled for the function. Setting -+the parameter to zero makes it unlimited. -+ - @item min-nondebug-insn-uid - Use uids starting at this parameter for nondebug insns. The range below - the parameter is reserved exclusively for debug insns created by ---- gcc/params.def.jj 2010-01-09 20:39:58.000000000 +0100 -+++ gcc/params.def 2010-01-21 10:00:15.980730943 +0100 -@@ -771,6 +771,13 @@ DEFPARAM (PARAM_LOOP_INVARIANT_MAX_BBS_I - "max basic blocks number in loop for loop invariant motion", - 10000, 0, 0) - -+/* Set maximum hash table size for var tracking. */ -+ -+DEFPARAM (PARAM_MAX_VARTRACK_SIZE, -+ "max-vartrack-size", -+ "Max. size of var tracking hash tables", -+ 50000000, 0, 0) -+ - /* Set minimum insn uid for non-debug insns. */ - - DEFPARAM (PARAM_MIN_NONDEBUG_INSN_UID, ---- gcc/var-tracking.c.jj 2010-01-21 09:10:37.000000000 +0100 -+++ gcc/var-tracking.c 2010-01-21 10:00:15.983740989 +0100 -@@ -109,6 +109,8 @@ - #include "tree-flow.h" - #include "cselib.h" - #include "target.h" -+#include "toplev.h" -+#include "params.h" - - /* var-tracking.c assumes that tree code with the same value as VALUE rtx code - has no chance to appear in REG_EXPR/MEM_EXPRs and isn't a decl. -@@ -451,7 +453,7 @@ static int add_uses (rtx *, void *); - static void add_uses_1 (rtx *, void *); - static void add_stores (rtx, const_rtx, void *); - static bool compute_bb_dataflow (basic_block); --static void vt_find_locations (void); -+static bool vt_find_locations (void); - - static void dump_attrs_list (attrs); - static int dump_var_slot (void **, void *); -@@ -5511,7 +5513,7 @@ compute_bb_dataflow (basic_block bb) - - /* Find the locations of variables in the whole function. */ - --static void -+static bool - vt_find_locations (void) - { - fibheap_t worklist, pending, fibheap_swap; -@@ -5522,6 +5524,8 @@ vt_find_locations (void) - int *rc_order; - int i; - int htabsz = 0; -+ int htabmax = PARAM_VALUE (PARAM_MAX_VARTRACK_SIZE); -+ bool success = true; - - /* Compute reverse completion order of depth first search of the CFG - so that the data-flow runs faster. */ -@@ -5543,7 +5547,7 @@ vt_find_locations (void) - fibheap_insert (pending, bb_order[bb->index], bb); - sbitmap_ones (in_pending); - -- while (!fibheap_empty (pending)) -+ while (success && !fibheap_empty (pending)) - { - fibheap_swap = pending; - pending = worklist; -@@ -5566,11 +5570,11 @@ vt_find_locations (void) - - SET_BIT (visited, bb->index); - -- if (dump_file && VTI (bb)->in.vars) -+ if (VTI (bb)->in.vars) - { - htabsz -- -= htab_size (shared_hash_htab (VTI (bb)->in.vars)) -- + htab_size (shared_hash_htab (VTI (bb)->out.vars)); -+ -= (htab_size (shared_hash_htab (VTI (bb)->in.vars)) -+ + htab_size (shared_hash_htab (VTI (bb)->out.vars))); - oldinsz - = htab_elements (shared_hash_htab (VTI (bb)->in.vars)); - oldoutsz -@@ -5634,9 +5638,20 @@ vt_find_locations (void) - } - - changed = compute_bb_dataflow (bb); -- if (dump_file) -- htabsz += htab_size (shared_hash_htab (VTI (bb)->in.vars)) -- + htab_size (shared_hash_htab (VTI (bb)->out.vars)); -+ htabsz += (htab_size (shared_hash_htab (VTI (bb)->in.vars)) -+ + htab_size (shared_hash_htab (VTI (bb)->out.vars))); -+ -+ if (htabmax && htabsz > htabmax) -+ { -+ if (MAY_HAVE_DEBUG_INSNS) -+ inform (DECL_SOURCE_LOCATION (cfun->decl), -+ "variable tracking size limit exceeded with debug insns, retrying without"); -+ else -+ inform (DECL_SOURCE_LOCATION (cfun->decl), -+ "variable tracking size limit exceeded"); -+ success = false; -+ break; -+ } - - if (changed) - { -@@ -5687,7 +5702,7 @@ vt_find_locations (void) - } - } - -- if (MAY_HAVE_DEBUG_INSNS) -+ if (success && MAY_HAVE_DEBUG_INSNS) - FOR_EACH_BB (bb) - gcc_assert (VTI (bb)->flooded); - -@@ -5698,6 +5713,8 @@ vt_find_locations (void) - sbitmap_free (visited); - sbitmap_free (in_worklist); - sbitmap_free (in_pending); -+ -+ return success; - } - - /* Print the content of the LIST to dump file. */ -@@ -7600,9 +7617,11 @@ vt_finalize (void) - - /* The entry point to variable tracking pass. */ - --unsigned int --variable_tracking_main (void) -+static inline unsigned int -+variable_tracking_main_1 (void) - { -+ bool success; -+ - if (flag_var_tracking_assignments < 0) - { - delete_debug_insns (); -@@ -7627,7 +7646,31 @@ variable_tracking_main (void) - } - } - -- vt_find_locations (); -+ success = vt_find_locations (); -+ -+ if (!success && flag_var_tracking_assignments > 0) -+ { -+ vt_finalize (); -+ -+ delete_debug_insns (); -+ -+ /* This is later restored by our caller. */ -+ flag_var_tracking_assignments = 0; -+ -+ vt_initialize (); -+ -+ if (!frame_pointer_needed && !vt_stack_adjustments ()) -+ gcc_unreachable (); -+ -+ success = vt_find_locations (); -+ } -+ -+ if (!success) -+ { -+ vt_finalize (); -+ vt_debug_insns_local (false); -+ return 0; -+ } - - if (dump_file && (dump_flags & TDF_DETAILS)) - { -@@ -7641,6 +7684,19 @@ variable_tracking_main (void) - vt_debug_insns_local (false); - return 0; - } -+ -+unsigned int -+variable_tracking_main (void) -+{ -+ unsigned int ret; -+ int save = flag_var_tracking_assignments; -+ -+ ret = variable_tracking_main_1 (); -+ -+ flag_var_tracking_assignments = save; -+ -+ return ret; -+} - - static bool - gate_handle_var_tracking (void) ---- gcc/Makefile.in.jj 2010-01-21 08:58:12.000000000 +0100 -+++ gcc/Makefile.in 2010-01-21 10:00:45.555730868 +0100 -@@ -2751,7 +2751,7 @@ var-tracking.o : var-tracking.c $(CONFIG - $(RTL_H) $(TREE_H) hard-reg-set.h insn-config.h reload.h $(FLAGS_H) \ - $(BASIC_BLOCK_H) output.h sbitmap.h alloc-pool.h $(FIBHEAP_H) $(HASHTAB_H) \ - $(REGS_H) $(EXPR_H) $(TIMEVAR_H) tree-pass.h cselib.h $(TARGET_H) \ -- $(TREE_FLOW_H) -+ $(TREE_FLOW_H) $(TOPLEV_H) $(PARAMS_H) - profile.o : profile.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ - $(TREE_H) $(FLAGS_H) output.h $(REGS_H) $(EXPR_H) $(FUNCTION_H) \ - $(TOPLEV_H) $(COVERAGE_H) $(TREE_FLOW_H) value-prof.h cfghooks.h \ diff --git a/gcc44-pr42233.patch b/gcc44-pr42233.patch new file mode 100644 index 0000000..0be6d6f --- /dev/null +++ b/gcc44-pr42233.patch @@ -0,0 +1,973 @@ +2010-02-19 Jakub Jelinek + + PR middle-end/42233 + * dojump.c (do_jump) : Invert priority. + + PR bootstrap/43121 + * except.c (sjlj_emit_function_enter): Don't call + add_reg_br_prob_note, instead add REG_BR_PROB note to the last insn + directly. + * rtl.h (add_reg_br_prob_note): Remove prototype. + + PR middle-end/42233 + * loop-doloop.c (add_test): Adjust do_compare_rtx_and_jump caller. + + PR middle-end/42233 + * expr.h (jumpifnot, jumpifnot_1, jumpif, jumpif_1, do_jump, + do_jump_1, do_compare_rtx_and_jump): Add PROB argument. + * dojump.c: Include output.h. + (inv): New inline function. + (jumpifnot, jumpifnot_1, jumpif, jumpif_1, do_jump_1, do_jump, + do_jump_by_parts_greater_rtx, do_jump_by_parts_greater, + do_jump_by_parts_zero_rtx, do_jump_by_parts_equality_rtx, + do_jump_by_parts_equality, do_compare_and_jump): Add PROB + argument, pass it down to other calls. + (do_compare_rtx_and_jump): Likewise. If PROB is not -1, + add REG_BR_PROB note to the conditional jump. + * cfgexpand.c (add_reg_br_prob_note): Removed. + (expand_gimple_cond): Don't call it, add the probability + as last argument to jumpif_1/jumpifnot_1. + * Makefile.in (dojump.o): Depend on output.h. + * builtins.c (expand_errno_check): Adjust do_compare_rtx_and_jump + callers. + * expmed.c (emit_store_flag_force, do_cmp_and_jump): Likewise. + * stmt.c (do_jump_if_equal): Likewise. + * cfgrtl.c (rtl_lv_add_condition_to_bb): Likewise. + * loop-unswitch.c (compare_and_jump_seq): Likewise. + * config/rs6000/rs6000.c (rs6000_aix_emit_builtin_unwind_init): + Likewise. + * optabs.c (expand_doubleword_shift, expand_abs): Likewise. + * expr.c (expand_expr_real_1): Adjust do_jump, jumpifnot and + jumpifnot_1 callers. + (expand_expr_real_2): Adjust jumpifnot_1 and do_compare_rtx_and_jump + callers. + (store_expr): Adjust jumpifnot caller. + (store_constructor): Adjust jumpif caller. + + PR middle-end/42233 + * gimplify.c (gimple_boolify): For __builtin_expect call + gimple_boolify also on its first argument. + +--- gcc/expmed.c.jj 2009-12-31 11:53:14.000000000 +0100 ++++ gcc/expmed.c 2010-02-19 18:27:13.000000000 +0100 +@@ -5608,7 +5608,7 @@ emit_store_flag_force (rtx target, enum + emit_move_insn (target, const1_rtx); + label = gen_label_rtx (); + do_compare_rtx_and_jump (op0, op1, code, unsignedp, mode, NULL_RTX, +- NULL_RTX, label); ++ NULL_RTX, label, -1); + + emit_move_insn (target, const0_rtx); + emit_label (label); +@@ -5626,5 +5626,5 @@ do_cmp_and_jump (rtx arg1, rtx arg2, enu + { + int unsignedp = (op == LTU || op == LEU || op == GTU || op == GEU); + do_compare_rtx_and_jump (arg1, arg2, op, unsignedp, mode, +- NULL_RTX, NULL_RTX, label); ++ NULL_RTX, NULL_RTX, label, -1); + } +--- gcc/loop-unswitch.c.jj 2009-04-24 21:41:23.000000000 +0200 ++++ gcc/loop-unswitch.c 2010-02-19 18:27:10.000000000 +0100 +@@ -121,7 +121,7 @@ compare_and_jump_seq (rtx op0, rtx op1, + op0 = force_operand (op0, NULL_RTX); + op1 = force_operand (op1, NULL_RTX); + do_compare_rtx_and_jump (op0, op1, comp, 0, +- mode, NULL_RTX, NULL_RTX, label); ++ mode, NULL_RTX, NULL_RTX, label, -1); + jump = get_last_insn (); + JUMP_LABEL (jump) = label; + LABEL_NUSES (label)++; +--- gcc/dojump.c.jj 2009-06-03 16:08:37.000000000 +0200 ++++ gcc/dojump.c 2010-02-19 18:53:16.000000000 +0100 +@@ -35,12 +35,21 @@ along with GCC; see the file COPYING3. + #include "langhooks.h" + #include "ggc.h" + #include "basic-block.h" ++#include "output.h" + + static bool prefer_and_bit_test (enum machine_mode, int); +-static void do_jump_by_parts_greater (tree, int, rtx, rtx); +-static void do_jump_by_parts_equality (tree, rtx, rtx); ++static void do_jump_by_parts_greater (tree, int, rtx, rtx, int); ++static void do_jump_by_parts_equality (tree, rtx, rtx, int); + static void do_compare_and_jump (tree, enum rtx_code, enum rtx_code, rtx, +- rtx); ++ rtx, int); ++ ++/* Invert probability if there is any. -1 stands for unknown. */ ++ ++static inline int ++inv (int prob) ++{ ++ return prob == -1 ? -1 : REG_BR_PROB_BASE - prob; ++} + + /* At the start of a function, record that we have no previously-pushed + arguments waiting to be popped. */ +@@ -96,17 +105,17 @@ do_pending_stack_adjust (void) + functions here. */ + + void +-jumpifnot (tree exp, rtx label) ++jumpifnot (tree exp, rtx label, int prob) + { +- do_jump (exp, label, NULL_RTX); ++ do_jump (exp, label, NULL_RTX, inv (prob)); + } + + /* Generate code to evaluate EXP and jump to LABEL if the value is nonzero. */ + + void +-jumpif (tree exp, rtx label) ++jumpif (tree exp, rtx label, int prob) + { +- do_jump (exp, NULL_RTX, label); ++ do_jump (exp, NULL_RTX, label, prob); + } + + /* Used internally by prefer_and_bit_test. */ +@@ -156,10 +165,12 @@ prefer_and_bit_test (enum machine_mode m + + do_jump always does any pending stack adjust except when it does not + actually perform a jump. An example where there is no jump +- is when EXP is `(foo (), 0)' and IF_FALSE_LABEL is null. */ ++ is when EXP is `(foo (), 0)' and IF_FALSE_LABEL is null. ++ ++ PROB is probability of jump to if_true_label, or -1 if unknown. */ + + void +-do_jump (tree exp, rtx if_false_label, rtx if_true_label) ++do_jump (tree exp, rtx if_false_label, rtx if_true_label, int prob) + { + enum tree_code code = TREE_CODE (exp); + rtx temp; +@@ -206,11 +217,12 @@ do_jump (tree exp, rtx if_false_label, r + case LROTATE_EXPR: + case RROTATE_EXPR: + /* These cannot change zero->nonzero or vice versa. */ +- do_jump (TREE_OPERAND (exp, 0), if_false_label, if_true_label); ++ do_jump (TREE_OPERAND (exp, 0), if_false_label, if_true_label, prob); + break; + + case TRUTH_NOT_EXPR: +- do_jump (TREE_OPERAND (exp, 0), if_true_label, if_false_label); ++ do_jump (TREE_OPERAND (exp, 0), if_true_label, if_false_label, ++ inv (prob)); + break; + + case COND_EXPR: +@@ -226,10 +238,10 @@ do_jump (tree exp, rtx if_false_label, r + } + + do_pending_stack_adjust (); +- do_jump (TREE_OPERAND (exp, 0), label1, NULL_RTX); +- do_jump (TREE_OPERAND (exp, 1), if_false_label, if_true_label); ++ do_jump (TREE_OPERAND (exp, 0), label1, NULL_RTX, -1); ++ do_jump (TREE_OPERAND (exp, 1), if_false_label, if_true_label, prob); + emit_label (label1); +- do_jump (TREE_OPERAND (exp, 2), if_false_label, if_true_label); ++ do_jump (TREE_OPERAND (exp, 2), if_false_label, if_true_label, prob); + break; + } + +@@ -261,7 +273,8 @@ do_jump (tree exp, rtx if_false_label, r + && (optab_handler (cmp_optab, TYPE_MODE (type))->insn_code + != CODE_FOR_nothing)) + { +- do_jump (fold_convert (type, exp), if_false_label, if_true_label); ++ do_jump (fold_convert (type, exp), if_false_label, if_true_label, ++ prob); + break; + } + goto normal; +@@ -277,12 +290,14 @@ do_jump (tree exp, rtx if_false_label, r + != MODE_COMPLEX_INT); + + if (integer_zerop (TREE_OPERAND (exp, 1))) +- do_jump (TREE_OPERAND (exp, 0), if_true_label, if_false_label); ++ do_jump (TREE_OPERAND (exp, 0), if_true_label, if_false_label, ++ inv (prob)); + else if (GET_MODE_CLASS (TYPE_MODE (inner_type)) == MODE_INT + && !can_compare_p (EQ, TYPE_MODE (inner_type), ccp_jump)) +- do_jump_by_parts_equality (exp, if_false_label, if_true_label); ++ do_jump_by_parts_equality (exp, if_false_label, if_true_label, prob); + else +- do_compare_and_jump (exp, EQ, EQ, if_false_label, if_true_label); ++ do_compare_and_jump (exp, EQ, EQ, if_false_label, if_true_label, ++ prob); + break; + } + +@@ -302,12 +317,14 @@ do_jump (tree exp, rtx if_false_label, r + != MODE_COMPLEX_INT); + + if (integer_zerop (TREE_OPERAND (exp, 1))) +- do_jump (TREE_OPERAND (exp, 0), if_false_label, if_true_label); ++ do_jump (TREE_OPERAND (exp, 0), if_false_label, if_true_label, prob); + else if (GET_MODE_CLASS (TYPE_MODE (inner_type)) == MODE_INT + && !can_compare_p (NE, TYPE_MODE (inner_type), ccp_jump)) +- do_jump_by_parts_equality (exp, if_true_label, if_false_label); ++ do_jump_by_parts_equality (exp, if_true_label, if_false_label, ++ inv (prob)); + else +- do_compare_and_jump (exp, NE, NE, if_false_label, if_true_label); ++ do_compare_and_jump (exp, NE, NE, if_false_label, if_true_label, ++ prob); + break; + } + +@@ -315,36 +332,43 @@ do_jump (tree exp, rtx if_false_label, r + mode = TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp, 0))); + if (GET_MODE_CLASS (mode) == MODE_INT + && ! can_compare_p (LT, mode, ccp_jump)) +- do_jump_by_parts_greater (exp, 1, if_false_label, if_true_label); ++ do_jump_by_parts_greater (exp, 1, if_false_label, if_true_label, prob); + else +- do_compare_and_jump (exp, LT, LTU, if_false_label, if_true_label); ++ do_compare_and_jump (exp, LT, LTU, if_false_label, if_true_label, ++ prob); + break; + + case LE_EXPR: + mode = TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp, 0))); + if (GET_MODE_CLASS (mode) == MODE_INT + && ! can_compare_p (LE, mode, ccp_jump)) +- do_jump_by_parts_greater (exp, 0, if_true_label, if_false_label); ++ do_jump_by_parts_greater (exp, 0, if_true_label, if_false_label, ++ inv (prob)); + else +- do_compare_and_jump (exp, LE, LEU, if_false_label, if_true_label); ++ do_compare_and_jump (exp, LE, LEU, if_false_label, if_true_label, ++ prob); + break; + + case GT_EXPR: + mode = TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp, 0))); + if (GET_MODE_CLASS (mode) == MODE_INT + && ! can_compare_p (GT, mode, ccp_jump)) +- do_jump_by_parts_greater (exp, 0, if_false_label, if_true_label); ++ do_jump_by_parts_greater (exp, 0, if_false_label, if_true_label, ++ prob); + else +- do_compare_and_jump (exp, GT, GTU, if_false_label, if_true_label); ++ do_compare_and_jump (exp, GT, GTU, if_false_label, if_true_label, ++ prob); + break; + + case GE_EXPR: + mode = TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp, 0))); + if (GET_MODE_CLASS (mode) == MODE_INT + && ! can_compare_p (GE, mode, ccp_jump)) +- do_jump_by_parts_greater (exp, 1, if_true_label, if_false_label); ++ do_jump_by_parts_greater (exp, 1, if_true_label, if_false_label, ++ inv (prob)); + else +- do_compare_and_jump (exp, GE, GEU, if_false_label, if_true_label); ++ do_compare_and_jump (exp, GE, GEU, if_false_label, if_true_label, ++ prob); + break; + + case UNORDERED_EXPR: +@@ -368,9 +392,10 @@ do_jump (tree exp, rtx if_false_label, r + do_rev = 1; + + if (! do_rev) +- do_compare_and_jump (exp, cmp, cmp, if_false_label, if_true_label); ++ do_compare_and_jump (exp, cmp, cmp, if_false_label, if_true_label, prob); + else +- do_compare_and_jump (exp, rcmp, rcmp, if_true_label, if_false_label); ++ do_compare_and_jump (exp, rcmp, rcmp, if_true_label, if_false_label, ++ inv (prob)); + } + break; + +@@ -415,7 +440,7 @@ do_jump (tree exp, rtx if_false_label, r + mode = TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp, 0))); + if (can_compare_p (rcode1, mode, ccp_jump)) + do_compare_and_jump (exp, rcode1, rcode1, if_false_label, +- if_true_label); ++ if_true_label, prob); + else + { + tree op0 = save_expr (TREE_OPERAND (exp, 0)); +@@ -429,8 +454,8 @@ do_jump (tree exp, rtx if_false_label, r + + cmp0 = fold_build2 (tcode1, TREE_TYPE (exp), op0, op1); + cmp1 = fold_build2 (tcode2, TREE_TYPE (exp), op0, op1); +- do_jump (cmp0, 0, if_true_label); +- do_jump (cmp1, if_false_label, if_true_label); ++ do_jump (cmp0, 0, if_true_label, prob); ++ do_jump (cmp1, if_false_label, if_true_label, prob); + } + break; + } +@@ -443,6 +468,7 @@ do_jump (tree exp, rtx if_false_label, r + { + tree exp0 = TREE_OPERAND (exp, 0); + rtx set_label, clr_label; ++ int setclr_prob = prob; + + /* Strip narrowing integral type conversions. */ + while (CONVERT_EXPR_P (exp0) +@@ -458,6 +484,7 @@ do_jump (tree exp, rtx if_false_label, r + exp0 = TREE_OPERAND (exp0, 0); + clr_label = if_true_label; + set_label = if_false_label; ++ setclr_prob = inv (prob); + } + else + { +@@ -480,7 +507,7 @@ do_jump (tree exp, rtx if_false_label, r + = (unsigned HOST_WIDE_INT) 1 << TREE_INT_CST_LOW (shift); + do_jump (build2 (BIT_AND_EXPR, argtype, arg, + build_int_cst_wide_type (argtype, mask, 0)), +- clr_label, set_label); ++ clr_label, set_label, setclr_prob); + break; + } + } +@@ -503,7 +530,8 @@ do_jump (tree exp, rtx if_false_label, r + && (optab_handler (cmp_optab, TYPE_MODE (type))->insn_code + != CODE_FOR_nothing)) + { +- do_jump (fold_convert (type, exp), if_false_label, if_true_label); ++ do_jump (fold_convert (type, exp), if_false_label, if_true_label, ++ prob); + break; + } + +@@ -526,13 +554,13 @@ do_jump (tree exp, rtx if_false_label, r + if (if_false_label == NULL_RTX) + { + drop_through_label = gen_label_rtx (); +- do_jump (TREE_OPERAND (exp, 0), drop_through_label, NULL_RTX); +- do_jump (TREE_OPERAND (exp, 1), NULL_RTX, if_true_label); ++ do_jump (TREE_OPERAND (exp, 0), drop_through_label, NULL_RTX, prob); ++ do_jump (TREE_OPERAND (exp, 1), NULL_RTX, if_true_label, prob); + } + else + { +- do_jump (TREE_OPERAND (exp, 0), if_false_label, NULL_RTX); +- do_jump (TREE_OPERAND (exp, 1), if_false_label, if_true_label); ++ do_jump (TREE_OPERAND (exp, 0), if_false_label, NULL_RTX, prob); ++ do_jump (TREE_OPERAND (exp, 1), if_false_label, if_true_label, prob); + } + break; + +@@ -541,7 +569,7 @@ do_jump (tree exp, rtx if_false_label, r + /* High branch cost, expand as the bitwise OR of the conditions. + Do the same if the RHS has side effects, because we're effectively + turning a TRUTH_OR_EXPR into a TRUTH_ORIF_EXPR. */ +- if (BRANCH_COST (optimize_insn_for_speed_p (), false)>= 4 ++ if (BRANCH_COST (optimize_insn_for_speed_p (), false) >= 4 + || TREE_SIDE_EFFECTS (TREE_OPERAND (exp, 1))) + goto normal; + +@@ -549,13 +577,13 @@ do_jump (tree exp, rtx if_false_label, r + if (if_true_label == NULL_RTX) + { + drop_through_label = gen_label_rtx (); +- do_jump (TREE_OPERAND (exp, 0), NULL_RTX, drop_through_label); +- do_jump (TREE_OPERAND (exp, 1), if_false_label, NULL_RTX); ++ do_jump (TREE_OPERAND (exp, 0), NULL_RTX, drop_through_label, prob); ++ do_jump (TREE_OPERAND (exp, 1), if_false_label, NULL_RTX, prob); + } + else + { +- do_jump (TREE_OPERAND (exp, 0), NULL_RTX, if_true_label); +- do_jump (TREE_OPERAND (exp, 1), if_false_label, if_true_label); ++ do_jump (TREE_OPERAND (exp, 0), NULL_RTX, if_true_label, prob); ++ do_jump (TREE_OPERAND (exp, 1), if_false_label, if_true_label, prob); + } + break; + +@@ -577,7 +605,7 @@ do_jump (tree exp, rtx if_false_label, r + do_compare_rtx_and_jump (temp, CONST0_RTX (GET_MODE (temp)), + NE, TYPE_UNSIGNED (TREE_TYPE (exp)), + GET_MODE (temp), NULL_RTX, +- if_false_label, if_true_label); ++ if_false_label, if_true_label, prob); + } + + if (drop_through_label) +@@ -593,7 +621,8 @@ do_jump (tree exp, rtx if_false_label, r + + static void + do_jump_by_parts_greater_rtx (enum machine_mode mode, int unsignedp, rtx op0, +- rtx op1, rtx if_false_label, rtx if_true_label) ++ rtx op1, rtx if_false_label, rtx if_true_label, ++ int prob) + { + int nwords = (GET_MODE_SIZE (mode) / UNITS_PER_WORD); + rtx drop_through_label = 0; +@@ -625,11 +654,12 @@ do_jump_by_parts_greater_rtx (enum machi + /* All but high-order word must be compared as unsigned. */ + do_compare_rtx_and_jump (op0_word, op1_word, GT, + (unsignedp || i > 0), word_mode, NULL_RTX, +- NULL_RTX, if_true_label); ++ NULL_RTX, if_true_label, prob); + + /* Consider lower words only if these are equal. */ + do_compare_rtx_and_jump (op0_word, op1_word, NE, unsignedp, word_mode, +- NULL_RTX, NULL_RTX, if_false_label); ++ NULL_RTX, NULL_RTX, if_false_label, ++ inv (prob)); + } + + if (if_false_label) +@@ -645,7 +675,7 @@ do_jump_by_parts_greater_rtx (enum machi + + static void + do_jump_by_parts_greater (tree exp, int swap, rtx if_false_label, +- rtx if_true_label) ++ rtx if_true_label, int prob) + { + rtx op0 = expand_normal (TREE_OPERAND (exp, swap)); + rtx op1 = expand_normal (TREE_OPERAND (exp, !swap)); +@@ -653,7 +683,7 @@ do_jump_by_parts_greater (tree exp, int + int unsignedp = TYPE_UNSIGNED (TREE_TYPE (TREE_OPERAND (exp, 0))); + + do_jump_by_parts_greater_rtx (mode, unsignedp, op0, op1, if_false_label, +- if_true_label); ++ if_true_label, prob); + } + + /* Jump according to whether OP0 is 0. We assume that OP0 has an integer +@@ -663,7 +693,7 @@ do_jump_by_parts_greater (tree exp, int + + static void + do_jump_by_parts_zero_rtx (enum machine_mode mode, rtx op0, +- rtx if_false_label, rtx if_true_label) ++ rtx if_false_label, rtx if_true_label, int prob) + { + int nwords = GET_MODE_SIZE (mode) / UNITS_PER_WORD; + rtx part; +@@ -685,8 +715,7 @@ do_jump_by_parts_zero_rtx (enum machine_ + if (part != 0) + { + do_compare_rtx_and_jump (part, const0_rtx, EQ, 1, word_mode, +- NULL_RTX, if_false_label, if_true_label); +- ++ NULL_RTX, if_false_label, if_true_label, prob); + return; + } + +@@ -697,7 +726,7 @@ do_jump_by_parts_zero_rtx (enum machine_ + for (i = 0; i < nwords; i++) + do_compare_rtx_and_jump (operand_subword_force (op0, i, mode), + const0_rtx, EQ, 1, word_mode, NULL_RTX, +- if_false_label, NULL_RTX); ++ if_false_label, NULL_RTX, prob); + + if (if_true_label) + emit_jump (if_true_label); +@@ -713,7 +742,7 @@ do_jump_by_parts_zero_rtx (enum machine_ + + static void + do_jump_by_parts_equality_rtx (enum machine_mode mode, rtx op0, rtx op1, +- rtx if_false_label, rtx if_true_label) ++ rtx if_false_label, rtx if_true_label, int prob) + { + int nwords = (GET_MODE_SIZE (mode) / UNITS_PER_WORD); + rtx drop_through_label = 0; +@@ -721,12 +750,14 @@ do_jump_by_parts_equality_rtx (enum mach + + if (op1 == const0_rtx) + { +- do_jump_by_parts_zero_rtx (mode, op0, if_false_label, if_true_label); ++ do_jump_by_parts_zero_rtx (mode, op0, if_false_label, if_true_label, ++ prob); + return; + } + else if (op0 == const0_rtx) + { +- do_jump_by_parts_zero_rtx (mode, op1, if_false_label, if_true_label); ++ do_jump_by_parts_zero_rtx (mode, op1, if_false_label, if_true_label, ++ prob); + return; + } + +@@ -737,7 +768,7 @@ do_jump_by_parts_equality_rtx (enum mach + do_compare_rtx_and_jump (operand_subword_force (op0, i, mode), + operand_subword_force (op1, i, mode), + EQ, 0, word_mode, NULL_RTX, +- if_false_label, NULL_RTX); ++ if_false_label, NULL_RTX, prob); + + if (if_true_label) + emit_jump (if_true_label); +@@ -749,13 +780,14 @@ do_jump_by_parts_equality_rtx (enum mach + with one insn, test the comparison and jump to the appropriate label. */ + + static void +-do_jump_by_parts_equality (tree exp, rtx if_false_label, rtx if_true_label) ++do_jump_by_parts_equality (tree exp, rtx if_false_label, rtx if_true_label, ++ int prob) + { + rtx op0 = expand_normal (TREE_OPERAND (exp, 0)); + rtx op1 = expand_normal (TREE_OPERAND (exp, 1)); + enum machine_mode mode = TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp, 0))); + do_jump_by_parts_equality_rtx (mode, op0, op1, if_false_label, +- if_true_label); ++ if_true_label, prob); + } + + /* Generate code for a comparison of OP0 and OP1 with rtx code CODE. +@@ -825,7 +857,7 @@ compare_from_rtx (rtx op0, rtx op1, enum + void + do_compare_rtx_and_jump (rtx op0, rtx op1, enum rtx_code code, int unsignedp, + enum machine_mode mode, rtx size, rtx if_false_label, +- rtx if_true_label) ++ rtx if_true_label, int prob) + { + rtx tem; + int dummy_true_label = 0; +@@ -837,6 +869,7 @@ do_compare_rtx_and_jump (rtx op0, rtx op + if_true_label = if_false_label; + if_false_label = 0; + code = reverse_condition (code); ++ prob = inv (prob); + } + + /* If one operand is constant, make it the second one. Only do this +@@ -886,52 +919,56 @@ do_compare_rtx_and_jump (rtx op0, rtx op + { + case LTU: + do_jump_by_parts_greater_rtx (mode, 1, op1, op0, +- if_false_label, if_true_label); ++ if_false_label, if_true_label, prob); + break; + + case LEU: + do_jump_by_parts_greater_rtx (mode, 1, op0, op1, +- if_true_label, if_false_label); ++ if_true_label, if_false_label, ++ inv (prob)); + break; + + case GTU: + do_jump_by_parts_greater_rtx (mode, 1, op0, op1, +- if_false_label, if_true_label); ++ if_false_label, if_true_label, prob); + break; + + case GEU: + do_jump_by_parts_greater_rtx (mode, 1, op1, op0, +- if_true_label, if_false_label); ++ if_true_label, if_false_label, ++ inv (prob)); + break; + + case LT: + do_jump_by_parts_greater_rtx (mode, 0, op1, op0, +- if_false_label, if_true_label); ++ if_false_label, if_true_label, prob); + break; + + case LE: + do_jump_by_parts_greater_rtx (mode, 0, op0, op1, +- if_true_label, if_false_label); ++ if_true_label, if_false_label, ++ inv (prob)); + break; + + case GT: + do_jump_by_parts_greater_rtx (mode, 0, op0, op1, +- if_false_label, if_true_label); ++ if_false_label, if_true_label, prob); + break; + + case GE: + do_jump_by_parts_greater_rtx (mode, 0, op1, op0, +- if_true_label, if_false_label); ++ if_true_label, if_false_label, ++ inv (prob)); + break; + + case EQ: + do_jump_by_parts_equality_rtx (mode, op0, op1, if_false_label, +- if_true_label); ++ if_true_label, prob); + break; + + case NE: + do_jump_by_parts_equality_rtx (mode, op0, op1, if_true_label, +- if_false_label); ++ if_false_label, inv (prob)); + break; + + default: +@@ -939,8 +976,32 @@ do_compare_rtx_and_jump (rtx op0, rtx op + } + } + else +- emit_cmp_and_jump_insns (op0, op1, code, size, mode, unsignedp, +- if_true_label); ++ { ++ rtx last = get_last_insn (); ++ emit_cmp_and_jump_insns (op0, op1, code, size, mode, unsignedp, ++ if_true_label); ++ if (prob != -1 && profile_status != PROFILE_ABSENT) ++ { ++ for (last = NEXT_INSN (last); ++ last && NEXT_INSN (last); ++ last = NEXT_INSN (last)) ++ if (JUMP_P (last)) ++ break; ++ if (!last ++ || !JUMP_P (last) ++ || NEXT_INSN (last) ++ || !any_condjump_p (last)) ++ { ++ if (dump_file) ++ fprintf (dump_file, "Failed to add probability note\n"); ++ } ++ else ++ { ++ gcc_assert (!find_reg_note (last, REG_BR_PROB, 0)); ++ add_reg_note (last, REG_BR_PROB, GEN_INT (prob)); ++ } ++ } ++ } + + if (if_false_label) + emit_jump (if_false_label); +@@ -961,7 +1022,7 @@ do_compare_rtx_and_jump (rtx op0, rtx op + static void + do_compare_and_jump (tree exp, enum rtx_code signed_code, + enum rtx_code unsigned_code, rtx if_false_label, +- rtx if_true_label) ++ rtx if_true_label, int prob) + { + rtx op0, op1; + tree type; +@@ -1022,7 +1083,7 @@ do_compare_and_jump (tree exp, enum rtx_ + do_compare_rtx_and_jump (op0, op1, code, unsignedp, mode, + ((mode == BLKmode) + ? expr_size (TREE_OPERAND (exp, 0)) : NULL_RTX), +- if_false_label, if_true_label); ++ if_false_label, if_true_label, prob); + } + + #include "gt-dojump.h" +--- gcc/expr.h.jj 2009-04-24 21:41:31.000000000 +0200 ++++ gcc/expr.h 2010-02-19 18:31:34.000000000 +0100 +@@ -564,20 +564,20 @@ extern void do_pending_stack_adjust (voi + extern tree string_constant (tree, tree *); + + /* Generate code to evaluate EXP and jump to LABEL if the value is zero. */ +-extern void jumpifnot (tree, rtx); ++extern void jumpifnot (tree, rtx, int); + + /* Generate code to evaluate EXP and jump to LABEL if the value is nonzero. */ +-extern void jumpif (tree, rtx); ++extern void jumpif (tree, rtx, int); + + /* Generate code to evaluate EXP and jump to IF_FALSE_LABEL if + the result is zero, or IF_TRUE_LABEL if the result is one. */ +-extern void do_jump (tree, rtx, rtx); ++extern void do_jump (tree, rtx, rtx, int); + + /* Generate rtl to compare two rtx's, will call emit_cmp_insn. */ + extern rtx compare_from_rtx (rtx, rtx, enum rtx_code, int, enum machine_mode, + rtx); + extern void do_compare_rtx_and_jump (rtx, rtx, enum rtx_code, int, +- enum machine_mode, rtx, rtx, rtx); ++ enum machine_mode, rtx, rtx, rtx, int); + + /* Two different ways of generating switch statements. */ + extern int try_casesi (tree, tree, tree, tree, rtx, rtx, rtx); +--- gcc/cfgrtl.c.jj 2009-05-28 12:50:54.000000000 +0200 ++++ gcc/cfgrtl.c 2010-02-19 18:27:14.000000000 +0100 +@@ -2951,7 +2951,7 @@ rtl_lv_add_condition_to_bb (basic_block + op0 = force_operand (op0, NULL_RTX); + op1 = force_operand (op1, NULL_RTX); + do_compare_rtx_and_jump (op0, op1, comp, 0, +- mode, NULL_RTX, NULL_RTX, label); ++ mode, NULL_RTX, NULL_RTX, label, -1); + jump = get_last_insn (); + JUMP_LABEL (jump) = label; + LABEL_NUSES (label)++; +--- gcc/except.c.jj 2009-04-24 21:41:34.000000000 +0200 ++++ gcc/except.c 2010-02-19 18:27:14.000000000 +0100 +@@ -1834,7 +1834,7 @@ sjlj_emit_function_enter (rtx dispatch_l + + #ifdef DONT_USE_BUILTIN_SETJMP + { +- rtx x; ++ rtx x, last; + x = emit_library_call_value (setjmp_libfunc, NULL_RTX, LCT_RETURNS_TWICE, + TYPE_MODE (integer_type_node), 1, + plus_constant (XEXP (fc, 0), +@@ -1842,7 +1842,12 @@ sjlj_emit_function_enter (rtx dispatch_l + + emit_cmp_and_jump_insns (x, const0_rtx, NE, 0, + TYPE_MODE (integer_type_node), 0, dispatch_label); +- add_reg_br_prob_note (get_insns (), REG_BR_PROB_BASE/100); ++ last = get_last_insn (); ++ if (JUMP_P (last) && any_condjump_p (last)) ++ { ++ gcc_assert (!find_reg_note (last, REG_BR_PROB, 0)); ++ add_reg_note (last, REG_BR_PROB, GEN_INT (REG_BR_PROB_BASE / 100)); ++ } + } + #else + expand_builtin_setjmp_setup (plus_constant (XEXP (fc, 0), sjlj_fc_jbuf_ofs), +--- gcc/config/rs6000/rs6000.c.jj 2009-09-29 17:58:03.000000000 +0200 ++++ gcc/config/rs6000/rs6000.c 2010-02-19 18:27:13.000000000 +0100 +@@ -15534,7 +15534,7 @@ rs6000_aix_emit_builtin_unwind_init (voi + + do_compare_rtx_and_jump (opcode, tocompare, EQ, 1, + SImode, NULL_RTX, NULL_RTX, +- no_toc_save_needed); ++ no_toc_save_needed, -1); + + mem = gen_frame_mem (Pmode, + gen_rtx_PLUS (Pmode, stack_top, +--- gcc/stmt.c.jj 2009-04-27 13:45:10.000000000 +0200 ++++ gcc/stmt.c 2010-02-19 18:27:14.000000000 +0100 +@@ -2472,7 +2472,7 @@ do_jump_if_equal (enum machine_mode mode + int unsignedp) + { + do_compare_rtx_and_jump (op0, op1, EQ, unsignedp, mode, +- NULL_RTX, NULL_RTX, label); ++ NULL_RTX, NULL_RTX, label, -1); + } + + /* Not all case values are encountered equally. This function +--- gcc/Makefile.in.jj 2009-07-28 18:00:54.000000000 +0200 ++++ gcc/Makefile.in 2010-02-19 18:27:13.000000000 +0100 +@@ -2514,7 +2514,7 @@ expr.o : expr.c $(CONFIG_H) $(SYSTEM_H) + tree-pass.h $(DF_H) $(DIAGNOSTIC_H) vecprim.h + dojump.o : dojump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \ + $(FLAGS_H) $(FUNCTION_H) $(EXPR_H) $(OPTABS_H) $(INSN_ATTR_H) insn-config.h \ +- langhooks.h $(GGC_H) gt-dojump.h vecprim.h $(BASIC_BLOCK_H) ++ langhooks.h $(GGC_H) gt-dojump.h vecprim.h $(BASIC_BLOCK_H) output.h + builtins.o : builtins.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ + $(TREE_H) $(GIMPLE_H) $(FLAGS_H) $(TARGET_H) $(FUNCTION_H) $(REGS_H) \ + $(EXPR_H) $(OPTABS_H) insn-config.h $(RECOG_H) output.h typeclass.h \ +--- gcc/cfgexpand.c.jj 2010-01-05 09:56:05.000000000 +0100 ++++ gcc/cfgexpand.c 2010-02-19 18:34:14.000000000 +0100 +@@ -379,46 +379,6 @@ release_stmt_tree (gimple stmt, tree stm + } + + +-/* Verify that there is exactly single jump instruction since last and attach +- REG_BR_PROB note specifying probability. +- ??? We really ought to pass the probability down to RTL expanders and let it +- re-distribute it when the conditional expands into multiple conditionals. +- This is however difficult to do. */ +-void +-add_reg_br_prob_note (rtx last, int probability) +-{ +- if (profile_status == PROFILE_ABSENT) +- return; +- for (last = NEXT_INSN (last); last && NEXT_INSN (last); last = NEXT_INSN (last)) +- if (JUMP_P (last)) +- { +- /* It is common to emit condjump-around-jump sequence when we don't know +- how to reverse the conditional. Special case this. */ +- if (!any_condjump_p (last) +- || !JUMP_P (NEXT_INSN (last)) +- || !simplejump_p (NEXT_INSN (last)) +- || !NEXT_INSN (NEXT_INSN (last)) +- || !BARRIER_P (NEXT_INSN (NEXT_INSN (last))) +- || !NEXT_INSN (NEXT_INSN (NEXT_INSN (last))) +- || !LABEL_P (NEXT_INSN (NEXT_INSN (NEXT_INSN (last)))) +- || NEXT_INSN (NEXT_INSN (NEXT_INSN (NEXT_INSN (last))))) +- goto failed; +- gcc_assert (!find_reg_note (last, REG_BR_PROB, 0)); +- add_reg_note (last, REG_BR_PROB, +- GEN_INT (REG_BR_PROB_BASE - probability)); +- return; +- } +- if (!last || !JUMP_P (last) || !any_condjump_p (last)) +- goto failed; +- gcc_assert (!find_reg_note (last, REG_BR_PROB, 0)); +- add_reg_note (last, REG_BR_PROB, GEN_INT (probability)); +- return; +-failed: +- if (dump_file) +- fprintf (dump_file, "Failed to add probability note\n"); +-} +- +- + #ifndef STACK_ALIGNMENT_NEEDED + #define STACK_ALIGNMENT_NEEDED 1 + #endif +@@ -1669,8 +1629,8 @@ expand_gimple_cond (basic_block bb, gimp + two-way jump that needs to be decomposed into two basic blocks. */ + if (false_edge->dest == bb->next_bb) + { +- jumpif (pred, label_rtx_for_bb (true_edge->dest)); +- add_reg_br_prob_note (last, true_edge->probability); ++ jumpif (pred, label_rtx_for_bb (true_edge->dest), ++ true_edge->probability); + maybe_dump_rtl_for_gimple_stmt (stmt, last); + if (true_edge->goto_locus) + { +@@ -1685,8 +1645,8 @@ expand_gimple_cond (basic_block bb, gimp + } + if (true_edge->dest == bb->next_bb) + { +- jumpifnot (pred, label_rtx_for_bb (false_edge->dest)); +- add_reg_br_prob_note (last, false_edge->probability); ++ jumpifnot (pred, label_rtx_for_bb (false_edge->dest), ++ false_edge->probability); + maybe_dump_rtl_for_gimple_stmt (stmt, last); + if (false_edge->goto_locus) + { +@@ -1700,8 +1660,7 @@ expand_gimple_cond (basic_block bb, gimp + return NULL; + } + +- jumpif (pred, label_rtx_for_bb (true_edge->dest)); +- add_reg_br_prob_note (last, true_edge->probability); ++ jumpif (pred, label_rtx_for_bb (true_edge->dest), true_edge->probability); + last = get_last_insn (); + if (false_edge->goto_locus) + { +--- gcc/gimplify.c.jj 2010-02-08 13:15:22.000000000 +0100 ++++ gcc/gimplify.c 2010-02-19 19:19:54.000000000 +0100 +@@ -2762,6 +2762,32 @@ gimple_boolify (tree expr) + { + tree type = TREE_TYPE (expr); + ++ if (TREE_CODE (expr) == NE_EXPR ++ && TREE_CODE (TREE_OPERAND (expr, 0)) == CALL_EXPR ++ && integer_zerop (TREE_OPERAND (expr, 1))) ++ { ++ tree call = TREE_OPERAND (expr, 0); ++ tree fn = get_callee_fndecl (call); ++ ++ /* For __builtin_expect ((long) (x), y) recurse into x as well. */ ++ if (fn ++ && DECL_BUILT_IN_CLASS (fn) == BUILT_IN_NORMAL ++ && DECL_FUNCTION_CODE (fn) == BUILT_IN_EXPECT ++ && call_expr_nargs (call) == 2) ++ { ++ tree arg = CALL_EXPR_ARG (call, 0); ++ if (arg) ++ { ++ if (TREE_CODE (arg) == NOP_EXPR ++ && TREE_TYPE (arg) == TREE_TYPE (call)) ++ arg = TREE_OPERAND (arg, 0); ++ arg = gimple_boolify (arg); ++ CALL_EXPR_ARG (call, 0) ++ = fold_convert (TREE_TYPE (call), arg); ++ } ++ } ++ } ++ + if (TREE_CODE (type) == BOOLEAN_TYPE) + return expr; + +--- gcc/expr.c.jj 2010-01-16 10:44:34.000000000 +0100 ++++ gcc/expr.c 2010-02-19 18:32:25.000000000 +0100 +@@ -4483,7 +4483,7 @@ store_expr (tree exp, rtx target, int ca + + do_pending_stack_adjust (); + NO_DEFER_POP; +- jumpifnot (TREE_OPERAND (exp, 0), lab1); ++ jumpifnot (TREE_OPERAND (exp, 0), lab1, -1); + store_expr (TREE_OPERAND (exp, 1), target, call_param_p, + nontemporal); + emit_jump_insn (gen_jump (lab2)); +@@ -5503,7 +5503,7 @@ store_constructor (tree exp, rtx target, + /* Generate a conditional jump to exit the loop. */ + exit_cond = build2 (LT_EXPR, integer_type_node, + index, hi_index); +- jumpif (exit_cond, loop_end); ++ jumpif (exit_cond, loop_end, -1); + + /* Update the loop counter, and jump to the head of + the loop. */ +@@ -8974,7 +8974,8 @@ expand_expr_real_1 (tree exp, rtx target + + temp = gen_label_rtx (); + do_compare_rtx_and_jump (target, cmpop1, comparison_code, +- unsignedp, mode, NULL_RTX, NULL_RTX, temp); ++ unsignedp, mode, NULL_RTX, NULL_RTX, temp, ++ -1); + } + emit_move_insn (target, op1); + emit_label (temp); +@@ -9125,7 +9126,7 @@ expand_expr_real_1 (tree exp, rtx target + emit_move_insn (target, const0_rtx); + + op1 = gen_label_rtx (); +- jumpifnot (exp, op1); ++ jumpifnot (exp, op1, -1); + + if (target) + emit_move_insn (target, const1_rtx); +@@ -9194,7 +9195,7 @@ expand_expr_real_1 (tree exp, rtx target + NO_DEFER_POP; + op0 = gen_label_rtx (); + op1 = gen_label_rtx (); +- jumpifnot (TREE_OPERAND (exp, 0), op0); ++ jumpifnot (TREE_OPERAND (exp, 0), op0, -1); + store_expr (TREE_OPERAND (exp, 1), temp, + modifier == EXPAND_STACK_PARM, + false); +@@ -9240,7 +9241,7 @@ expand_expr_real_1 (tree exp, rtx target + int value = TREE_CODE (rhs) == BIT_IOR_EXPR; + do_jump (TREE_OPERAND (rhs, 1), + value ? label : 0, +- value ? 0 : label); ++ value ? 0 : label, -1); + expand_assignment (lhs, build_int_cst (TREE_TYPE (rhs), value), + MOVE_NONTEMPORAL (exp)); + do_pending_stack_adjust (); +@@ -9924,7 +9925,7 @@ do_store_flag (tree exp, rtx target, enu + emit_move_insn (target, invert ? const0_rtx : const1_rtx); + label = gen_label_rtx (); + do_compare_rtx_and_jump (op0, op1, code, unsignedp, operand_mode, NULL_RTX, +- NULL_RTX, label); ++ NULL_RTX, label, -1); + + emit_move_insn (target, invert ? const1_rtx : const0_rtx); + emit_label (label); +--- gcc/optabs.c.jj 2009-04-24 21:41:23.000000000 +0200 ++++ gcc/optabs.c 2010-02-19 18:27:10.000000000 +0100 +@@ -1149,7 +1149,7 @@ expand_doubleword_shift (enum machine_mo + + NO_DEFER_POP; + do_compare_rtx_and_jump (cmp1, cmp2, cmp_code, false, op1_mode, +- 0, 0, subword_label); ++ 0, 0, subword_label, -1); + OK_DEFER_POP; + + if (!expand_superword_shift (binoptab, outof_input, superword_op1, +@@ -3498,7 +3498,7 @@ expand_abs (enum machine_mode mode, rtx + NO_DEFER_POP; + + do_compare_rtx_and_jump (target, CONST0_RTX (mode), GE, 0, mode, +- NULL_RTX, NULL_RTX, op1); ++ NULL_RTX, NULL_RTX, op1, -1); + + op0 = expand_unop (mode, result_unsignedp ? neg_optab : negv_optab, + target, target, 0); +--- gcc/rtl.h.jj 2009-04-27 16:47:34.000000000 +0200 ++++ gcc/rtl.h 2010-02-19 18:27:14.000000000 +0100 +@@ -2305,8 +2305,6 @@ extern GTY(()) rtx stack_limit_rtx; + /* In predict.c */ + extern void invert_br_probabilities (rtx); + extern bool expensive_function_p (int); +-/* In cfgexpand.c */ +-extern void add_reg_br_prob_note (rtx last, int probability); + + /* In var-tracking.c */ + extern unsigned int variable_tracking_main (void); +--- gcc/loop-doloop.c.jj 2009-04-24 21:41:33.000000000 +0200 ++++ gcc/loop-doloop.c 2010-02-19 18:27:14.000000000 +0100 +@@ -291,7 +291,8 @@ add_test (rtx cond, edge *e, basic_block + op0 = force_operand (op0, NULL_RTX); + op1 = force_operand (op1, NULL_RTX); + label = block_label (dest); +- do_compare_rtx_and_jump (op0, op1, code, 0, mode, NULL_RTX, NULL_RTX, label); ++ do_compare_rtx_and_jump (op0, op1, code, 0, mode, NULL_RTX, ++ NULL_RTX, label, -1); + + jump = get_last_insn (); + if (!jump || !JUMP_P (jump)) diff --git a/gcc44-pr43051.patch b/gcc44-pr43051.patch new file mode 100644 index 0000000..c4425ae --- /dev/null +++ b/gcc44-pr43051.patch @@ -0,0 +1,331 @@ +2010-02-17 Alexandre Oliva + + * var-tracking.c (dataflow_set_preserve_mem_locs): Update cur_loc. + +2010-02-17 Jakub Jelinek + + PR debug/43051 + * var-tracking.c (struct dfset_merge): Move definition earlier. + (value_pair): New variable. + (ignore_first_value_pair): New function. + (find_loc_in_1pdv_1): Change last argument to struct dfset_merge *. + If node->loc is VALUE, don't call rtx_equal_p at all, instead just + compare pointers and then recurse. For other rtxes, call + rtx_equal_p_cb instead of rtx_equal_p and ignore first VALUE pair + during comparison, if some has been found, compare those VALUEs + recursively. + (find_loc_in_1pdv): Change last argument to struct dfset_merge *. + (intersect_loc_chains, variable_post_merge_perm_vals): Adjust callers. + + * gcc.dg/guality/pr43051-1.c: New test. + +--- gcc/var-tracking.c.jj 2010-02-07 11:53:22.000000000 +0100 ++++ gcc/var-tracking.c 2010-02-15 12:37:00.000000000 +0100 +@@ -428,7 +428,8 @@ static int variable_union_info_cmp_pos ( + static int variable_union (void **, void *); + static int variable_canonicalize (void **, void *); + static void dataflow_set_union (dataflow_set *, dataflow_set *); +-static location_chain find_loc_in_1pdv (rtx, variable, htab_t); ++struct dfset_merge; ++static location_chain find_loc_in_1pdv (rtx, variable, struct dfset_merge *); + static bool canon_value_cmp (rtx, rtx); + static int loc_cmp (rtx, rtx); + static bool variable_part_different_p (variable_part *, variable_part *); +@@ -2234,6 +2235,53 @@ dv_changed_p (decl_or_value dv) + : DECL_CHANGED (dv_as_decl (dv))); + } + ++/* Hash table iteration argument passed to variable_merge. */ ++struct dfset_merge ++{ ++ /* The set in which the merge is to be inserted. */ ++ dataflow_set *dst; ++ /* The set that we're iterating in. */ ++ dataflow_set *cur; ++ /* The set that may contain the other dv we are to merge with. */ ++ dataflow_set *src; ++ /* Number of onepart dvs in src. */ ++ int src_onepart_cnt; ++}; ++ ++/* First encountered differing VALUE pair remembered by ++ ignore_first_value_pair hook. */ ++ ++static rtx value_pair[2]; ++ ++/* Helper for rtx_equal_p_cb. Pretend the first encountered VALUE pair ++ is the same and remember it. */ ++ ++static int ++ignore_first_value_pair (const_rtx *px, const_rtx *py, rtx *nx, rtx *ny) ++{ ++ const_rtx x = *px, y; ++ ++ if (GET_CODE (x) != VALUE) ++ return 0; ++ y = *py; ++ if (GET_CODE (y) != VALUE) ++ return 0; ++ if (x == y) ++ return 0; ++ if (GET_MODE (x) != GET_MODE (y)) ++ return 0; ++ /* If this isn't the first encountered VALUE pair, fail. */ ++ if (value_pair[0]) ++ return 0; ++ /* Remember the first encountered VALUE pair and pretend the VALUEs are the ++ same. */ ++ value_pair[0] = CONST_CAST_RTX (x); ++ value_pair[1] = CONST_CAST_RTX (y); ++ *nx = CONST_CAST_RTX (x); ++ *ny = CONST_CAST_RTX (x); ++ return 1; ++} ++ + /* Vector of VALUEs that should have VALUE_RECURSED_INTO bit cleared + at the end of find_loc_in_1pdv. Not a static variable in find_loc_in_1pdv + to avoid constant allocation/freeing of it. */ +@@ -2245,7 +2293,7 @@ static VEC(rtx, heap) *values_to_unmark; + any values recursively mentioned in the location lists. */ + + static location_chain +-find_loc_in_1pdv_1 (rtx loc, variable var, htab_t vars) ++find_loc_in_1pdv_1 (rtx loc, variable var, struct dfset_merge *dsm) + { + location_chain node; + +@@ -2260,22 +2308,65 @@ find_loc_in_1pdv_1 (rtx loc, variable va + gcc_assert (var->var_part[0].offset == 0); + + for (node = var->var_part[0].loc_chain; node; node = node->next) +- if (rtx_equal_p (loc, node->loc)) +- return node; +- else if (GET_CODE (node->loc) == VALUE +- && !VALUE_RECURSED_INTO (node->loc)) ++ if (GET_CODE (node->loc) == VALUE) + { +- decl_or_value dv = dv_from_value (node->loc); +- variable var = (variable) +- htab_find_with_hash (vars, dv, dv_htab_hash (dv)); ++ if (loc == node->loc) ++ return node; ++ if (!VALUE_RECURSED_INTO (node->loc)) ++ { ++ decl_or_value dv = dv_from_value (node->loc); ++ htab_t vars = shared_hash_htab (dsm->src->vars); ++ variable var ++ = (variable) htab_find_with_hash (vars, dv, dv_htab_hash (dv)); + +- if (var) ++ if (var) ++ { ++ location_chain where; ++ VALUE_RECURSED_INTO (node->loc) = true; ++ VEC_safe_push (rtx, heap, values_to_unmark, node->loc); ++ if ((where = find_loc_in_1pdv_1 (loc, var, dsm))) ++ return where; ++ } ++ } ++ } ++ else if (GET_CODE (node->loc) == GET_CODE (loc)) ++ { ++ rtx val1, val2; ++ if (!rtx_equal_p_cb (loc, node->loc, ignore_first_value_pair)) + { +- location_chain where; +- VALUE_RECURSED_INTO (node->loc) = true; +- VEC_safe_push (rtx, heap, values_to_unmark, node->loc); +- if ((where = find_loc_in_1pdv_1 (loc, var, vars))) +- return where; ++ value_pair[0] = NULL; ++ value_pair[1] = NULL; ++ continue; ++ } ++ if (!value_pair[0]) ++ return node; ++ val1 = value_pair[0]; ++ val2 = value_pair[1]; ++ value_pair[0] = NULL; ++ value_pair[1] = NULL; ++ if (dsm->cur) ++ { ++ decl_or_value dv; ++ htab_t vars; ++ variable var1, var2; ++ dv = dv_from_value (val1); ++ vars = shared_hash_htab (dsm->cur->vars); ++ var1 = (variable) htab_find_with_hash (vars, dv, ++ dv_htab_hash (dv)); ++ if (var1) ++ { ++ dv = dv_from_value (val2); ++ vars = shared_hash_htab (dsm->src->vars); ++ var2 = (variable) htab_find_with_hash (vars, dv, ++ dv_htab_hash (dv)); ++ if (var2) ++ { ++ location_chain s1node = var1->var_part[0].loc_chain; ++ for (; s1node; s1node = s1node->next) ++ if (find_loc_in_1pdv_1 (s1node->loc, var2, dsm)) ++ return node; ++ } ++ } + } + } + +@@ -2287,32 +2378,19 @@ find_loc_in_1pdv_1 (rtx loc, variable va + any values recursively mentioned in the location lists. */ + + static location_chain +-find_loc_in_1pdv (rtx loc, variable var, htab_t vars) ++find_loc_in_1pdv (rtx loc, variable var, struct dfset_merge *dsm) + { + location_chain ret; + unsigned int i; + rtx value; + +- ret = find_loc_in_1pdv_1 (loc, var, vars); ++ ret = find_loc_in_1pdv_1 (loc, var, dsm); + for (i = 0; VEC_iterate (rtx, values_to_unmark, i, value); i++) + VALUE_RECURSED_INTO (value) = false; + VEC_truncate (rtx, values_to_unmark, 0); + return ret; + } + +-/* Hash table iteration argument passed to variable_merge. */ +-struct dfset_merge +-{ +- /* The set in which the merge is to be inserted. */ +- dataflow_set *dst; +- /* The set that we're iterating in. */ +- dataflow_set *cur; +- /* The set that may contain the other dv we are to merge with. */ +- dataflow_set *src; +- /* Number of onepart dvs in src. */ +- int src_onepart_cnt; +-}; +- + /* Insert LOC in *DNODE, if it's not there yet. The list must be in + loc_cmp order, and it is maintained as such. */ + +@@ -2351,7 +2429,6 @@ intersect_loc_chains (rtx val, location_ + location_chain s1node, variable s2var) + { + dataflow_set *s1set = dsm->cur; +- dataflow_set *s2set = dsm->src; + location_chain found; + + for (; s1node; s1node = s1node->next) +@@ -2359,8 +2436,7 @@ intersect_loc_chains (rtx val, location_ + if (s1node->loc == val) + continue; + +- if ((found = find_loc_in_1pdv (s1node->loc, s2var, +- shared_hash_htab (s2set->vars)))) ++ if ((found = find_loc_in_1pdv (s1node->loc, s2var, dsm))) + { + insert_into_intersection (dest, s1node->loc, + MIN (s1node->init, found->init)); +@@ -3592,7 +3668,10 @@ variable_post_merge_perm_vals (void **ps + var = shared_hash_find (set->vars, dv); + if (var) + { +- if (find_loc_in_1pdv (pnode->loc, var, shared_hash_htab (set->vars))) ++ struct dfset_merge dsm; ++ memset (&dsm, '\0', sizeof (dsm)); ++ dsm.src = set; ++ if (find_loc_in_1pdv (pnode->loc, var, &dsm)) + return 1; + val_reset (set, dv); + } +@@ -3808,6 +3808,7 @@ dataflow_set_preserve_mem_locs (void **s + { + tree decl = dv_as_decl (var->dv); + location_chain loc, *locp; ++ bool changed = false; + + if (!var->n_var_parts) + return 1; +@@ -3881,6 +3882,9 @@ dataflow_set_preserve_mem_locs (void **s + if (emit_notes) + remove_value_chains (var->dv, old_loc); + *locp = loc->next; ++ if (var->var_part[0].cur_loc ++ && rtx_equal_p (loc->loc, var->var_part[0].cur_loc)) ++ changed = true; + pool_free (loc_chain_pool, loc); + } + +@@ -3889,6 +3893,12 @@ dataflow_set_preserve_mem_locs (void **s + var->n_var_parts--; + if (emit_notes && dv_is_value_p (var->dv)) + remove_cselib_value_chains (var->dv); ++ gcc_assert (changed); ++ } ++ if (changed) ++ { ++ if (var->n_var_parts && var->var_part[0].loc_chain) ++ var->var_part[0].cur_loc = var->var_part[0].loc_chain->loc; + variable_was_changed (var, set); + } + } +--- gcc/testsuite/gcc.dg/guality/pr43051-1.c.jj 2010-02-17 10:17:12.000000000 +0100 ++++ gcc/testsuite/gcc.dg/guality/pr43051-1.c 2010-02-17 10:41:43.000000000 +0100 +@@ -0,0 +1,57 @@ ++/* PR debug/43051 */ ++/* { dg-do run } */ ++/* { dg-options "-g" } */ ++ ++extern void abort (void); ++ ++static void __attribute__ ((noinline)) ++foo (const char *x, long long y, int z) ++{ ++ asm volatile ("" : : "r" (x), "r" ((int) y), "r" (z) : "memory"); ++} ++ ++struct S ++{ ++ struct S *n; ++ int v; ++}; ++ ++struct S a[10]; ++ ++struct S * __attribute__ ((noinline)) ++bar (struct S *c, int v, struct S *e) ++{ ++#ifdef __i386__ ++ register int si asm ("esi"), di asm ("edi"), bx ++# if !defined (__pic__) && !defined (__APPLE__) ++ asm ("ebx") ++# endif ++ ; ++ asm volatile ("" : "=r" (si), "=r" (di), "=r" (bx)); ++#endif ++ while (c < e) ++ { ++ foo ("c", (unsigned long) c, 0); /* { dg-final { gdb-test 34 "c" "\&a\[0\]" } } */ ++ foo ("v", v, 1); /* { dg-final { gdb-test 35 "v" "1" } } */ ++ foo ("e", (unsigned long) e, 2); /* { dg-final { gdb-test 36 "e" "\&a\[1\]" } } */ ++ if (c->v == v) ++ return c; ++ foo ("c", (unsigned long) c, 3); /* { dg-final { gdb-test 39 "c" "\&a\[0\]" } } */ ++ foo ("v", v, 4); /* { dg-final { gdb-test 40 "v" "1" } } */ ++ foo ("e", (unsigned long) e, 5); /* { dg-final { gdb-test 41 "e" "\&a\[1\]" } } */ ++ c++; ++ } ++#ifdef __i386__ ++ asm volatile ("" : : "r" (si), "r" (di), "r" (bx)); ++#endif ++ return 0; ++} ++ ++int ++main () ++{ ++ asm volatile ("" : : "r" (&a[0]) : "memory"); ++ if (bar (&a[a[0].v], a[0].v + 1, &a[a[0].v + 1])) ++ abort (); ++ return 0; ++} diff --git a/gcc44-sparc-config-detection.patch b/gcc44-sparc-config-detection.patch index cc3cb41..9c6b57e 100644 --- a/gcc44-sparc-config-detection.patch +++ b/gcc44-sparc-config-detection.patch @@ -6,7 +6,7 @@ ;; -sparc-*-linux*) # SPARC's running GNU/Linux, libc6 +sparc-*-linux* | sparcv9*-*-linux*) # SPARC's running GNU/Linux, libc6 - tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h linux.h" + tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/gas.h linux.h" extra_options="${extra_options} sparc/long-double-switch.opt" tmake_file="${tmake_file} sparc/t-linux" @@ -2287,7 +2287,7 @@ sparc64-*-freebsd*|ultrasparc-*-freebsd* @@ -15,7 +15,7 @@ ;; -sparc64-*-linux*) # 64-bit SPARC's running GNU/Linux +sparc64*-*-linux*) # 64-bit SPARC's running GNU/Linux - tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h linux.h sparc/linux64.h" + tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/gas.h linux.h sparc/linux64.h" extra_options="${extra_options} sparc/long-double-switch.opt" tmake_file="${tmake_file} sparc/t-linux sparc/t-linux64 sparc/t-crtfm" --- libgcc/config.host.jj 2008-04-24 15:46:19.000000000 -0500 diff --git a/import.log b/import.log index dca725e..2664ddd 100644 --- a/import.log +++ b/import.log @@ -7,3 +7,4 @@ gcc-4_4_3-1_fc13:HEAD:gcc-4.4.3-1.fc13.src.rpm:1264094717 gcc-4_4_3-4_fc13:HEAD:gcc-4.4.3-4.fc13.src.rpm:1264621537 gcc-4_4_3-5_fc13:HEAD:gcc-4.4.3-5.fc13.src.rpm:1265659730 gcc-4_4_3-6_fc13:HEAD:gcc-4.4.3-6.fc13.src.rpm:1265925505 +gcc-4_4_3-7_fc13:F-13:gcc-4.4.3-7.fc13.src.rpm:1266793373 diff --git a/sources b/sources index b9841eb..82bd137 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz -080254256e618fa9f8f28e03698b016a gcc-4.4.3-20100211.tar.bz2 +ca2561a74af23f1de6218cc7e3bb2606 gcc-4.4.3-20100221.tar.bz2 From 44c3be6baedd0aaa959cd3f7c70df3c7564eacbf Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Sat, 27 Feb 2010 00:21:56 +0000 Subject: [PATCH 13/38] 4.4.3-8 --- .cvsignore | 2 +- gcc.spec | 14 +++++++++++--- import.log | 1 + sources | 2 +- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.cvsignore b/.cvsignore index a36c3e4..f5829f6 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ fastjar-0.97.tar.gz -gcc-4.4.3-20100221.tar.bz2 +gcc-4.4.3-20100226.tar.bz2 diff --git a/gcc.spec b/gcc.spec index 8849bd6..8ffe709 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,9 +1,9 @@ -%global DATE 20100221 -%global SVNREV 156936 +%global DATE 20100226 +%global SVNREV 157097 %global gcc_version 4.4.3 # Note, gcc_release must be integer, if you want to add suffixes to # %{release}, append them after %{gcc_release} on Release: line. -%global gcc_release 7 +%global gcc_release 8 %global _unpackaged_files_terminate_build 0 %global multilib_64_archs sparc64 ppc64 s390x x86_64 %if 0%{?fedora} >= 13 @@ -1880,6 +1880,14 @@ fi %doc rpm.doc/changelogs/libmudflap/ChangeLog* %changelog +* Fri Feb 26 2010 Jakub Jelinek 4.4.3-8 +- update from gcc-4_4-branch + - PR libstdc++/21769 +- VTA backports + - PRs debug/42800, debug/43077, debug/43150, debug/43160, debug/43161, + debug/43165, debug/43166, debug/43190, target/43139 +- fix alignment of some stack vars (PR middle-end/39315) + * Sun Feb 21 2010 Jakub Jelinek 4.4.3-7 - update from gcc-4_4-branch - PRs c++/43024, c++/43033, fortran/41869, target/40887, diff --git a/import.log b/import.log index 2664ddd..133635d 100644 --- a/import.log +++ b/import.log @@ -8,3 +8,4 @@ gcc-4_4_3-4_fc13:HEAD:gcc-4.4.3-4.fc13.src.rpm:1264621537 gcc-4_4_3-5_fc13:HEAD:gcc-4.4.3-5.fc13.src.rpm:1265659730 gcc-4_4_3-6_fc13:HEAD:gcc-4.4.3-6.fc13.src.rpm:1265925505 gcc-4_4_3-7_fc13:F-13:gcc-4.4.3-7.fc13.src.rpm:1266793373 +gcc-4_4_3-8_fc13:F-13:gcc-4.4.3-8.fc13.src.rpm:1267230097 diff --git a/sources b/sources index 82bd137..0ea1c35 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz -ca2561a74af23f1de6218cc7e3bb2606 gcc-4.4.3-20100221.tar.bz2 +31fa77341c06ae5a3e6a5a848311721a gcc-4.4.3-20100226.tar.bz2 From 1ba2e86ef4f9449cb0375ff1f1cd7481acb200b4 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 9 Mar 2010 20:54:14 +0000 Subject: [PATCH 14/38] 4.4.3-9 --- .cvsignore | 2 +- gcc.spec | 20 +- gcc44-pr42233.patch | 973 -------------------------------------------- import.log | 1 + sources | 2 +- 5 files changed, 16 insertions(+), 982 deletions(-) delete mode 100644 gcc44-pr42233.patch diff --git a/.cvsignore b/.cvsignore index f5829f6..734f819 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ fastjar-0.97.tar.gz -gcc-4.4.3-20100226.tar.bz2 +gcc-4.4.3-20100309.tar.bz2 diff --git a/gcc.spec b/gcc.spec index 8ffe709..0f184c9 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,9 +1,9 @@ -%global DATE 20100226 -%global SVNREV 157097 +%global DATE 20100309 +%global SVNREV 157326 %global gcc_version 4.4.3 # Note, gcc_release must be integer, if you want to add suffixes to # %{release}, append them after %{gcc_release} on Release: line. -%global gcc_release 8 +%global gcc_release 9 %global _unpackaged_files_terminate_build 0 %global multilib_64_archs sparc64 ppc64 s390x x86_64 %if 0%{?fedora} >= 13 @@ -176,8 +176,7 @@ Patch17: gcc44-pr38757.patch Patch18: gcc44-libstdc++-docs.patch Patch19: gcc44-ppc64-aixdesc.patch Patch20: gcc44-no-add-needed.patch -Patch21: gcc44-pr42233.patch -Patch22: gcc44-pr43051.patch +Patch21: gcc44-pr43051.patch Patch1000: fastjar-0.97-segfault.patch Patch1001: fastjar-0.97-len1.patch @@ -489,8 +488,7 @@ which are required to compile with the GNAT. %if 0%{?fedora} >= 13 %patch20 -p0 -b .no-add-needed~ %endif -%patch21 -p0 -b .pr42233~ -#%patch22 -p0 -b .pr43051~ +#%patch21 -p0 -b .pr43051~ # This testcase doesn't compile. rm libjava/testsuite/libjava.lang/PR35020* @@ -1880,6 +1878,14 @@ fi %doc rpm.doc/changelogs/libmudflap/ChangeLog* %changelog +* Tue Mar 9 2010 Jakub Jelinek 4.4.3-9 +- update from gcc-4_4-branch + - PRs ada/42253, bootstrap/43121, c/43248, tree-optimization/43220 +- VTA backports + - PRs debug/42897, debug/43176, debug/43177, debug/43229, debug/43237, + debug/43290, debug/43299, debug/43304 +- fix unwind info in i?86 PIC register setup sequences (PR debug/43293) + * Fri Feb 26 2010 Jakub Jelinek 4.4.3-8 - update from gcc-4_4-branch - PR libstdc++/21769 diff --git a/gcc44-pr42233.patch b/gcc44-pr42233.patch deleted file mode 100644 index 0be6d6f..0000000 --- a/gcc44-pr42233.patch +++ /dev/null @@ -1,973 +0,0 @@ -2010-02-19 Jakub Jelinek - - PR middle-end/42233 - * dojump.c (do_jump) : Invert priority. - - PR bootstrap/43121 - * except.c (sjlj_emit_function_enter): Don't call - add_reg_br_prob_note, instead add REG_BR_PROB note to the last insn - directly. - * rtl.h (add_reg_br_prob_note): Remove prototype. - - PR middle-end/42233 - * loop-doloop.c (add_test): Adjust do_compare_rtx_and_jump caller. - - PR middle-end/42233 - * expr.h (jumpifnot, jumpifnot_1, jumpif, jumpif_1, do_jump, - do_jump_1, do_compare_rtx_and_jump): Add PROB argument. - * dojump.c: Include output.h. - (inv): New inline function. - (jumpifnot, jumpifnot_1, jumpif, jumpif_1, do_jump_1, do_jump, - do_jump_by_parts_greater_rtx, do_jump_by_parts_greater, - do_jump_by_parts_zero_rtx, do_jump_by_parts_equality_rtx, - do_jump_by_parts_equality, do_compare_and_jump): Add PROB - argument, pass it down to other calls. - (do_compare_rtx_and_jump): Likewise. If PROB is not -1, - add REG_BR_PROB note to the conditional jump. - * cfgexpand.c (add_reg_br_prob_note): Removed. - (expand_gimple_cond): Don't call it, add the probability - as last argument to jumpif_1/jumpifnot_1. - * Makefile.in (dojump.o): Depend on output.h. - * builtins.c (expand_errno_check): Adjust do_compare_rtx_and_jump - callers. - * expmed.c (emit_store_flag_force, do_cmp_and_jump): Likewise. - * stmt.c (do_jump_if_equal): Likewise. - * cfgrtl.c (rtl_lv_add_condition_to_bb): Likewise. - * loop-unswitch.c (compare_and_jump_seq): Likewise. - * config/rs6000/rs6000.c (rs6000_aix_emit_builtin_unwind_init): - Likewise. - * optabs.c (expand_doubleword_shift, expand_abs): Likewise. - * expr.c (expand_expr_real_1): Adjust do_jump, jumpifnot and - jumpifnot_1 callers. - (expand_expr_real_2): Adjust jumpifnot_1 and do_compare_rtx_and_jump - callers. - (store_expr): Adjust jumpifnot caller. - (store_constructor): Adjust jumpif caller. - - PR middle-end/42233 - * gimplify.c (gimple_boolify): For __builtin_expect call - gimple_boolify also on its first argument. - ---- gcc/expmed.c.jj 2009-12-31 11:53:14.000000000 +0100 -+++ gcc/expmed.c 2010-02-19 18:27:13.000000000 +0100 -@@ -5608,7 +5608,7 @@ emit_store_flag_force (rtx target, enum - emit_move_insn (target, const1_rtx); - label = gen_label_rtx (); - do_compare_rtx_and_jump (op0, op1, code, unsignedp, mode, NULL_RTX, -- NULL_RTX, label); -+ NULL_RTX, label, -1); - - emit_move_insn (target, const0_rtx); - emit_label (label); -@@ -5626,5 +5626,5 @@ do_cmp_and_jump (rtx arg1, rtx arg2, enu - { - int unsignedp = (op == LTU || op == LEU || op == GTU || op == GEU); - do_compare_rtx_and_jump (arg1, arg2, op, unsignedp, mode, -- NULL_RTX, NULL_RTX, label); -+ NULL_RTX, NULL_RTX, label, -1); - } ---- gcc/loop-unswitch.c.jj 2009-04-24 21:41:23.000000000 +0200 -+++ gcc/loop-unswitch.c 2010-02-19 18:27:10.000000000 +0100 -@@ -121,7 +121,7 @@ compare_and_jump_seq (rtx op0, rtx op1, - op0 = force_operand (op0, NULL_RTX); - op1 = force_operand (op1, NULL_RTX); - do_compare_rtx_and_jump (op0, op1, comp, 0, -- mode, NULL_RTX, NULL_RTX, label); -+ mode, NULL_RTX, NULL_RTX, label, -1); - jump = get_last_insn (); - JUMP_LABEL (jump) = label; - LABEL_NUSES (label)++; ---- gcc/dojump.c.jj 2009-06-03 16:08:37.000000000 +0200 -+++ gcc/dojump.c 2010-02-19 18:53:16.000000000 +0100 -@@ -35,12 +35,21 @@ along with GCC; see the file COPYING3. - #include "langhooks.h" - #include "ggc.h" - #include "basic-block.h" -+#include "output.h" - - static bool prefer_and_bit_test (enum machine_mode, int); --static void do_jump_by_parts_greater (tree, int, rtx, rtx); --static void do_jump_by_parts_equality (tree, rtx, rtx); -+static void do_jump_by_parts_greater (tree, int, rtx, rtx, int); -+static void do_jump_by_parts_equality (tree, rtx, rtx, int); - static void do_compare_and_jump (tree, enum rtx_code, enum rtx_code, rtx, -- rtx); -+ rtx, int); -+ -+/* Invert probability if there is any. -1 stands for unknown. */ -+ -+static inline int -+inv (int prob) -+{ -+ return prob == -1 ? -1 : REG_BR_PROB_BASE - prob; -+} - - /* At the start of a function, record that we have no previously-pushed - arguments waiting to be popped. */ -@@ -96,17 +105,17 @@ do_pending_stack_adjust (void) - functions here. */ - - void --jumpifnot (tree exp, rtx label) -+jumpifnot (tree exp, rtx label, int prob) - { -- do_jump (exp, label, NULL_RTX); -+ do_jump (exp, label, NULL_RTX, inv (prob)); - } - - /* Generate code to evaluate EXP and jump to LABEL if the value is nonzero. */ - - void --jumpif (tree exp, rtx label) -+jumpif (tree exp, rtx label, int prob) - { -- do_jump (exp, NULL_RTX, label); -+ do_jump (exp, NULL_RTX, label, prob); - } - - /* Used internally by prefer_and_bit_test. */ -@@ -156,10 +165,12 @@ prefer_and_bit_test (enum machine_mode m - - do_jump always does any pending stack adjust except when it does not - actually perform a jump. An example where there is no jump -- is when EXP is `(foo (), 0)' and IF_FALSE_LABEL is null. */ -+ is when EXP is `(foo (), 0)' and IF_FALSE_LABEL is null. -+ -+ PROB is probability of jump to if_true_label, or -1 if unknown. */ - - void --do_jump (tree exp, rtx if_false_label, rtx if_true_label) -+do_jump (tree exp, rtx if_false_label, rtx if_true_label, int prob) - { - enum tree_code code = TREE_CODE (exp); - rtx temp; -@@ -206,11 +217,12 @@ do_jump (tree exp, rtx if_false_label, r - case LROTATE_EXPR: - case RROTATE_EXPR: - /* These cannot change zero->nonzero or vice versa. */ -- do_jump (TREE_OPERAND (exp, 0), if_false_label, if_true_label); -+ do_jump (TREE_OPERAND (exp, 0), if_false_label, if_true_label, prob); - break; - - case TRUTH_NOT_EXPR: -- do_jump (TREE_OPERAND (exp, 0), if_true_label, if_false_label); -+ do_jump (TREE_OPERAND (exp, 0), if_true_label, if_false_label, -+ inv (prob)); - break; - - case COND_EXPR: -@@ -226,10 +238,10 @@ do_jump (tree exp, rtx if_false_label, r - } - - do_pending_stack_adjust (); -- do_jump (TREE_OPERAND (exp, 0), label1, NULL_RTX); -- do_jump (TREE_OPERAND (exp, 1), if_false_label, if_true_label); -+ do_jump (TREE_OPERAND (exp, 0), label1, NULL_RTX, -1); -+ do_jump (TREE_OPERAND (exp, 1), if_false_label, if_true_label, prob); - emit_label (label1); -- do_jump (TREE_OPERAND (exp, 2), if_false_label, if_true_label); -+ do_jump (TREE_OPERAND (exp, 2), if_false_label, if_true_label, prob); - break; - } - -@@ -261,7 +273,8 @@ do_jump (tree exp, rtx if_false_label, r - && (optab_handler (cmp_optab, TYPE_MODE (type))->insn_code - != CODE_FOR_nothing)) - { -- do_jump (fold_convert (type, exp), if_false_label, if_true_label); -+ do_jump (fold_convert (type, exp), if_false_label, if_true_label, -+ prob); - break; - } - goto normal; -@@ -277,12 +290,14 @@ do_jump (tree exp, rtx if_false_label, r - != MODE_COMPLEX_INT); - - if (integer_zerop (TREE_OPERAND (exp, 1))) -- do_jump (TREE_OPERAND (exp, 0), if_true_label, if_false_label); -+ do_jump (TREE_OPERAND (exp, 0), if_true_label, if_false_label, -+ inv (prob)); - else if (GET_MODE_CLASS (TYPE_MODE (inner_type)) == MODE_INT - && !can_compare_p (EQ, TYPE_MODE (inner_type), ccp_jump)) -- do_jump_by_parts_equality (exp, if_false_label, if_true_label); -+ do_jump_by_parts_equality (exp, if_false_label, if_true_label, prob); - else -- do_compare_and_jump (exp, EQ, EQ, if_false_label, if_true_label); -+ do_compare_and_jump (exp, EQ, EQ, if_false_label, if_true_label, -+ prob); - break; - } - -@@ -302,12 +317,14 @@ do_jump (tree exp, rtx if_false_label, r - != MODE_COMPLEX_INT); - - if (integer_zerop (TREE_OPERAND (exp, 1))) -- do_jump (TREE_OPERAND (exp, 0), if_false_label, if_true_label); -+ do_jump (TREE_OPERAND (exp, 0), if_false_label, if_true_label, prob); - else if (GET_MODE_CLASS (TYPE_MODE (inner_type)) == MODE_INT - && !can_compare_p (NE, TYPE_MODE (inner_type), ccp_jump)) -- do_jump_by_parts_equality (exp, if_true_label, if_false_label); -+ do_jump_by_parts_equality (exp, if_true_label, if_false_label, -+ inv (prob)); - else -- do_compare_and_jump (exp, NE, NE, if_false_label, if_true_label); -+ do_compare_and_jump (exp, NE, NE, if_false_label, if_true_label, -+ prob); - break; - } - -@@ -315,36 +332,43 @@ do_jump (tree exp, rtx if_false_label, r - mode = TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp, 0))); - if (GET_MODE_CLASS (mode) == MODE_INT - && ! can_compare_p (LT, mode, ccp_jump)) -- do_jump_by_parts_greater (exp, 1, if_false_label, if_true_label); -+ do_jump_by_parts_greater (exp, 1, if_false_label, if_true_label, prob); - else -- do_compare_and_jump (exp, LT, LTU, if_false_label, if_true_label); -+ do_compare_and_jump (exp, LT, LTU, if_false_label, if_true_label, -+ prob); - break; - - case LE_EXPR: - mode = TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp, 0))); - if (GET_MODE_CLASS (mode) == MODE_INT - && ! can_compare_p (LE, mode, ccp_jump)) -- do_jump_by_parts_greater (exp, 0, if_true_label, if_false_label); -+ do_jump_by_parts_greater (exp, 0, if_true_label, if_false_label, -+ inv (prob)); - else -- do_compare_and_jump (exp, LE, LEU, if_false_label, if_true_label); -+ do_compare_and_jump (exp, LE, LEU, if_false_label, if_true_label, -+ prob); - break; - - case GT_EXPR: - mode = TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp, 0))); - if (GET_MODE_CLASS (mode) == MODE_INT - && ! can_compare_p (GT, mode, ccp_jump)) -- do_jump_by_parts_greater (exp, 0, if_false_label, if_true_label); -+ do_jump_by_parts_greater (exp, 0, if_false_label, if_true_label, -+ prob); - else -- do_compare_and_jump (exp, GT, GTU, if_false_label, if_true_label); -+ do_compare_and_jump (exp, GT, GTU, if_false_label, if_true_label, -+ prob); - break; - - case GE_EXPR: - mode = TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp, 0))); - if (GET_MODE_CLASS (mode) == MODE_INT - && ! can_compare_p (GE, mode, ccp_jump)) -- do_jump_by_parts_greater (exp, 1, if_true_label, if_false_label); -+ do_jump_by_parts_greater (exp, 1, if_true_label, if_false_label, -+ inv (prob)); - else -- do_compare_and_jump (exp, GE, GEU, if_false_label, if_true_label); -+ do_compare_and_jump (exp, GE, GEU, if_false_label, if_true_label, -+ prob); - break; - - case UNORDERED_EXPR: -@@ -368,9 +392,10 @@ do_jump (tree exp, rtx if_false_label, r - do_rev = 1; - - if (! do_rev) -- do_compare_and_jump (exp, cmp, cmp, if_false_label, if_true_label); -+ do_compare_and_jump (exp, cmp, cmp, if_false_label, if_true_label, prob); - else -- do_compare_and_jump (exp, rcmp, rcmp, if_true_label, if_false_label); -+ do_compare_and_jump (exp, rcmp, rcmp, if_true_label, if_false_label, -+ inv (prob)); - } - break; - -@@ -415,7 +440,7 @@ do_jump (tree exp, rtx if_false_label, r - mode = TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp, 0))); - if (can_compare_p (rcode1, mode, ccp_jump)) - do_compare_and_jump (exp, rcode1, rcode1, if_false_label, -- if_true_label); -+ if_true_label, prob); - else - { - tree op0 = save_expr (TREE_OPERAND (exp, 0)); -@@ -429,8 +454,8 @@ do_jump (tree exp, rtx if_false_label, r - - cmp0 = fold_build2 (tcode1, TREE_TYPE (exp), op0, op1); - cmp1 = fold_build2 (tcode2, TREE_TYPE (exp), op0, op1); -- do_jump (cmp0, 0, if_true_label); -- do_jump (cmp1, if_false_label, if_true_label); -+ do_jump (cmp0, 0, if_true_label, prob); -+ do_jump (cmp1, if_false_label, if_true_label, prob); - } - break; - } -@@ -443,6 +468,7 @@ do_jump (tree exp, rtx if_false_label, r - { - tree exp0 = TREE_OPERAND (exp, 0); - rtx set_label, clr_label; -+ int setclr_prob = prob; - - /* Strip narrowing integral type conversions. */ - while (CONVERT_EXPR_P (exp0) -@@ -458,6 +484,7 @@ do_jump (tree exp, rtx if_false_label, r - exp0 = TREE_OPERAND (exp0, 0); - clr_label = if_true_label; - set_label = if_false_label; -+ setclr_prob = inv (prob); - } - else - { -@@ -480,7 +507,7 @@ do_jump (tree exp, rtx if_false_label, r - = (unsigned HOST_WIDE_INT) 1 << TREE_INT_CST_LOW (shift); - do_jump (build2 (BIT_AND_EXPR, argtype, arg, - build_int_cst_wide_type (argtype, mask, 0)), -- clr_label, set_label); -+ clr_label, set_label, setclr_prob); - break; - } - } -@@ -503,7 +530,8 @@ do_jump (tree exp, rtx if_false_label, r - && (optab_handler (cmp_optab, TYPE_MODE (type))->insn_code - != CODE_FOR_nothing)) - { -- do_jump (fold_convert (type, exp), if_false_label, if_true_label); -+ do_jump (fold_convert (type, exp), if_false_label, if_true_label, -+ prob); - break; - } - -@@ -526,13 +554,13 @@ do_jump (tree exp, rtx if_false_label, r - if (if_false_label == NULL_RTX) - { - drop_through_label = gen_label_rtx (); -- do_jump (TREE_OPERAND (exp, 0), drop_through_label, NULL_RTX); -- do_jump (TREE_OPERAND (exp, 1), NULL_RTX, if_true_label); -+ do_jump (TREE_OPERAND (exp, 0), drop_through_label, NULL_RTX, prob); -+ do_jump (TREE_OPERAND (exp, 1), NULL_RTX, if_true_label, prob); - } - else - { -- do_jump (TREE_OPERAND (exp, 0), if_false_label, NULL_RTX); -- do_jump (TREE_OPERAND (exp, 1), if_false_label, if_true_label); -+ do_jump (TREE_OPERAND (exp, 0), if_false_label, NULL_RTX, prob); -+ do_jump (TREE_OPERAND (exp, 1), if_false_label, if_true_label, prob); - } - break; - -@@ -541,7 +569,7 @@ do_jump (tree exp, rtx if_false_label, r - /* High branch cost, expand as the bitwise OR of the conditions. - Do the same if the RHS has side effects, because we're effectively - turning a TRUTH_OR_EXPR into a TRUTH_ORIF_EXPR. */ -- if (BRANCH_COST (optimize_insn_for_speed_p (), false)>= 4 -+ if (BRANCH_COST (optimize_insn_for_speed_p (), false) >= 4 - || TREE_SIDE_EFFECTS (TREE_OPERAND (exp, 1))) - goto normal; - -@@ -549,13 +577,13 @@ do_jump (tree exp, rtx if_false_label, r - if (if_true_label == NULL_RTX) - { - drop_through_label = gen_label_rtx (); -- do_jump (TREE_OPERAND (exp, 0), NULL_RTX, drop_through_label); -- do_jump (TREE_OPERAND (exp, 1), if_false_label, NULL_RTX); -+ do_jump (TREE_OPERAND (exp, 0), NULL_RTX, drop_through_label, prob); -+ do_jump (TREE_OPERAND (exp, 1), if_false_label, NULL_RTX, prob); - } - else - { -- do_jump (TREE_OPERAND (exp, 0), NULL_RTX, if_true_label); -- do_jump (TREE_OPERAND (exp, 1), if_false_label, if_true_label); -+ do_jump (TREE_OPERAND (exp, 0), NULL_RTX, if_true_label, prob); -+ do_jump (TREE_OPERAND (exp, 1), if_false_label, if_true_label, prob); - } - break; - -@@ -577,7 +605,7 @@ do_jump (tree exp, rtx if_false_label, r - do_compare_rtx_and_jump (temp, CONST0_RTX (GET_MODE (temp)), - NE, TYPE_UNSIGNED (TREE_TYPE (exp)), - GET_MODE (temp), NULL_RTX, -- if_false_label, if_true_label); -+ if_false_label, if_true_label, prob); - } - - if (drop_through_label) -@@ -593,7 +621,8 @@ do_jump (tree exp, rtx if_false_label, r - - static void - do_jump_by_parts_greater_rtx (enum machine_mode mode, int unsignedp, rtx op0, -- rtx op1, rtx if_false_label, rtx if_true_label) -+ rtx op1, rtx if_false_label, rtx if_true_label, -+ int prob) - { - int nwords = (GET_MODE_SIZE (mode) / UNITS_PER_WORD); - rtx drop_through_label = 0; -@@ -625,11 +654,12 @@ do_jump_by_parts_greater_rtx (enum machi - /* All but high-order word must be compared as unsigned. */ - do_compare_rtx_and_jump (op0_word, op1_word, GT, - (unsignedp || i > 0), word_mode, NULL_RTX, -- NULL_RTX, if_true_label); -+ NULL_RTX, if_true_label, prob); - - /* Consider lower words only if these are equal. */ - do_compare_rtx_and_jump (op0_word, op1_word, NE, unsignedp, word_mode, -- NULL_RTX, NULL_RTX, if_false_label); -+ NULL_RTX, NULL_RTX, if_false_label, -+ inv (prob)); - } - - if (if_false_label) -@@ -645,7 +675,7 @@ do_jump_by_parts_greater_rtx (enum machi - - static void - do_jump_by_parts_greater (tree exp, int swap, rtx if_false_label, -- rtx if_true_label) -+ rtx if_true_label, int prob) - { - rtx op0 = expand_normal (TREE_OPERAND (exp, swap)); - rtx op1 = expand_normal (TREE_OPERAND (exp, !swap)); -@@ -653,7 +683,7 @@ do_jump_by_parts_greater (tree exp, int - int unsignedp = TYPE_UNSIGNED (TREE_TYPE (TREE_OPERAND (exp, 0))); - - do_jump_by_parts_greater_rtx (mode, unsignedp, op0, op1, if_false_label, -- if_true_label); -+ if_true_label, prob); - } - - /* Jump according to whether OP0 is 0. We assume that OP0 has an integer -@@ -663,7 +693,7 @@ do_jump_by_parts_greater (tree exp, int - - static void - do_jump_by_parts_zero_rtx (enum machine_mode mode, rtx op0, -- rtx if_false_label, rtx if_true_label) -+ rtx if_false_label, rtx if_true_label, int prob) - { - int nwords = GET_MODE_SIZE (mode) / UNITS_PER_WORD; - rtx part; -@@ -685,8 +715,7 @@ do_jump_by_parts_zero_rtx (enum machine_ - if (part != 0) - { - do_compare_rtx_and_jump (part, const0_rtx, EQ, 1, word_mode, -- NULL_RTX, if_false_label, if_true_label); -- -+ NULL_RTX, if_false_label, if_true_label, prob); - return; - } - -@@ -697,7 +726,7 @@ do_jump_by_parts_zero_rtx (enum machine_ - for (i = 0; i < nwords; i++) - do_compare_rtx_and_jump (operand_subword_force (op0, i, mode), - const0_rtx, EQ, 1, word_mode, NULL_RTX, -- if_false_label, NULL_RTX); -+ if_false_label, NULL_RTX, prob); - - if (if_true_label) - emit_jump (if_true_label); -@@ -713,7 +742,7 @@ do_jump_by_parts_zero_rtx (enum machine_ - - static void - do_jump_by_parts_equality_rtx (enum machine_mode mode, rtx op0, rtx op1, -- rtx if_false_label, rtx if_true_label) -+ rtx if_false_label, rtx if_true_label, int prob) - { - int nwords = (GET_MODE_SIZE (mode) / UNITS_PER_WORD); - rtx drop_through_label = 0; -@@ -721,12 +750,14 @@ do_jump_by_parts_equality_rtx (enum mach - - if (op1 == const0_rtx) - { -- do_jump_by_parts_zero_rtx (mode, op0, if_false_label, if_true_label); -+ do_jump_by_parts_zero_rtx (mode, op0, if_false_label, if_true_label, -+ prob); - return; - } - else if (op0 == const0_rtx) - { -- do_jump_by_parts_zero_rtx (mode, op1, if_false_label, if_true_label); -+ do_jump_by_parts_zero_rtx (mode, op1, if_false_label, if_true_label, -+ prob); - return; - } - -@@ -737,7 +768,7 @@ do_jump_by_parts_equality_rtx (enum mach - do_compare_rtx_and_jump (operand_subword_force (op0, i, mode), - operand_subword_force (op1, i, mode), - EQ, 0, word_mode, NULL_RTX, -- if_false_label, NULL_RTX); -+ if_false_label, NULL_RTX, prob); - - if (if_true_label) - emit_jump (if_true_label); -@@ -749,13 +780,14 @@ do_jump_by_parts_equality_rtx (enum mach - with one insn, test the comparison and jump to the appropriate label. */ - - static void --do_jump_by_parts_equality (tree exp, rtx if_false_label, rtx if_true_label) -+do_jump_by_parts_equality (tree exp, rtx if_false_label, rtx if_true_label, -+ int prob) - { - rtx op0 = expand_normal (TREE_OPERAND (exp, 0)); - rtx op1 = expand_normal (TREE_OPERAND (exp, 1)); - enum machine_mode mode = TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp, 0))); - do_jump_by_parts_equality_rtx (mode, op0, op1, if_false_label, -- if_true_label); -+ if_true_label, prob); - } - - /* Generate code for a comparison of OP0 and OP1 with rtx code CODE. -@@ -825,7 +857,7 @@ compare_from_rtx (rtx op0, rtx op1, enum - void - do_compare_rtx_and_jump (rtx op0, rtx op1, enum rtx_code code, int unsignedp, - enum machine_mode mode, rtx size, rtx if_false_label, -- rtx if_true_label) -+ rtx if_true_label, int prob) - { - rtx tem; - int dummy_true_label = 0; -@@ -837,6 +869,7 @@ do_compare_rtx_and_jump (rtx op0, rtx op - if_true_label = if_false_label; - if_false_label = 0; - code = reverse_condition (code); -+ prob = inv (prob); - } - - /* If one operand is constant, make it the second one. Only do this -@@ -886,52 +919,56 @@ do_compare_rtx_and_jump (rtx op0, rtx op - { - case LTU: - do_jump_by_parts_greater_rtx (mode, 1, op1, op0, -- if_false_label, if_true_label); -+ if_false_label, if_true_label, prob); - break; - - case LEU: - do_jump_by_parts_greater_rtx (mode, 1, op0, op1, -- if_true_label, if_false_label); -+ if_true_label, if_false_label, -+ inv (prob)); - break; - - case GTU: - do_jump_by_parts_greater_rtx (mode, 1, op0, op1, -- if_false_label, if_true_label); -+ if_false_label, if_true_label, prob); - break; - - case GEU: - do_jump_by_parts_greater_rtx (mode, 1, op1, op0, -- if_true_label, if_false_label); -+ if_true_label, if_false_label, -+ inv (prob)); - break; - - case LT: - do_jump_by_parts_greater_rtx (mode, 0, op1, op0, -- if_false_label, if_true_label); -+ if_false_label, if_true_label, prob); - break; - - case LE: - do_jump_by_parts_greater_rtx (mode, 0, op0, op1, -- if_true_label, if_false_label); -+ if_true_label, if_false_label, -+ inv (prob)); - break; - - case GT: - do_jump_by_parts_greater_rtx (mode, 0, op0, op1, -- if_false_label, if_true_label); -+ if_false_label, if_true_label, prob); - break; - - case GE: - do_jump_by_parts_greater_rtx (mode, 0, op1, op0, -- if_true_label, if_false_label); -+ if_true_label, if_false_label, -+ inv (prob)); - break; - - case EQ: - do_jump_by_parts_equality_rtx (mode, op0, op1, if_false_label, -- if_true_label); -+ if_true_label, prob); - break; - - case NE: - do_jump_by_parts_equality_rtx (mode, op0, op1, if_true_label, -- if_false_label); -+ if_false_label, inv (prob)); - break; - - default: -@@ -939,8 +976,32 @@ do_compare_rtx_and_jump (rtx op0, rtx op - } - } - else -- emit_cmp_and_jump_insns (op0, op1, code, size, mode, unsignedp, -- if_true_label); -+ { -+ rtx last = get_last_insn (); -+ emit_cmp_and_jump_insns (op0, op1, code, size, mode, unsignedp, -+ if_true_label); -+ if (prob != -1 && profile_status != PROFILE_ABSENT) -+ { -+ for (last = NEXT_INSN (last); -+ last && NEXT_INSN (last); -+ last = NEXT_INSN (last)) -+ if (JUMP_P (last)) -+ break; -+ if (!last -+ || !JUMP_P (last) -+ || NEXT_INSN (last) -+ || !any_condjump_p (last)) -+ { -+ if (dump_file) -+ fprintf (dump_file, "Failed to add probability note\n"); -+ } -+ else -+ { -+ gcc_assert (!find_reg_note (last, REG_BR_PROB, 0)); -+ add_reg_note (last, REG_BR_PROB, GEN_INT (prob)); -+ } -+ } -+ } - - if (if_false_label) - emit_jump (if_false_label); -@@ -961,7 +1022,7 @@ do_compare_rtx_and_jump (rtx op0, rtx op - static void - do_compare_and_jump (tree exp, enum rtx_code signed_code, - enum rtx_code unsigned_code, rtx if_false_label, -- rtx if_true_label) -+ rtx if_true_label, int prob) - { - rtx op0, op1; - tree type; -@@ -1022,7 +1083,7 @@ do_compare_and_jump (tree exp, enum rtx_ - do_compare_rtx_and_jump (op0, op1, code, unsignedp, mode, - ((mode == BLKmode) - ? expr_size (TREE_OPERAND (exp, 0)) : NULL_RTX), -- if_false_label, if_true_label); -+ if_false_label, if_true_label, prob); - } - - #include "gt-dojump.h" ---- gcc/expr.h.jj 2009-04-24 21:41:31.000000000 +0200 -+++ gcc/expr.h 2010-02-19 18:31:34.000000000 +0100 -@@ -564,20 +564,20 @@ extern void do_pending_stack_adjust (voi - extern tree string_constant (tree, tree *); - - /* Generate code to evaluate EXP and jump to LABEL if the value is zero. */ --extern void jumpifnot (tree, rtx); -+extern void jumpifnot (tree, rtx, int); - - /* Generate code to evaluate EXP and jump to LABEL if the value is nonzero. */ --extern void jumpif (tree, rtx); -+extern void jumpif (tree, rtx, int); - - /* Generate code to evaluate EXP and jump to IF_FALSE_LABEL if - the result is zero, or IF_TRUE_LABEL if the result is one. */ --extern void do_jump (tree, rtx, rtx); -+extern void do_jump (tree, rtx, rtx, int); - - /* Generate rtl to compare two rtx's, will call emit_cmp_insn. */ - extern rtx compare_from_rtx (rtx, rtx, enum rtx_code, int, enum machine_mode, - rtx); - extern void do_compare_rtx_and_jump (rtx, rtx, enum rtx_code, int, -- enum machine_mode, rtx, rtx, rtx); -+ enum machine_mode, rtx, rtx, rtx, int); - - /* Two different ways of generating switch statements. */ - extern int try_casesi (tree, tree, tree, tree, rtx, rtx, rtx); ---- gcc/cfgrtl.c.jj 2009-05-28 12:50:54.000000000 +0200 -+++ gcc/cfgrtl.c 2010-02-19 18:27:14.000000000 +0100 -@@ -2951,7 +2951,7 @@ rtl_lv_add_condition_to_bb (basic_block - op0 = force_operand (op0, NULL_RTX); - op1 = force_operand (op1, NULL_RTX); - do_compare_rtx_and_jump (op0, op1, comp, 0, -- mode, NULL_RTX, NULL_RTX, label); -+ mode, NULL_RTX, NULL_RTX, label, -1); - jump = get_last_insn (); - JUMP_LABEL (jump) = label; - LABEL_NUSES (label)++; ---- gcc/except.c.jj 2009-04-24 21:41:34.000000000 +0200 -+++ gcc/except.c 2010-02-19 18:27:14.000000000 +0100 -@@ -1834,7 +1834,7 @@ sjlj_emit_function_enter (rtx dispatch_l - - #ifdef DONT_USE_BUILTIN_SETJMP - { -- rtx x; -+ rtx x, last; - x = emit_library_call_value (setjmp_libfunc, NULL_RTX, LCT_RETURNS_TWICE, - TYPE_MODE (integer_type_node), 1, - plus_constant (XEXP (fc, 0), -@@ -1842,7 +1842,12 @@ sjlj_emit_function_enter (rtx dispatch_l - - emit_cmp_and_jump_insns (x, const0_rtx, NE, 0, - TYPE_MODE (integer_type_node), 0, dispatch_label); -- add_reg_br_prob_note (get_insns (), REG_BR_PROB_BASE/100); -+ last = get_last_insn (); -+ if (JUMP_P (last) && any_condjump_p (last)) -+ { -+ gcc_assert (!find_reg_note (last, REG_BR_PROB, 0)); -+ add_reg_note (last, REG_BR_PROB, GEN_INT (REG_BR_PROB_BASE / 100)); -+ } - } - #else - expand_builtin_setjmp_setup (plus_constant (XEXP (fc, 0), sjlj_fc_jbuf_ofs), ---- gcc/config/rs6000/rs6000.c.jj 2009-09-29 17:58:03.000000000 +0200 -+++ gcc/config/rs6000/rs6000.c 2010-02-19 18:27:13.000000000 +0100 -@@ -15534,7 +15534,7 @@ rs6000_aix_emit_builtin_unwind_init (voi - - do_compare_rtx_and_jump (opcode, tocompare, EQ, 1, - SImode, NULL_RTX, NULL_RTX, -- no_toc_save_needed); -+ no_toc_save_needed, -1); - - mem = gen_frame_mem (Pmode, - gen_rtx_PLUS (Pmode, stack_top, ---- gcc/stmt.c.jj 2009-04-27 13:45:10.000000000 +0200 -+++ gcc/stmt.c 2010-02-19 18:27:14.000000000 +0100 -@@ -2472,7 +2472,7 @@ do_jump_if_equal (enum machine_mode mode - int unsignedp) - { - do_compare_rtx_and_jump (op0, op1, EQ, unsignedp, mode, -- NULL_RTX, NULL_RTX, label); -+ NULL_RTX, NULL_RTX, label, -1); - } - - /* Not all case values are encountered equally. This function ---- gcc/Makefile.in.jj 2009-07-28 18:00:54.000000000 +0200 -+++ gcc/Makefile.in 2010-02-19 18:27:13.000000000 +0100 -@@ -2514,7 +2514,7 @@ expr.o : expr.c $(CONFIG_H) $(SYSTEM_H) - tree-pass.h $(DF_H) $(DIAGNOSTIC_H) vecprim.h - dojump.o : dojump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \ - $(FLAGS_H) $(FUNCTION_H) $(EXPR_H) $(OPTABS_H) $(INSN_ATTR_H) insn-config.h \ -- langhooks.h $(GGC_H) gt-dojump.h vecprim.h $(BASIC_BLOCK_H) -+ langhooks.h $(GGC_H) gt-dojump.h vecprim.h $(BASIC_BLOCK_H) output.h - builtins.o : builtins.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ - $(TREE_H) $(GIMPLE_H) $(FLAGS_H) $(TARGET_H) $(FUNCTION_H) $(REGS_H) \ - $(EXPR_H) $(OPTABS_H) insn-config.h $(RECOG_H) output.h typeclass.h \ ---- gcc/cfgexpand.c.jj 2010-01-05 09:56:05.000000000 +0100 -+++ gcc/cfgexpand.c 2010-02-19 18:34:14.000000000 +0100 -@@ -379,46 +379,6 @@ release_stmt_tree (gimple stmt, tree stm - } - - --/* Verify that there is exactly single jump instruction since last and attach -- REG_BR_PROB note specifying probability. -- ??? We really ought to pass the probability down to RTL expanders and let it -- re-distribute it when the conditional expands into multiple conditionals. -- This is however difficult to do. */ --void --add_reg_br_prob_note (rtx last, int probability) --{ -- if (profile_status == PROFILE_ABSENT) -- return; -- for (last = NEXT_INSN (last); last && NEXT_INSN (last); last = NEXT_INSN (last)) -- if (JUMP_P (last)) -- { -- /* It is common to emit condjump-around-jump sequence when we don't know -- how to reverse the conditional. Special case this. */ -- if (!any_condjump_p (last) -- || !JUMP_P (NEXT_INSN (last)) -- || !simplejump_p (NEXT_INSN (last)) -- || !NEXT_INSN (NEXT_INSN (last)) -- || !BARRIER_P (NEXT_INSN (NEXT_INSN (last))) -- || !NEXT_INSN (NEXT_INSN (NEXT_INSN (last))) -- || !LABEL_P (NEXT_INSN (NEXT_INSN (NEXT_INSN (last)))) -- || NEXT_INSN (NEXT_INSN (NEXT_INSN (NEXT_INSN (last))))) -- goto failed; -- gcc_assert (!find_reg_note (last, REG_BR_PROB, 0)); -- add_reg_note (last, REG_BR_PROB, -- GEN_INT (REG_BR_PROB_BASE - probability)); -- return; -- } -- if (!last || !JUMP_P (last) || !any_condjump_p (last)) -- goto failed; -- gcc_assert (!find_reg_note (last, REG_BR_PROB, 0)); -- add_reg_note (last, REG_BR_PROB, GEN_INT (probability)); -- return; --failed: -- if (dump_file) -- fprintf (dump_file, "Failed to add probability note\n"); --} -- -- - #ifndef STACK_ALIGNMENT_NEEDED - #define STACK_ALIGNMENT_NEEDED 1 - #endif -@@ -1669,8 +1629,8 @@ expand_gimple_cond (basic_block bb, gimp - two-way jump that needs to be decomposed into two basic blocks. */ - if (false_edge->dest == bb->next_bb) - { -- jumpif (pred, label_rtx_for_bb (true_edge->dest)); -- add_reg_br_prob_note (last, true_edge->probability); -+ jumpif (pred, label_rtx_for_bb (true_edge->dest), -+ true_edge->probability); - maybe_dump_rtl_for_gimple_stmt (stmt, last); - if (true_edge->goto_locus) - { -@@ -1685,8 +1645,8 @@ expand_gimple_cond (basic_block bb, gimp - } - if (true_edge->dest == bb->next_bb) - { -- jumpifnot (pred, label_rtx_for_bb (false_edge->dest)); -- add_reg_br_prob_note (last, false_edge->probability); -+ jumpifnot (pred, label_rtx_for_bb (false_edge->dest), -+ false_edge->probability); - maybe_dump_rtl_for_gimple_stmt (stmt, last); - if (false_edge->goto_locus) - { -@@ -1700,8 +1660,7 @@ expand_gimple_cond (basic_block bb, gimp - return NULL; - } - -- jumpif (pred, label_rtx_for_bb (true_edge->dest)); -- add_reg_br_prob_note (last, true_edge->probability); -+ jumpif (pred, label_rtx_for_bb (true_edge->dest), true_edge->probability); - last = get_last_insn (); - if (false_edge->goto_locus) - { ---- gcc/gimplify.c.jj 2010-02-08 13:15:22.000000000 +0100 -+++ gcc/gimplify.c 2010-02-19 19:19:54.000000000 +0100 -@@ -2762,6 +2762,32 @@ gimple_boolify (tree expr) - { - tree type = TREE_TYPE (expr); - -+ if (TREE_CODE (expr) == NE_EXPR -+ && TREE_CODE (TREE_OPERAND (expr, 0)) == CALL_EXPR -+ && integer_zerop (TREE_OPERAND (expr, 1))) -+ { -+ tree call = TREE_OPERAND (expr, 0); -+ tree fn = get_callee_fndecl (call); -+ -+ /* For __builtin_expect ((long) (x), y) recurse into x as well. */ -+ if (fn -+ && DECL_BUILT_IN_CLASS (fn) == BUILT_IN_NORMAL -+ && DECL_FUNCTION_CODE (fn) == BUILT_IN_EXPECT -+ && call_expr_nargs (call) == 2) -+ { -+ tree arg = CALL_EXPR_ARG (call, 0); -+ if (arg) -+ { -+ if (TREE_CODE (arg) == NOP_EXPR -+ && TREE_TYPE (arg) == TREE_TYPE (call)) -+ arg = TREE_OPERAND (arg, 0); -+ arg = gimple_boolify (arg); -+ CALL_EXPR_ARG (call, 0) -+ = fold_convert (TREE_TYPE (call), arg); -+ } -+ } -+ } -+ - if (TREE_CODE (type) == BOOLEAN_TYPE) - return expr; - ---- gcc/expr.c.jj 2010-01-16 10:44:34.000000000 +0100 -+++ gcc/expr.c 2010-02-19 18:32:25.000000000 +0100 -@@ -4483,7 +4483,7 @@ store_expr (tree exp, rtx target, int ca - - do_pending_stack_adjust (); - NO_DEFER_POP; -- jumpifnot (TREE_OPERAND (exp, 0), lab1); -+ jumpifnot (TREE_OPERAND (exp, 0), lab1, -1); - store_expr (TREE_OPERAND (exp, 1), target, call_param_p, - nontemporal); - emit_jump_insn (gen_jump (lab2)); -@@ -5503,7 +5503,7 @@ store_constructor (tree exp, rtx target, - /* Generate a conditional jump to exit the loop. */ - exit_cond = build2 (LT_EXPR, integer_type_node, - index, hi_index); -- jumpif (exit_cond, loop_end); -+ jumpif (exit_cond, loop_end, -1); - - /* Update the loop counter, and jump to the head of - the loop. */ -@@ -8974,7 +8974,8 @@ expand_expr_real_1 (tree exp, rtx target - - temp = gen_label_rtx (); - do_compare_rtx_and_jump (target, cmpop1, comparison_code, -- unsignedp, mode, NULL_RTX, NULL_RTX, temp); -+ unsignedp, mode, NULL_RTX, NULL_RTX, temp, -+ -1); - } - emit_move_insn (target, op1); - emit_label (temp); -@@ -9125,7 +9126,7 @@ expand_expr_real_1 (tree exp, rtx target - emit_move_insn (target, const0_rtx); - - op1 = gen_label_rtx (); -- jumpifnot (exp, op1); -+ jumpifnot (exp, op1, -1); - - if (target) - emit_move_insn (target, const1_rtx); -@@ -9194,7 +9195,7 @@ expand_expr_real_1 (tree exp, rtx target - NO_DEFER_POP; - op0 = gen_label_rtx (); - op1 = gen_label_rtx (); -- jumpifnot (TREE_OPERAND (exp, 0), op0); -+ jumpifnot (TREE_OPERAND (exp, 0), op0, -1); - store_expr (TREE_OPERAND (exp, 1), temp, - modifier == EXPAND_STACK_PARM, - false); -@@ -9240,7 +9241,7 @@ expand_expr_real_1 (tree exp, rtx target - int value = TREE_CODE (rhs) == BIT_IOR_EXPR; - do_jump (TREE_OPERAND (rhs, 1), - value ? label : 0, -- value ? 0 : label); -+ value ? 0 : label, -1); - expand_assignment (lhs, build_int_cst (TREE_TYPE (rhs), value), - MOVE_NONTEMPORAL (exp)); - do_pending_stack_adjust (); -@@ -9924,7 +9925,7 @@ do_store_flag (tree exp, rtx target, enu - emit_move_insn (target, invert ? const0_rtx : const1_rtx); - label = gen_label_rtx (); - do_compare_rtx_and_jump (op0, op1, code, unsignedp, operand_mode, NULL_RTX, -- NULL_RTX, label); -+ NULL_RTX, label, -1); - - emit_move_insn (target, invert ? const1_rtx : const0_rtx); - emit_label (label); ---- gcc/optabs.c.jj 2009-04-24 21:41:23.000000000 +0200 -+++ gcc/optabs.c 2010-02-19 18:27:10.000000000 +0100 -@@ -1149,7 +1149,7 @@ expand_doubleword_shift (enum machine_mo - - NO_DEFER_POP; - do_compare_rtx_and_jump (cmp1, cmp2, cmp_code, false, op1_mode, -- 0, 0, subword_label); -+ 0, 0, subword_label, -1); - OK_DEFER_POP; - - if (!expand_superword_shift (binoptab, outof_input, superword_op1, -@@ -3498,7 +3498,7 @@ expand_abs (enum machine_mode mode, rtx - NO_DEFER_POP; - - do_compare_rtx_and_jump (target, CONST0_RTX (mode), GE, 0, mode, -- NULL_RTX, NULL_RTX, op1); -+ NULL_RTX, NULL_RTX, op1, -1); - - op0 = expand_unop (mode, result_unsignedp ? neg_optab : negv_optab, - target, target, 0); ---- gcc/rtl.h.jj 2009-04-27 16:47:34.000000000 +0200 -+++ gcc/rtl.h 2010-02-19 18:27:14.000000000 +0100 -@@ -2305,8 +2305,6 @@ extern GTY(()) rtx stack_limit_rtx; - /* In predict.c */ - extern void invert_br_probabilities (rtx); - extern bool expensive_function_p (int); --/* In cfgexpand.c */ --extern void add_reg_br_prob_note (rtx last, int probability); - - /* In var-tracking.c */ - extern unsigned int variable_tracking_main (void); ---- gcc/loop-doloop.c.jj 2009-04-24 21:41:33.000000000 +0200 -+++ gcc/loop-doloop.c 2010-02-19 18:27:14.000000000 +0100 -@@ -291,7 +291,8 @@ add_test (rtx cond, edge *e, basic_block - op0 = force_operand (op0, NULL_RTX); - op1 = force_operand (op1, NULL_RTX); - label = block_label (dest); -- do_compare_rtx_and_jump (op0, op1, code, 0, mode, NULL_RTX, NULL_RTX, label); -+ do_compare_rtx_and_jump (op0, op1, code, 0, mode, NULL_RTX, -+ NULL_RTX, label, -1); - - jump = get_last_insn (); - if (!jump || !JUMP_P (jump)) diff --git a/import.log b/import.log index 133635d..ebbdf02 100644 --- a/import.log +++ b/import.log @@ -9,3 +9,4 @@ gcc-4_4_3-5_fc13:HEAD:gcc-4.4.3-5.fc13.src.rpm:1265659730 gcc-4_4_3-6_fc13:HEAD:gcc-4.4.3-6.fc13.src.rpm:1265925505 gcc-4_4_3-7_fc13:F-13:gcc-4.4.3-7.fc13.src.rpm:1266793373 gcc-4_4_3-8_fc13:F-13:gcc-4.4.3-8.fc13.src.rpm:1267230097 +gcc-4_4_3-9_fc13:F-13:gcc-4.4.3-9.fc13.src.rpm:1268168014 diff --git a/sources b/sources index 0ea1c35..ba37ae1 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz -31fa77341c06ae5a3e6a5a848311721a gcc-4.4.3-20100226.tar.bz2 +2906b19113678f1ec9841b33b4b59553 gcc-4.4.3-20100309.tar.bz2 From f6f9558cad65c1ed81a7b8066633b9c022b1f563 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 16 Mar 2010 16:10:16 +0000 Subject: [PATCH 15/38] 4.4.3-10 --- .cvsignore | 2 +- gcc.spec | 23 ++- gcc44-pr43051.patch | 331 -------------------------------------------- import.log | 1 + sources | 2 +- 5 files changed, 20 insertions(+), 339 deletions(-) delete mode 100644 gcc44-pr43051.patch diff --git a/.cvsignore b/.cvsignore index 734f819..34d71ba 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ fastjar-0.97.tar.gz -gcc-4.4.3-20100309.tar.bz2 +gcc-4.4.3-20100316.tar.bz2 diff --git a/gcc.spec b/gcc.spec index 0f184c9..21777b2 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,12 +1,12 @@ -%global DATE 20100309 -%global SVNREV 157326 +%global DATE 20100316 +%global SVNREV 157487 %global gcc_version 4.4.3 # Note, gcc_release must be integer, if you want to add suffixes to # %{release}, append them after %{gcc_release} on Release: line. -%global gcc_release 9 +%global gcc_release 10 %global _unpackaged_files_terminate_build 0 %global multilib_64_archs sparc64 ppc64 s390x x86_64 -%if 0%{?fedora} >= 13 +%if 0%{?fedora} >= 13 || 0%{?rhel} >= 6 %global include_gappletviewer 0 %else %global include_gappletviewer 1 @@ -176,7 +176,6 @@ Patch17: gcc44-pr38757.patch Patch18: gcc44-libstdc++-docs.patch Patch19: gcc44-ppc64-aixdesc.patch Patch20: gcc44-no-add-needed.patch -Patch21: gcc44-pr43051.patch Patch1000: fastjar-0.97-segfault.patch Patch1001: fastjar-0.97-len1.patch @@ -488,7 +487,6 @@ which are required to compile with the GNAT. %if 0%{?fedora} >= 13 %patch20 -p0 -b .no-add-needed~ %endif -#%patch21 -p0 -b .pr43051~ # This testcase doesn't compile. rm libjava/testsuite/libjava.lang/PR35020* @@ -1878,6 +1876,19 @@ fi %doc rpm.doc/changelogs/libmudflap/ChangeLog* %changelog +* Tue Mar 16 2010 Jakub Jelinek 4.4.3-10 +- update from gcc-4_4-branch + - PRs fortran/43228, fortran/43303, libfortran/43265, libfortran/43320 +- VTA backports + - PRs debug/36728, debug/43051, debug/43092, debug/43290, + tree-optimization/42917, tree-optimization/43317 + - fix non-localized vars handling and forwarder block merging + (#572260, PR debug/43329) +%if 0%{?rhel} >= 6 +- remove gappletviewer, gcjwebplugin and related files even for + RHEL, as xulrunner got updated to 1.9.2.1 +%endif + * Tue Mar 9 2010 Jakub Jelinek 4.4.3-9 - update from gcc-4_4-branch - PRs ada/42253, bootstrap/43121, c/43248, tree-optimization/43220 diff --git a/gcc44-pr43051.patch b/gcc44-pr43051.patch deleted file mode 100644 index c4425ae..0000000 --- a/gcc44-pr43051.patch +++ /dev/null @@ -1,331 +0,0 @@ -2010-02-17 Alexandre Oliva - - * var-tracking.c (dataflow_set_preserve_mem_locs): Update cur_loc. - -2010-02-17 Jakub Jelinek - - PR debug/43051 - * var-tracking.c (struct dfset_merge): Move definition earlier. - (value_pair): New variable. - (ignore_first_value_pair): New function. - (find_loc_in_1pdv_1): Change last argument to struct dfset_merge *. - If node->loc is VALUE, don't call rtx_equal_p at all, instead just - compare pointers and then recurse. For other rtxes, call - rtx_equal_p_cb instead of rtx_equal_p and ignore first VALUE pair - during comparison, if some has been found, compare those VALUEs - recursively. - (find_loc_in_1pdv): Change last argument to struct dfset_merge *. - (intersect_loc_chains, variable_post_merge_perm_vals): Adjust callers. - - * gcc.dg/guality/pr43051-1.c: New test. - ---- gcc/var-tracking.c.jj 2010-02-07 11:53:22.000000000 +0100 -+++ gcc/var-tracking.c 2010-02-15 12:37:00.000000000 +0100 -@@ -428,7 +428,8 @@ static int variable_union_info_cmp_pos ( - static int variable_union (void **, void *); - static int variable_canonicalize (void **, void *); - static void dataflow_set_union (dataflow_set *, dataflow_set *); --static location_chain find_loc_in_1pdv (rtx, variable, htab_t); -+struct dfset_merge; -+static location_chain find_loc_in_1pdv (rtx, variable, struct dfset_merge *); - static bool canon_value_cmp (rtx, rtx); - static int loc_cmp (rtx, rtx); - static bool variable_part_different_p (variable_part *, variable_part *); -@@ -2234,6 +2235,53 @@ dv_changed_p (decl_or_value dv) - : DECL_CHANGED (dv_as_decl (dv))); - } - -+/* Hash table iteration argument passed to variable_merge. */ -+struct dfset_merge -+{ -+ /* The set in which the merge is to be inserted. */ -+ dataflow_set *dst; -+ /* The set that we're iterating in. */ -+ dataflow_set *cur; -+ /* The set that may contain the other dv we are to merge with. */ -+ dataflow_set *src; -+ /* Number of onepart dvs in src. */ -+ int src_onepart_cnt; -+}; -+ -+/* First encountered differing VALUE pair remembered by -+ ignore_first_value_pair hook. */ -+ -+static rtx value_pair[2]; -+ -+/* Helper for rtx_equal_p_cb. Pretend the first encountered VALUE pair -+ is the same and remember it. */ -+ -+static int -+ignore_first_value_pair (const_rtx *px, const_rtx *py, rtx *nx, rtx *ny) -+{ -+ const_rtx x = *px, y; -+ -+ if (GET_CODE (x) != VALUE) -+ return 0; -+ y = *py; -+ if (GET_CODE (y) != VALUE) -+ return 0; -+ if (x == y) -+ return 0; -+ if (GET_MODE (x) != GET_MODE (y)) -+ return 0; -+ /* If this isn't the first encountered VALUE pair, fail. */ -+ if (value_pair[0]) -+ return 0; -+ /* Remember the first encountered VALUE pair and pretend the VALUEs are the -+ same. */ -+ value_pair[0] = CONST_CAST_RTX (x); -+ value_pair[1] = CONST_CAST_RTX (y); -+ *nx = CONST_CAST_RTX (x); -+ *ny = CONST_CAST_RTX (x); -+ return 1; -+} -+ - /* Vector of VALUEs that should have VALUE_RECURSED_INTO bit cleared - at the end of find_loc_in_1pdv. Not a static variable in find_loc_in_1pdv - to avoid constant allocation/freeing of it. */ -@@ -2245,7 +2293,7 @@ static VEC(rtx, heap) *values_to_unmark; - any values recursively mentioned in the location lists. */ - - static location_chain --find_loc_in_1pdv_1 (rtx loc, variable var, htab_t vars) -+find_loc_in_1pdv_1 (rtx loc, variable var, struct dfset_merge *dsm) - { - location_chain node; - -@@ -2260,22 +2308,65 @@ find_loc_in_1pdv_1 (rtx loc, variable va - gcc_assert (var->var_part[0].offset == 0); - - for (node = var->var_part[0].loc_chain; node; node = node->next) -- if (rtx_equal_p (loc, node->loc)) -- return node; -- else if (GET_CODE (node->loc) == VALUE -- && !VALUE_RECURSED_INTO (node->loc)) -+ if (GET_CODE (node->loc) == VALUE) - { -- decl_or_value dv = dv_from_value (node->loc); -- variable var = (variable) -- htab_find_with_hash (vars, dv, dv_htab_hash (dv)); -+ if (loc == node->loc) -+ return node; -+ if (!VALUE_RECURSED_INTO (node->loc)) -+ { -+ decl_or_value dv = dv_from_value (node->loc); -+ htab_t vars = shared_hash_htab (dsm->src->vars); -+ variable var -+ = (variable) htab_find_with_hash (vars, dv, dv_htab_hash (dv)); - -- if (var) -+ if (var) -+ { -+ location_chain where; -+ VALUE_RECURSED_INTO (node->loc) = true; -+ VEC_safe_push (rtx, heap, values_to_unmark, node->loc); -+ if ((where = find_loc_in_1pdv_1 (loc, var, dsm))) -+ return where; -+ } -+ } -+ } -+ else if (GET_CODE (node->loc) == GET_CODE (loc)) -+ { -+ rtx val1, val2; -+ if (!rtx_equal_p_cb (loc, node->loc, ignore_first_value_pair)) - { -- location_chain where; -- VALUE_RECURSED_INTO (node->loc) = true; -- VEC_safe_push (rtx, heap, values_to_unmark, node->loc); -- if ((where = find_loc_in_1pdv_1 (loc, var, vars))) -- return where; -+ value_pair[0] = NULL; -+ value_pair[1] = NULL; -+ continue; -+ } -+ if (!value_pair[0]) -+ return node; -+ val1 = value_pair[0]; -+ val2 = value_pair[1]; -+ value_pair[0] = NULL; -+ value_pair[1] = NULL; -+ if (dsm->cur) -+ { -+ decl_or_value dv; -+ htab_t vars; -+ variable var1, var2; -+ dv = dv_from_value (val1); -+ vars = shared_hash_htab (dsm->cur->vars); -+ var1 = (variable) htab_find_with_hash (vars, dv, -+ dv_htab_hash (dv)); -+ if (var1) -+ { -+ dv = dv_from_value (val2); -+ vars = shared_hash_htab (dsm->src->vars); -+ var2 = (variable) htab_find_with_hash (vars, dv, -+ dv_htab_hash (dv)); -+ if (var2) -+ { -+ location_chain s1node = var1->var_part[0].loc_chain; -+ for (; s1node; s1node = s1node->next) -+ if (find_loc_in_1pdv_1 (s1node->loc, var2, dsm)) -+ return node; -+ } -+ } - } - } - -@@ -2287,32 +2378,19 @@ find_loc_in_1pdv_1 (rtx loc, variable va - any values recursively mentioned in the location lists. */ - - static location_chain --find_loc_in_1pdv (rtx loc, variable var, htab_t vars) -+find_loc_in_1pdv (rtx loc, variable var, struct dfset_merge *dsm) - { - location_chain ret; - unsigned int i; - rtx value; - -- ret = find_loc_in_1pdv_1 (loc, var, vars); -+ ret = find_loc_in_1pdv_1 (loc, var, dsm); - for (i = 0; VEC_iterate (rtx, values_to_unmark, i, value); i++) - VALUE_RECURSED_INTO (value) = false; - VEC_truncate (rtx, values_to_unmark, 0); - return ret; - } - --/* Hash table iteration argument passed to variable_merge. */ --struct dfset_merge --{ -- /* The set in which the merge is to be inserted. */ -- dataflow_set *dst; -- /* The set that we're iterating in. */ -- dataflow_set *cur; -- /* The set that may contain the other dv we are to merge with. */ -- dataflow_set *src; -- /* Number of onepart dvs in src. */ -- int src_onepart_cnt; --}; -- - /* Insert LOC in *DNODE, if it's not there yet. The list must be in - loc_cmp order, and it is maintained as such. */ - -@@ -2351,7 +2429,6 @@ intersect_loc_chains (rtx val, location_ - location_chain s1node, variable s2var) - { - dataflow_set *s1set = dsm->cur; -- dataflow_set *s2set = dsm->src; - location_chain found; - - for (; s1node; s1node = s1node->next) -@@ -2359,8 +2436,7 @@ intersect_loc_chains (rtx val, location_ - if (s1node->loc == val) - continue; - -- if ((found = find_loc_in_1pdv (s1node->loc, s2var, -- shared_hash_htab (s2set->vars)))) -+ if ((found = find_loc_in_1pdv (s1node->loc, s2var, dsm))) - { - insert_into_intersection (dest, s1node->loc, - MIN (s1node->init, found->init)); -@@ -3592,7 +3668,10 @@ variable_post_merge_perm_vals (void **ps - var = shared_hash_find (set->vars, dv); - if (var) - { -- if (find_loc_in_1pdv (pnode->loc, var, shared_hash_htab (set->vars))) -+ struct dfset_merge dsm; -+ memset (&dsm, '\0', sizeof (dsm)); -+ dsm.src = set; -+ if (find_loc_in_1pdv (pnode->loc, var, &dsm)) - return 1; - val_reset (set, dv); - } -@@ -3808,6 +3808,7 @@ dataflow_set_preserve_mem_locs (void **s - { - tree decl = dv_as_decl (var->dv); - location_chain loc, *locp; -+ bool changed = false; - - if (!var->n_var_parts) - return 1; -@@ -3881,6 +3882,9 @@ dataflow_set_preserve_mem_locs (void **s - if (emit_notes) - remove_value_chains (var->dv, old_loc); - *locp = loc->next; -+ if (var->var_part[0].cur_loc -+ && rtx_equal_p (loc->loc, var->var_part[0].cur_loc)) -+ changed = true; - pool_free (loc_chain_pool, loc); - } - -@@ -3889,6 +3893,12 @@ dataflow_set_preserve_mem_locs (void **s - var->n_var_parts--; - if (emit_notes && dv_is_value_p (var->dv)) - remove_cselib_value_chains (var->dv); -+ gcc_assert (changed); -+ } -+ if (changed) -+ { -+ if (var->n_var_parts && var->var_part[0].loc_chain) -+ var->var_part[0].cur_loc = var->var_part[0].loc_chain->loc; - variable_was_changed (var, set); - } - } ---- gcc/testsuite/gcc.dg/guality/pr43051-1.c.jj 2010-02-17 10:17:12.000000000 +0100 -+++ gcc/testsuite/gcc.dg/guality/pr43051-1.c 2010-02-17 10:41:43.000000000 +0100 -@@ -0,0 +1,57 @@ -+/* PR debug/43051 */ -+/* { dg-do run } */ -+/* { dg-options "-g" } */ -+ -+extern void abort (void); -+ -+static void __attribute__ ((noinline)) -+foo (const char *x, long long y, int z) -+{ -+ asm volatile ("" : : "r" (x), "r" ((int) y), "r" (z) : "memory"); -+} -+ -+struct S -+{ -+ struct S *n; -+ int v; -+}; -+ -+struct S a[10]; -+ -+struct S * __attribute__ ((noinline)) -+bar (struct S *c, int v, struct S *e) -+{ -+#ifdef __i386__ -+ register int si asm ("esi"), di asm ("edi"), bx -+# if !defined (__pic__) && !defined (__APPLE__) -+ asm ("ebx") -+# endif -+ ; -+ asm volatile ("" : "=r" (si), "=r" (di), "=r" (bx)); -+#endif -+ while (c < e) -+ { -+ foo ("c", (unsigned long) c, 0); /* { dg-final { gdb-test 34 "c" "\&a\[0\]" } } */ -+ foo ("v", v, 1); /* { dg-final { gdb-test 35 "v" "1" } } */ -+ foo ("e", (unsigned long) e, 2); /* { dg-final { gdb-test 36 "e" "\&a\[1\]" } } */ -+ if (c->v == v) -+ return c; -+ foo ("c", (unsigned long) c, 3); /* { dg-final { gdb-test 39 "c" "\&a\[0\]" } } */ -+ foo ("v", v, 4); /* { dg-final { gdb-test 40 "v" "1" } } */ -+ foo ("e", (unsigned long) e, 5); /* { dg-final { gdb-test 41 "e" "\&a\[1\]" } } */ -+ c++; -+ } -+#ifdef __i386__ -+ asm volatile ("" : : "r" (si), "r" (di), "r" (bx)); -+#endif -+ return 0; -+} -+ -+int -+main () -+{ -+ asm volatile ("" : : "r" (&a[0]) : "memory"); -+ if (bar (&a[a[0].v], a[0].v + 1, &a[a[0].v + 1])) -+ abort (); -+ return 0; -+} diff --git a/import.log b/import.log index ebbdf02..6207914 100644 --- a/import.log +++ b/import.log @@ -10,3 +10,4 @@ gcc-4_4_3-6_fc13:HEAD:gcc-4.4.3-6.fc13.src.rpm:1265925505 gcc-4_4_3-7_fc13:F-13:gcc-4.4.3-7.fc13.src.rpm:1266793373 gcc-4_4_3-8_fc13:F-13:gcc-4.4.3-8.fc13.src.rpm:1267230097 gcc-4_4_3-9_fc13:F-13:gcc-4.4.3-9.fc13.src.rpm:1268168014 +gcc-4_4_3-10_fc13:F-13:gcc-4.4.3-10.fc13.src.rpm:1268755563 diff --git a/sources b/sources index ba37ae1..5d79661 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz -2906b19113678f1ec9841b33b4b59553 gcc-4.4.3-20100309.tar.bz2 +f13b75fdfee662d1d214a0c4820a2d8a gcc-4.4.3-20100316.tar.bz2 From 6df01761ec2a68b937f61d7d4ca66ca2cd0ed221 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 22 Mar 2010 16:01:05 +0000 Subject: [PATCH 16/38] 4.4.3-11 --- .cvsignore | 2 +- gcc.spec | 15 ++++++++++++--- import.log | 1 + sources | 2 +- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.cvsignore b/.cvsignore index 34d71ba..4066151 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ fastjar-0.97.tar.gz -gcc-4.4.3-20100316.tar.bz2 +gcc-4.4.3-20100322.tar.bz2 diff --git a/gcc.spec b/gcc.spec index 21777b2..bf6c782 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,9 +1,9 @@ -%global DATE 20100316 -%global SVNREV 157487 +%global DATE 20100322 +%global SVNREV 157637 %global gcc_version 4.4.3 # Note, gcc_release must be integer, if you want to add suffixes to # %{release}, append them after %{gcc_release} on Release: line. -%global gcc_release 10 +%global gcc_release 11 %global _unpackaged_files_terminate_build 0 %global multilib_64_archs sparc64 ppc64 s390x x86_64 %if 0%{?fedora} >= 13 || 0%{?rhel} >= 6 @@ -1876,6 +1876,15 @@ fi %doc rpm.doc/changelogs/libmudflap/ChangeLog* %changelog +* Mon Mar 22 2010 Jakub Jelinek 4.4.3-11 +- update from gcc-4_4-branch + - PRs c++/43116, libfortran/43265, libgomp/42942, middle-end/42718, + middle-end/43419, rtl-optimization/43360, rtl-optimization/43438, + target/43305, target/43417 +- VTA backports + - PRs bootstrap/43399, bootstrap/43403, debug/42873, debug/43058, + debug/43443, target/43399 + * Tue Mar 16 2010 Jakub Jelinek 4.4.3-10 - update from gcc-4_4-branch - PRs fortran/43228, fortran/43303, libfortran/43265, libfortran/43320 diff --git a/import.log b/import.log index 6207914..3d8dbef 100644 --- a/import.log +++ b/import.log @@ -11,3 +11,4 @@ gcc-4_4_3-7_fc13:F-13:gcc-4.4.3-7.fc13.src.rpm:1266793373 gcc-4_4_3-8_fc13:F-13:gcc-4.4.3-8.fc13.src.rpm:1267230097 gcc-4_4_3-9_fc13:F-13:gcc-4.4.3-9.fc13.src.rpm:1268168014 gcc-4_4_3-10_fc13:F-13:gcc-4.4.3-10.fc13.src.rpm:1268755563 +gcc-4_4_3-11_fc13:F-13:gcc-4.4.3-11.fc13.src.rpm:1269273622 diff --git a/sources b/sources index 5d79661..4465f4e 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz -f13b75fdfee662d1d214a0c4820a2d8a gcc-4.4.3-20100316.tar.bz2 +f60870305f35c02487c3f31b9fd8498d gcc-4.4.3-20100322.tar.bz2 From 60625efadab3d46f4fe5f7f09764f4984338a365 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 25 Mar 2010 15:34:19 +0000 Subject: [PATCH 17/38] 4.4.3-12 --- .cvsignore | 2 +- gcc.spec | 16 +++++++++++++--- import.log | 1 + sources | 2 +- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.cvsignore b/.cvsignore index 4066151..69f96fa 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ fastjar-0.97.tar.gz -gcc-4.4.3-20100322.tar.bz2 +gcc-4.4.3-20100325.tar.bz2 diff --git a/gcc.spec b/gcc.spec index bf6c782..1113ef0 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,9 +1,9 @@ -%global DATE 20100322 -%global SVNREV 157637 +%global DATE 20100325 +%global SVNREV 157725 %global gcc_version 4.4.3 # Note, gcc_release must be integer, if you want to add suffixes to # %{release}, append them after %{gcc_release} on Release: line. -%global gcc_release 11 +%global gcc_release 12 %global _unpackaged_files_terminate_build 0 %global multilib_64_archs sparc64 ppc64 s390x x86_64 %if 0%{?fedora} >= 13 || 0%{?rhel} >= 6 @@ -1876,6 +1876,16 @@ fi %doc rpm.doc/changelogs/libmudflap/ChangeLog* %changelog +* Thu Mar 25 2010 Jakub Jelinek 4.4.3-12 +- update from gcc-4_4-branch + - PRs c/43385, target/43348, tree-optimization/43415 +- VTA backports + - PRs bootstrap/43511, debug/19192, debug/43479, debug/43508 +- provide unwind info even for C++ thunks on x86, x86-64 and s390{,x} + (PR target/43498) +- provide unwind info for x86 PIC thunks even when not using CFI assembler + directives (PR debug/43293) + * Mon Mar 22 2010 Jakub Jelinek 4.4.3-11 - update from gcc-4_4-branch - PRs c++/43116, libfortran/43265, libgomp/42942, middle-end/42718, diff --git a/import.log b/import.log index 3d8dbef..664be18 100644 --- a/import.log +++ b/import.log @@ -12,3 +12,4 @@ gcc-4_4_3-8_fc13:F-13:gcc-4.4.3-8.fc13.src.rpm:1267230097 gcc-4_4_3-9_fc13:F-13:gcc-4.4.3-9.fc13.src.rpm:1268168014 gcc-4_4_3-10_fc13:F-13:gcc-4.4.3-10.fc13.src.rpm:1268755563 gcc-4_4_3-11_fc13:F-13:gcc-4.4.3-11.fc13.src.rpm:1269273622 +gcc-4_4_3-12_fc13:F-13:gcc-4.4.3-12.fc13.src.rpm:1269531219 diff --git a/sources b/sources index 4465f4e..8e35c60 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz -f60870305f35c02487c3f31b9fd8498d gcc-4.4.3-20100322.tar.bz2 +3d33f4ff90c59e54f0fd68d03e1332d5 gcc-4.4.3-20100325.tar.bz2 From 5f4cc7d37047b8833344566d3ee76218b4dfb723 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Sat, 27 Mar 2010 14:50:40 +0000 Subject: [PATCH 18/38] 4.4.3-13 --- .cvsignore | 2 +- gcc.spec | 12 +++++++++--- import.log | 1 + sources | 2 +- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.cvsignore b/.cvsignore index 69f96fa..aa82b87 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ fastjar-0.97.tar.gz -gcc-4.4.3-20100325.tar.bz2 +gcc-4.4.3-20100327.tar.bz2 diff --git a/gcc.spec b/gcc.spec index 1113ef0..449cadd 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,9 +1,9 @@ -%global DATE 20100325 -%global SVNREV 157725 +%global DATE 20100327 +%global SVNREV 157778 %global gcc_version 4.4.3 # Note, gcc_release must be integer, if you want to add suffixes to # %{release}, append them after %{gcc_release} on Release: line. -%global gcc_release 12 +%global gcc_release 13 %global _unpackaged_files_terminate_build 0 %global multilib_64_archs sparc64 ppc64 s390x x86_64 %if 0%{?fedora} >= 13 || 0%{?rhel} >= 6 @@ -1876,6 +1876,12 @@ fi %doc rpm.doc/changelogs/libmudflap/ChangeLog* %changelog +* Sat Mar 27 2010 Jakub Jelinek 4.4.3-13 +- update from gcc-4_4-branch + - PRs c/43381, libfortran/43517, target/42113 +- VTA backports + - PRs debug/43516, debug/43540 + * Thu Mar 25 2010 Jakub Jelinek 4.4.3-12 - update from gcc-4_4-branch - PRs c/43385, target/43348, tree-optimization/43415 diff --git a/import.log b/import.log index 664be18..7e6f75c 100644 --- a/import.log +++ b/import.log @@ -13,3 +13,4 @@ gcc-4_4_3-9_fc13:F-13:gcc-4.4.3-9.fc13.src.rpm:1268168014 gcc-4_4_3-10_fc13:F-13:gcc-4.4.3-10.fc13.src.rpm:1268755563 gcc-4_4_3-11_fc13:F-13:gcc-4.4.3-11.fc13.src.rpm:1269273622 gcc-4_4_3-12_fc13:F-13:gcc-4.4.3-12.fc13.src.rpm:1269531219 +gcc-4_4_3-13_fc13:F-13:gcc-4.4.3-13.fc13.src.rpm:1269701401 diff --git a/sources b/sources index 8e35c60..1b31d11 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz -3d33f4ff90c59e54f0fd68d03e1332d5 gcc-4.4.3-20100325.tar.bz2 +2493fe9ab24ac56473b13cbf62634385 gcc-4.4.3-20100327.tar.bz2 From 04b13b88d451d0b6bb8bb94912cfaca3c3c803b8 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 1 Apr 2010 15:05:15 +0000 Subject: [PATCH 19/38] 4.4.3-14 --- .cvsignore | 2 +- gcc.spec | 16 +++++++++++++--- import.log | 1 + sources | 2 +- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.cvsignore b/.cvsignore index aa82b87..dadedf2 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ fastjar-0.97.tar.gz -gcc-4.4.3-20100327.tar.bz2 +gcc-4.4.3-20100401.tar.bz2 diff --git a/gcc.spec b/gcc.spec index 449cadd..34d9bf8 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,9 +1,9 @@ -%global DATE 20100327 -%global SVNREV 157778 +%global DATE 20100401 +%global SVNREV 157910 %global gcc_version 4.4.3 # Note, gcc_release must be integer, if you want to add suffixes to # %{release}, append them after %{gcc_release} on Release: line. -%global gcc_release 13 +%global gcc_release 14 %global _unpackaged_files_terminate_build 0 %global multilib_64_archs sparc64 ppc64 s390x x86_64 %if 0%{?fedora} >= 13 || 0%{?rhel} >= 6 @@ -1876,6 +1876,16 @@ fi %doc rpm.doc/changelogs/libmudflap/ChangeLog* %changelog +* Thu Apr 1 2010 Jakub Jelinek 4.4.3-14 +- update from gcc-4_4-branch + - PRs other/43562, c++/41185, c++/41786, fortran/43409, fortran/43551, + libfortran/43409, middle-end/43600, target/39254, target/43524, + tree-optimization/43528 +- update raw string support to match N3077 +- VTA backports + - PRs bootstrap/43596, debug/42977, debug/43557, debug/43593, + target/43580 + * Sat Mar 27 2010 Jakub Jelinek 4.4.3-13 - update from gcc-4_4-branch - PRs c/43381, libfortran/43517, target/42113 diff --git a/import.log b/import.log index 7e6f75c..e711a40 100644 --- a/import.log +++ b/import.log @@ -14,3 +14,4 @@ gcc-4_4_3-10_fc13:F-13:gcc-4.4.3-10.fc13.src.rpm:1268755563 gcc-4_4_3-11_fc13:F-13:gcc-4.4.3-11.fc13.src.rpm:1269273622 gcc-4_4_3-12_fc13:F-13:gcc-4.4.3-12.fc13.src.rpm:1269531219 gcc-4_4_3-13_fc13:F-13:gcc-4.4.3-13.fc13.src.rpm:1269701401 +gcc-4_4_3-14_fc13:F-13:gcc-4.4.3-14.fc13.src.rpm:1270134283 diff --git a/sources b/sources index 1b31d11..564c4e1 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz -2493fe9ab24ac56473b13cbf62634385 gcc-4.4.3-20100327.tar.bz2 +d8da20f9cf87eeef0d235a93e5ef197f gcc-4.4.3-20100401.tar.bz2 From 3ac313c7c86c7a4c0aac8c052e97706fcc1346c2 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 7 Apr 2010 13:10:57 +0000 Subject: [PATCH 20/38] 4.4.3-15 --- .cvsignore | 2 +- gcc.spec | 13 ++++++++++--- import.log | 1 + sources | 2 +- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.cvsignore b/.cvsignore index dadedf2..592032b 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ fastjar-0.97.tar.gz -gcc-4.4.3-20100401.tar.bz2 +gcc-4.4.3-20100407.tar.bz2 diff --git a/gcc.spec b/gcc.spec index 34d9bf8..a539e8a 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,9 +1,9 @@ -%global DATE 20100401 -%global SVNREV 157910 +%global DATE 20100407 +%global SVNREV 158059 %global gcc_version 4.4.3 # Note, gcc_release must be integer, if you want to add suffixes to # %{release}, append them after %{gcc_release} on Release: line. -%global gcc_release 14 +%global gcc_release 15 %global _unpackaged_files_terminate_build 0 %global multilib_64_archs sparc64 ppc64 s390x x86_64 %if 0%{?fedora} >= 13 || 0%{?rhel} >= 6 @@ -1876,6 +1876,13 @@ fi %doc rpm.doc/changelogs/libmudflap/ChangeLog* %changelog +* Wed Apr 7 2010 Jakub Jelinek 4.4.3-15 +- update from gcc-4_4-branch + - PRs libfortran/43605, target/43638 +- AMD XOP fixes (#579493, PRs target/42664, target/43667) +- fix raw string support on big endian hosts (PR preprocessor/43642) +- allow -gdwarf-4 option + * Thu Apr 1 2010 Jakub Jelinek 4.4.3-14 - update from gcc-4_4-branch - PRs other/43562, c++/41185, c++/41786, fortran/43409, fortran/43551, diff --git a/import.log b/import.log index e711a40..3cc709d 100644 --- a/import.log +++ b/import.log @@ -15,3 +15,4 @@ gcc-4_4_3-11_fc13:F-13:gcc-4.4.3-11.fc13.src.rpm:1269273622 gcc-4_4_3-12_fc13:F-13:gcc-4.4.3-12.fc13.src.rpm:1269531219 gcc-4_4_3-13_fc13:F-13:gcc-4.4.3-13.fc13.src.rpm:1269701401 gcc-4_4_3-14_fc13:F-13:gcc-4.4.3-14.fc13.src.rpm:1270134283 +gcc-4_4_3-15_fc13:F-13:gcc-4.4.3-15.fc13.src.rpm:1270645785 diff --git a/sources b/sources index 564c4e1..daf2885 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz -d8da20f9cf87eeef0d235a93e5ef197f gcc-4.4.3-20100401.tar.bz2 +56f0fb3a321d76a9b73a04b38f4714f9 gcc-4.4.3-20100407.tar.bz2 From c7ea8b534d97e0005a891ab2cc63fc52a4eaea3e Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 7 Apr 2010 14:24:11 +0000 Subject: [PATCH 21/38] 4.4.3-15 --- gcc.spec | 2 +- sources | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc.spec b/gcc.spec index a539e8a..7ffc6fc 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,5 +1,5 @@ %global DATE 20100407 -%global SVNREV 158059 +%global SVNREV 158061 %global gcc_version 4.4.3 # Note, gcc_release must be integer, if you want to add suffixes to # %{release}, append them after %{gcc_release} on Release: line. diff --git a/sources b/sources index daf2885..d982372 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz -56f0fb3a321d76a9b73a04b38f4714f9 gcc-4.4.3-20100407.tar.bz2 +3eba38711ef2da0f57c5e5b6df3be9fd gcc-4.4.3-20100407.tar.bz2 From d3daf567b2469e96ac00e830383c0c6de1198874 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 9 Apr 2010 09:08:10 +0000 Subject: [PATCH 22/38] 4.4.3-16 --- .cvsignore | 2 +- gcc.spec | 16 +++++++++++++--- import.log | 1 + sources | 2 +- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.cvsignore b/.cvsignore index 592032b..efa00f8 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ fastjar-0.97.tar.gz -gcc-4.4.3-20100407.tar.bz2 +gcc-4.4.3-20100409.tar.bz2 diff --git a/gcc.spec b/gcc.spec index 7ffc6fc..85b6928 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,9 +1,9 @@ -%global DATE 20100407 -%global SVNREV 158061 +%global DATE 20100409 +%global SVNREV 158152 %global gcc_version 4.4.3 # Note, gcc_release must be integer, if you want to add suffixes to # %{release}, append them after %{gcc_release} on Release: line. -%global gcc_release 15 +%global gcc_release 16 %global _unpackaged_files_terminate_build 0 %global multilib_64_archs sparc64 ppc64 s390x x86_64 %if 0%{?fedora} >= 13 || 0%{?rhel} >= 6 @@ -1876,6 +1876,16 @@ fi %doc rpm.doc/changelogs/libmudflap/ChangeLog* %changelog +* Fri Apr 9 2010 Jakub Jelinek 4.4.3-16 +- update from gcc-4_4-branch + - PRs ada/41912, fortran/43539, middle-end/42956, middle-end/43614, + target/38085, target/43458, target/43643, target/43668, + tree-optimization/43186, tree-optimization/43560, + tree-optimization/43607, tree-optimization/43629 +- VTA backports + - PR debug/43670 +- fix xop-vpermil2p* tests (target/43103) + * Wed Apr 7 2010 Jakub Jelinek 4.4.3-15 - update from gcc-4_4-branch - PRs libfortran/43605, target/43638 diff --git a/import.log b/import.log index 3cc709d..7c02a4e 100644 --- a/import.log +++ b/import.log @@ -16,3 +16,4 @@ gcc-4_4_3-12_fc13:F-13:gcc-4.4.3-12.fc13.src.rpm:1269531219 gcc-4_4_3-13_fc13:F-13:gcc-4.4.3-13.fc13.src.rpm:1269701401 gcc-4_4_3-14_fc13:F-13:gcc-4.4.3-14.fc13.src.rpm:1270134283 gcc-4_4_3-15_fc13:F-13:gcc-4.4.3-15.fc13.src.rpm:1270645785 +gcc-4_4_3-16_fc13:F-13:gcc-4.4.3-16.fc13.src.rpm:1270804069 diff --git a/sources b/sources index d982372..435847f 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz -3eba38711ef2da0f57c5e5b6df3be9fd gcc-4.4.3-20100407.tar.bz2 +ee0a4dac02527ad0dcfc794deffeccb8 gcc-4.4.3-20100409.tar.bz2 From 8e94c30a0cab7cff79c04889f3f93138702eadab Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 22 Apr 2010 09:24:33 +0000 Subject: [PATCH 23/38] 4.4.3-18 --- .cvsignore | 2 +- gcc.spec | 17 ++++++++++++++--- import.log | 1 + sources | 2 +- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.cvsignore b/.cvsignore index efa00f8..d5b4e6b 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ fastjar-0.97.tar.gz -gcc-4.4.3-20100409.tar.bz2 +gcc-4.4.3-20100422.tar.bz2 diff --git a/gcc.spec b/gcc.spec index 85b6928..40c1a88 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,9 +1,9 @@ -%global DATE 20100409 -%global SVNREV 158152 +%global DATE 20100422 +%global SVNREV 158631 %global gcc_version 4.4.3 # Note, gcc_release must be integer, if you want to add suffixes to # %{release}, append them after %{gcc_release} on Release: line. -%global gcc_release 16 +%global gcc_release 18 %global _unpackaged_files_terminate_build 0 %global multilib_64_archs sparc64 ppc64 s390x x86_64 %if 0%{?fedora} >= 13 || 0%{?rhel} >= 6 @@ -1876,6 +1876,17 @@ fi %doc rpm.doc/changelogs/libmudflap/ChangeLog* %changelog +* Thu Apr 22 2010 Jakub Jelinek 4.4.3-18 +- update from gcc-4_4-branch + - PRs fortran/43339, fortran/43836, libgcj/40860, libgomp/43569, + libgomp/43706, libstdc++/40518, middle-end/43337, middle-end/43570, + tree-optimization/43769, tree-optimization/43771 + - fix ICE when compiling 64-bit Wine (#583501, PR target/43662) +- VTA backports + - PRs debug/40040, debug/43762 +- add support for -Wunused-but-set-{parameter,variable} non-default + warnings for C (#538266, PRs c/18624, bootstrap/43699) + * Fri Apr 9 2010 Jakub Jelinek 4.4.3-16 - update from gcc-4_4-branch - PRs ada/41912, fortran/43539, middle-end/42956, middle-end/43614, diff --git a/import.log b/import.log index 7c02a4e..161a233 100644 --- a/import.log +++ b/import.log @@ -17,3 +17,4 @@ gcc-4_4_3-13_fc13:F-13:gcc-4.4.3-13.fc13.src.rpm:1269701401 gcc-4_4_3-14_fc13:F-13:gcc-4.4.3-14.fc13.src.rpm:1270134283 gcc-4_4_3-15_fc13:F-13:gcc-4.4.3-15.fc13.src.rpm:1270645785 gcc-4_4_3-16_fc13:F-13:gcc-4.4.3-16.fc13.src.rpm:1270804069 +gcc-4_4_3-18_fc13:F-13:gcc-4.4.3-18.fc13.src.rpm:1271928249 diff --git a/sources b/sources index 435847f..9346677 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz -ee0a4dac02527ad0dcfc794deffeccb8 gcc-4.4.3-20100409.tar.bz2 +02bd520f3420dff4702ad51aaae67278 gcc-4.4.3-20100422.tar.bz2 From 2e32ee04202fda47a5a4baee190ea6d45d8812ec Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 27 Apr 2010 19:29:04 +0000 Subject: [PATCH 24/38] 4.4.3-19 --- .cvsignore | 2 +- gcc.spec | 19 ++- gcc44-pr43893.patch | 246 ++++++++++++++++++++++++++++++++++ gcc44-unwind-debug-hook.patch | 9 +- import.log | 1 + sources | 2 +- 6 files changed, 272 insertions(+), 7 deletions(-) create mode 100644 gcc44-pr43893.patch diff --git a/.cvsignore b/.cvsignore index d5b4e6b..9e9c019 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ fastjar-0.97.tar.gz -gcc-4.4.3-20100422.tar.bz2 +gcc-4.4.3-20100427.tar.bz2 diff --git a/gcc.spec b/gcc.spec index 40c1a88..ffa5a42 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,9 +1,9 @@ -%global DATE 20100422 -%global SVNREV 158631 +%global DATE 20100427 +%global SVNREV 158796 %global gcc_version 4.4.3 # Note, gcc_release must be integer, if you want to add suffixes to # %{release}, append them after %{gcc_release} on Release: line. -%global gcc_release 18 +%global gcc_release 19 %global _unpackaged_files_terminate_build 0 %global multilib_64_archs sparc64 ppc64 s390x x86_64 %if 0%{?fedora} >= 13 || 0%{?rhel} >= 6 @@ -176,6 +176,7 @@ Patch17: gcc44-pr38757.patch Patch18: gcc44-libstdc++-docs.patch Patch19: gcc44-ppc64-aixdesc.patch Patch20: gcc44-no-add-needed.patch +Patch21: gcc44-pr43893.patch Patch1000: fastjar-0.97-segfault.patch Patch1001: fastjar-0.97-len1.patch @@ -487,6 +488,7 @@ which are required to compile with the GNAT. %if 0%{?fedora} >= 13 %patch20 -p0 -b .no-add-needed~ %endif +%patch21 -p0 -b .pr43893~ # This testcase doesn't compile. rm libjava/testsuite/libjava.lang/PR35020* @@ -1876,6 +1878,17 @@ fi %doc rpm.doc/changelogs/libmudflap/ChangeLog* %changelog +* Tue Apr 27 2010 Jakub Jelinek 4.4.3-19 +- Power7 backports (#584993, #585005) + - PRs tree-optimization/43544, target/41787, target/43154, middle-end/42431, + rtl-optimization/43413 +- add @GCC_4.5.0 symbols to libgcc_s + - PRs target/43383, other/25232 +- force DW_CFA_def_cfa instead of DW_CFA_def_cfa_{register,offset{,_sf}} + after DW_CFA_def_cfa_expression +- make sure _Unwind_DebugHook uses standard calling convention +- #pragma omp for fix (PR c/43893) + * Thu Apr 22 2010 Jakub Jelinek 4.4.3-18 - update from gcc-4_4-branch - PRs fortran/43339, fortran/43836, libgcj/40860, libgomp/43569, diff --git a/gcc44-pr43893.patch b/gcc44-pr43893.patch new file mode 100644 index 0000000..e255896 --- /dev/null +++ b/gcc44-pr43893.patch @@ -0,0 +1,246 @@ +2010-04-26 Jakub Jelinek + + PR c/43893 + * c-omp.c (c_finish_omp_for): Handle also EQ_EXPR. + + * testsuite/libgomp.c/pr43893.c: New test. + * testsuite/libgomp.c++/pr43893.C: New test. + +--- gcc/c-omp.c.jj 2009-12-17 15:02:26.000000000 +0100 ++++ gcc/c-omp.c 2010-04-26 18:58:07.000000000 +0200 +@@ -1,7 +1,7 @@ + /* This file contains routines to construct GNU OpenMP constructs, + called from parsing in the C and C++ front ends. + +- Copyright (C) 2005, 2007, 2008, 2009 Free Software Foundation, Inc. ++ Copyright (C) 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + Contributed by Richard Henderson , + Diego Novillo . + +@@ -281,7 +281,8 @@ c_finish_omp_for (location_t locus, tree + || TREE_CODE (cond) == LE_EXPR + || TREE_CODE (cond) == GT_EXPR + || TREE_CODE (cond) == GE_EXPR +- || TREE_CODE (cond) == NE_EXPR) ++ || TREE_CODE (cond) == NE_EXPR ++ || TREE_CODE (cond) == EQ_EXPR) + { + tree op0 = TREE_OPERAND (cond, 0); + tree op1 = TREE_OPERAND (cond, 1); +@@ -326,18 +327,21 @@ c_finish_omp_for (location_t locus, tree + cond_ok = true; + } + +- if (TREE_CODE (cond) == NE_EXPR) ++ if (TREE_CODE (cond) == NE_EXPR ++ || TREE_CODE (cond) == EQ_EXPR) + { + if (!INTEGRAL_TYPE_P (TREE_TYPE (decl))) + cond_ok = false; + else if (operand_equal_p (TREE_OPERAND (cond, 1), + TYPE_MIN_VALUE (TREE_TYPE (decl)), + 0)) +- TREE_SET_CODE (cond, GT_EXPR); ++ TREE_SET_CODE (cond, TREE_CODE (cond) == NE_EXPR ++ ? GT_EXPR : LE_EXPR); + else if (operand_equal_p (TREE_OPERAND (cond, 1), + TYPE_MAX_VALUE (TREE_TYPE (decl)), + 0)) +- TREE_SET_CODE (cond, LT_EXPR); ++ TREE_SET_CODE (cond, TREE_CODE (cond) == NE_EXPR ++ ? LT_EXPR : GE_EXPR); + else + cond_ok = false; + } +--- libgomp/testsuite/libgomp.c/pr43893.c.jj 2010-04-26 19:17:15.000000000 +0200 ++++ libgomp/testsuite/libgomp.c/pr43893.c 2010-04-26 19:17:07.000000000 +0200 +@@ -0,0 +1,61 @@ ++/* PR c/43893 */ ++/* { dg-do run } */ ++ ++extern void abort (void); ++ ++int ++main () ++{ ++ int c; ++ unsigned int i; ++ int j; ++ c = 0; ++#pragma omp parallel for reduction(+:c) ++ for (i = 0; i < 1; i++) ++ c++; ++ if (c != 1) ++ abort (); ++ c = 0; ++#pragma omp parallel for reduction(+:c) ++ for (i = 0; i <= 0; i++) ++ c++; ++ if (c != 1) ++ abort (); ++ c = 0; ++#pragma omp parallel for reduction(+:c) ++ for (j = - __INT_MAX__ - 1; j < - __INT_MAX__; j++) ++ c++; ++ if (c != 1) ++ abort (); ++ c = 0; ++#pragma omp parallel for reduction(+:c) ++ for (j = - __INT_MAX__ - 1; j <= - __INT_MAX__ - 1; j++) ++ c++; ++ if (c != 1) ++ abort (); ++ c = 0; ++#pragma omp parallel for reduction(+:c) ++ for (i = 2U * __INT_MAX__ + 1; i > 2U * __INT_MAX__; i--) ++ c++; ++ if (c != 1) ++ abort (); ++ c = 0; ++#pragma omp parallel for reduction(+:c) ++ for (i = 2U * __INT_MAX__ + 1; i >= 2U * __INT_MAX__ + 1; i--) ++ c++; ++ if (c != 1) ++ abort (); ++ c = 0; ++#pragma omp parallel for reduction(+:c) ++ for (j = __INT_MAX__; j > __INT_MAX__ - 1; j--) ++ c++; ++ if (c != 1) ++ abort (); ++ c = 0; ++#pragma omp parallel for reduction(+:c) ++ for (j = __INT_MAX__; j >= __INT_MAX__; j--) ++ c++; ++ if (c != 1) ++ abort (); ++ return 0; ++} +--- libgomp/testsuite/libgomp.c++/pr43893.C.jj 2010-04-26 19:18:13.000000000 +0200 ++++ libgomp/testsuite/libgomp.c++/pr43893.C 2010-04-26 19:25:33.000000000 +0200 +@@ -0,0 +1,125 @@ ++// PR c/43893 ++// { dg-do run } ++ ++extern "C" void abort (); ++ ++template ++void ++f1 () ++{ ++ int c; ++ T i; ++ c = 0; ++#pragma omp parallel for reduction(+:c) ++ for (i = M; i < N; i++) ++ c++; ++ if (c != 1) ++ abort (); ++} ++ ++template ++void ++f2 () ++{ ++ int c; ++ T i; ++ c = 0; ++#pragma omp parallel for reduction(+:c) ++ for (i = M; i <= N; i++) ++ c++; ++ if (c != 1) ++ abort (); ++} ++ ++template ++void ++f3 () ++{ ++ int c; ++ T i; ++ c = 0; ++#pragma omp parallel for reduction(+:c) ++ for (i = M; i > N; i--) ++ c++; ++ if (c != 1) ++ abort (); ++} ++ ++template ++void ++f4 () ++{ ++ int c; ++ T i; ++ c = 0; ++#pragma omp parallel for reduction(+:c) ++ for (i = M; i >= N; i--) ++ c++; ++ if (c != 1) ++ abort (); ++} ++ ++int ++main () ++{ ++ int c; ++ unsigned int i; ++ int j; ++ c = 0; ++#pragma omp parallel for reduction(+:c) ++ for (i = 0; i < 1; i++) ++ c++; ++ if (c != 1) ++ abort (); ++ f1 (); ++ c = 0; ++#pragma omp parallel for reduction(+:c) ++ for (i = 0; i <= 0; i++) ++ c++; ++ if (c != 1) ++ abort (); ++ f2 (); ++ c = 0; ++#pragma omp parallel for reduction(+:c) ++ for (j = - __INT_MAX__ - 1; j < - __INT_MAX__; j++) ++ c++; ++ if (c != 1) ++ abort (); ++ f1 (); ++ c = 0; ++#pragma omp parallel for reduction(+:c) ++ for (j = - __INT_MAX__ - 1; j <= - __INT_MAX__ - 1; j++) ++ c++; ++ if (c != 1) ++ abort (); ++ f2 (); ++ c = 0; ++#pragma omp parallel for reduction(+:c) ++ for (i = 2U * __INT_MAX__ + 1; i > 2U * __INT_MAX__; i--) ++ c++; ++ if (c != 1) ++ abort (); ++ f3 (); ++ c = 0; ++#pragma omp parallel for reduction(+:c) ++ for (i = 2U * __INT_MAX__ + 1; i >= 2U * __INT_MAX__ + 1; i--) ++ c++; ++ if (c != 1) ++ abort (); ++ f4 (); ++ c = 0; ++#pragma omp parallel for reduction(+:c) ++ for (j = __INT_MAX__; j > __INT_MAX__ - 1; j--) ++ c++; ++ if (c != 1) ++ abort (); ++ f3 (); ++ c = 0; ++#pragma omp parallel for reduction(+:c) ++ for (j = __INT_MAX__; j >= __INT_MAX__; j--) ++ c++; ++ if (c != 1) ++ abort (); ++ f4 (); ++ return 0; ++} diff --git a/gcc44-unwind-debug-hook.patch b/gcc44-unwind-debug-hook.patch index e084be5..9b7c59e 100644 --- a/gcc44-unwind-debug-hook.patch +++ b/gcc44-unwind-debug-hook.patch @@ -1,3 +1,7 @@ +2010-04-27 Jakub Jelinek + + * unwind-dw2.c (_Unwind_DebugHook): Add used attribute. + 2009-05-27 Tom Tromey * unwind-dw2.c (_Unwind_DebugHook): New function. @@ -5,11 +9,12 @@ --- gcc/unwind-dw2.c (revision 147933) +++ gcc/unwind-dw2.c (revision 147934) -@@ -1473,18 +1473,31 @@ uw_init_context_1 (struct _Unwind_Contex +@@ -1473,18 +1473,32 @@ uw_init_context_1 (struct _Unwind_Contex context->ra = __builtin_extract_return_addr (outer_ra); } -+static void _Unwind_DebugHook (void *, void *) __attribute__ ((__noinline__)); ++static void _Unwind_DebugHook (void *, void *) ++ __attribute__ ((__noinline__, __used__)); + +/* This function is called during unwinding. It is intended as a hook + for a debugger to intercept exceptions. CFA is the CFA of the diff --git a/import.log b/import.log index 161a233..da225ac 100644 --- a/import.log +++ b/import.log @@ -18,3 +18,4 @@ gcc-4_4_3-14_fc13:F-13:gcc-4.4.3-14.fc13.src.rpm:1270134283 gcc-4_4_3-15_fc13:F-13:gcc-4.4.3-15.fc13.src.rpm:1270645785 gcc-4_4_3-16_fc13:F-13:gcc-4.4.3-16.fc13.src.rpm:1270804069 gcc-4_4_3-18_fc13:F-13:gcc-4.4.3-18.fc13.src.rpm:1271928249 +gcc-4_4_3-19_fc13:F-13:gcc-4.4.3-19.fc13.src.rpm:1272396517 diff --git a/sources b/sources index 9346677..1fe86a1 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz -02bd520f3420dff4702ad51aaae67278 gcc-4.4.3-20100422.tar.bz2 +21ad76ccb34ea46212625ab031ecfb41 gcc-4.4.3-20100427.tar.bz2 From 4a75f3b63020ac340bf0f62676b473212dc59799 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 30 Apr 2010 20:06:37 +0000 Subject: [PATCH 25/38] 4.4.4-1 --- .cvsignore | 2 +- gcc.spec | 16 +++++++++++----- import.log | 1 + sources | 2 +- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.cvsignore b/.cvsignore index 9e9c019..8dfb73b 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ fastjar-0.97.tar.gz -gcc-4.4.3-20100427.tar.bz2 +gcc-4.4.4-20100430.tar.bz2 diff --git a/gcc.spec b/gcc.spec index ffa5a42..eb6f9ac 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,9 +1,9 @@ -%global DATE 20100427 -%global SVNREV 158796 -%global gcc_version 4.4.3 +%global DATE 20100430 +%global SVNREV 158946 +%global gcc_version 4.4.4 # Note, gcc_release must be integer, if you want to add suffixes to # %{release}, append them after %{gcc_release} on Release: line. -%global gcc_release 19 +%global gcc_release 1 %global _unpackaged_files_terminate_build 0 %global multilib_64_archs sparc64 ppc64 s390x x86_64 %if 0%{?fedora} >= 13 || 0%{?rhel} >= 6 @@ -502,7 +502,7 @@ tar xzf %{SOURCE4} tar xjf %{SOURCE10} %endif -sed -i -e 's/4\.4\.4/4.4.3/' gcc/BASE-VER +sed -i -e 's/4\.4\.5/4.4.4/' gcc/BASE-VER echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE # Default to -gdwarf-3 rather than -gdwarf-2 @@ -1878,6 +1878,12 @@ fi %doc rpm.doc/changelogs/libmudflap/ChangeLog* %changelog +* Fri Apr 30 2010 Jakub Jelinek 4.4.4-1 +- update from gcc-4_4-branch + - GCC 4.4.4 release +- VTA backports + - PR target/43921 + * Tue Apr 27 2010 Jakub Jelinek 4.4.3-19 - Power7 backports (#584993, #585005) - PRs tree-optimization/43544, target/41787, target/43154, middle-end/42431, diff --git a/import.log b/import.log index da225ac..62b448e 100644 --- a/import.log +++ b/import.log @@ -19,3 +19,4 @@ gcc-4_4_3-15_fc13:F-13:gcc-4.4.3-15.fc13.src.rpm:1270645785 gcc-4_4_3-16_fc13:F-13:gcc-4.4.3-16.fc13.src.rpm:1270804069 gcc-4_4_3-18_fc13:F-13:gcc-4.4.3-18.fc13.src.rpm:1271928249 gcc-4_4_3-19_fc13:F-13:gcc-4.4.3-19.fc13.src.rpm:1272396517 +gcc-4_4_4-1_fc13:F-13:gcc-4.4.4-1.fc13.src.rpm:1272657908 diff --git a/sources b/sources index 1fe86a1..682dcc9 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz -21ad76ccb34ea46212625ab031ecfb41 gcc-4.4.3-20100427.tar.bz2 +060fd464e4163a716ac34942ede39591 gcc-4.4.4-20100430.tar.bz2 From abdbcec5b08bddfacee2c00f5f2bc766f20d9b0b Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 3 May 2010 20:25:54 +0000 Subject: [PATCH 26/38] 4.4.4-2 --- .cvsignore | 2 +- gcc.spec | 11 +- gcc44-pr43893.patch | 246 -------------------------------------------- import.log | 1 + sources | 2 +- 5 files changed, 9 insertions(+), 253 deletions(-) delete mode 100644 gcc44-pr43893.patch diff --git a/.cvsignore b/.cvsignore index 8dfb73b..8efaacf 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ fastjar-0.97.tar.gz -gcc-4.4.4-20100430.tar.bz2 +gcc-4.4.4-20100503.tar.bz2 diff --git a/gcc.spec b/gcc.spec index eb6f9ac..7424d56 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,9 +1,9 @@ -%global DATE 20100430 -%global SVNREV 158946 +%global DATE 20100503 +%global SVNREV 159002 %global gcc_version 4.4.4 # Note, gcc_release must be integer, if you want to add suffixes to # %{release}, append them after %{gcc_release} on Release: line. -%global gcc_release 1 +%global gcc_release 2 %global _unpackaged_files_terminate_build 0 %global multilib_64_archs sparc64 ppc64 s390x x86_64 %if 0%{?fedora} >= 13 || 0%{?rhel} >= 6 @@ -176,7 +176,6 @@ Patch17: gcc44-pr38757.patch Patch18: gcc44-libstdc++-docs.patch Patch19: gcc44-ppc64-aixdesc.patch Patch20: gcc44-no-add-needed.patch -Patch21: gcc44-pr43893.patch Patch1000: fastjar-0.97-segfault.patch Patch1001: fastjar-0.97-len1.patch @@ -488,7 +487,6 @@ which are required to compile with the GNAT. %if 0%{?fedora} >= 13 %patch20 -p0 -b .no-add-needed~ %endif -%patch21 -p0 -b .pr43893~ # This testcase doesn't compile. rm libjava/testsuite/libjava.lang/PR35020* @@ -1878,6 +1876,9 @@ fi %doc rpm.doc/changelogs/libmudflap/ChangeLog* %changelog +* Mon May 3 2010 Jakub Jelinek 4.4.4-2 +- fix VTA ICE on subregs of @GOTPCREL symbols (#588154, PR debug/43972) + * Fri Apr 30 2010 Jakub Jelinek 4.4.4-1 - update from gcc-4_4-branch - GCC 4.4.4 release diff --git a/gcc44-pr43893.patch b/gcc44-pr43893.patch deleted file mode 100644 index e255896..0000000 --- a/gcc44-pr43893.patch +++ /dev/null @@ -1,246 +0,0 @@ -2010-04-26 Jakub Jelinek - - PR c/43893 - * c-omp.c (c_finish_omp_for): Handle also EQ_EXPR. - - * testsuite/libgomp.c/pr43893.c: New test. - * testsuite/libgomp.c++/pr43893.C: New test. - ---- gcc/c-omp.c.jj 2009-12-17 15:02:26.000000000 +0100 -+++ gcc/c-omp.c 2010-04-26 18:58:07.000000000 +0200 -@@ -1,7 +1,7 @@ - /* This file contains routines to construct GNU OpenMP constructs, - called from parsing in the C and C++ front ends. - -- Copyright (C) 2005, 2007, 2008, 2009 Free Software Foundation, Inc. -+ Copyright (C) 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. - Contributed by Richard Henderson , - Diego Novillo . - -@@ -281,7 +281,8 @@ c_finish_omp_for (location_t locus, tree - || TREE_CODE (cond) == LE_EXPR - || TREE_CODE (cond) == GT_EXPR - || TREE_CODE (cond) == GE_EXPR -- || TREE_CODE (cond) == NE_EXPR) -+ || TREE_CODE (cond) == NE_EXPR -+ || TREE_CODE (cond) == EQ_EXPR) - { - tree op0 = TREE_OPERAND (cond, 0); - tree op1 = TREE_OPERAND (cond, 1); -@@ -326,18 +327,21 @@ c_finish_omp_for (location_t locus, tree - cond_ok = true; - } - -- if (TREE_CODE (cond) == NE_EXPR) -+ if (TREE_CODE (cond) == NE_EXPR -+ || TREE_CODE (cond) == EQ_EXPR) - { - if (!INTEGRAL_TYPE_P (TREE_TYPE (decl))) - cond_ok = false; - else if (operand_equal_p (TREE_OPERAND (cond, 1), - TYPE_MIN_VALUE (TREE_TYPE (decl)), - 0)) -- TREE_SET_CODE (cond, GT_EXPR); -+ TREE_SET_CODE (cond, TREE_CODE (cond) == NE_EXPR -+ ? GT_EXPR : LE_EXPR); - else if (operand_equal_p (TREE_OPERAND (cond, 1), - TYPE_MAX_VALUE (TREE_TYPE (decl)), - 0)) -- TREE_SET_CODE (cond, LT_EXPR); -+ TREE_SET_CODE (cond, TREE_CODE (cond) == NE_EXPR -+ ? LT_EXPR : GE_EXPR); - else - cond_ok = false; - } ---- libgomp/testsuite/libgomp.c/pr43893.c.jj 2010-04-26 19:17:15.000000000 +0200 -+++ libgomp/testsuite/libgomp.c/pr43893.c 2010-04-26 19:17:07.000000000 +0200 -@@ -0,0 +1,61 @@ -+/* PR c/43893 */ -+/* { dg-do run } */ -+ -+extern void abort (void); -+ -+int -+main () -+{ -+ int c; -+ unsigned int i; -+ int j; -+ c = 0; -+#pragma omp parallel for reduction(+:c) -+ for (i = 0; i < 1; i++) -+ c++; -+ if (c != 1) -+ abort (); -+ c = 0; -+#pragma omp parallel for reduction(+:c) -+ for (i = 0; i <= 0; i++) -+ c++; -+ if (c != 1) -+ abort (); -+ c = 0; -+#pragma omp parallel for reduction(+:c) -+ for (j = - __INT_MAX__ - 1; j < - __INT_MAX__; j++) -+ c++; -+ if (c != 1) -+ abort (); -+ c = 0; -+#pragma omp parallel for reduction(+:c) -+ for (j = - __INT_MAX__ - 1; j <= - __INT_MAX__ - 1; j++) -+ c++; -+ if (c != 1) -+ abort (); -+ c = 0; -+#pragma omp parallel for reduction(+:c) -+ for (i = 2U * __INT_MAX__ + 1; i > 2U * __INT_MAX__; i--) -+ c++; -+ if (c != 1) -+ abort (); -+ c = 0; -+#pragma omp parallel for reduction(+:c) -+ for (i = 2U * __INT_MAX__ + 1; i >= 2U * __INT_MAX__ + 1; i--) -+ c++; -+ if (c != 1) -+ abort (); -+ c = 0; -+#pragma omp parallel for reduction(+:c) -+ for (j = __INT_MAX__; j > __INT_MAX__ - 1; j--) -+ c++; -+ if (c != 1) -+ abort (); -+ c = 0; -+#pragma omp parallel for reduction(+:c) -+ for (j = __INT_MAX__; j >= __INT_MAX__; j--) -+ c++; -+ if (c != 1) -+ abort (); -+ return 0; -+} ---- libgomp/testsuite/libgomp.c++/pr43893.C.jj 2010-04-26 19:18:13.000000000 +0200 -+++ libgomp/testsuite/libgomp.c++/pr43893.C 2010-04-26 19:25:33.000000000 +0200 -@@ -0,0 +1,125 @@ -+// PR c/43893 -+// { dg-do run } -+ -+extern "C" void abort (); -+ -+template -+void -+f1 () -+{ -+ int c; -+ T i; -+ c = 0; -+#pragma omp parallel for reduction(+:c) -+ for (i = M; i < N; i++) -+ c++; -+ if (c != 1) -+ abort (); -+} -+ -+template -+void -+f2 () -+{ -+ int c; -+ T i; -+ c = 0; -+#pragma omp parallel for reduction(+:c) -+ for (i = M; i <= N; i++) -+ c++; -+ if (c != 1) -+ abort (); -+} -+ -+template -+void -+f3 () -+{ -+ int c; -+ T i; -+ c = 0; -+#pragma omp parallel for reduction(+:c) -+ for (i = M; i > N; i--) -+ c++; -+ if (c != 1) -+ abort (); -+} -+ -+template -+void -+f4 () -+{ -+ int c; -+ T i; -+ c = 0; -+#pragma omp parallel for reduction(+:c) -+ for (i = M; i >= N; i--) -+ c++; -+ if (c != 1) -+ abort (); -+} -+ -+int -+main () -+{ -+ int c; -+ unsigned int i; -+ int j; -+ c = 0; -+#pragma omp parallel for reduction(+:c) -+ for (i = 0; i < 1; i++) -+ c++; -+ if (c != 1) -+ abort (); -+ f1 (); -+ c = 0; -+#pragma omp parallel for reduction(+:c) -+ for (i = 0; i <= 0; i++) -+ c++; -+ if (c != 1) -+ abort (); -+ f2 (); -+ c = 0; -+#pragma omp parallel for reduction(+:c) -+ for (j = - __INT_MAX__ - 1; j < - __INT_MAX__; j++) -+ c++; -+ if (c != 1) -+ abort (); -+ f1 (); -+ c = 0; -+#pragma omp parallel for reduction(+:c) -+ for (j = - __INT_MAX__ - 1; j <= - __INT_MAX__ - 1; j++) -+ c++; -+ if (c != 1) -+ abort (); -+ f2 (); -+ c = 0; -+#pragma omp parallel for reduction(+:c) -+ for (i = 2U * __INT_MAX__ + 1; i > 2U * __INT_MAX__; i--) -+ c++; -+ if (c != 1) -+ abort (); -+ f3 (); -+ c = 0; -+#pragma omp parallel for reduction(+:c) -+ for (i = 2U * __INT_MAX__ + 1; i >= 2U * __INT_MAX__ + 1; i--) -+ c++; -+ if (c != 1) -+ abort (); -+ f4 (); -+ c = 0; -+#pragma omp parallel for reduction(+:c) -+ for (j = __INT_MAX__; j > __INT_MAX__ - 1; j--) -+ c++; -+ if (c != 1) -+ abort (); -+ f3 (); -+ c = 0; -+#pragma omp parallel for reduction(+:c) -+ for (j = __INT_MAX__; j >= __INT_MAX__; j--) -+ c++; -+ if (c != 1) -+ abort (); -+ f4 (); -+ return 0; -+} diff --git a/import.log b/import.log index 62b448e..487cf62 100644 --- a/import.log +++ b/import.log @@ -20,3 +20,4 @@ gcc-4_4_3-16_fc13:F-13:gcc-4.4.3-16.fc13.src.rpm:1270804069 gcc-4_4_3-18_fc13:F-13:gcc-4.4.3-18.fc13.src.rpm:1271928249 gcc-4_4_3-19_fc13:F-13:gcc-4.4.3-19.fc13.src.rpm:1272396517 gcc-4_4_4-1_fc13:F-13:gcc-4.4.4-1.fc13.src.rpm:1272657908 +gcc-4_4_4-2_fc13:F-13:gcc-4.4.4-2.fc13.src.rpm:1272918321 diff --git a/sources b/sources index 682dcc9..8d88de5 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz -060fd464e4163a716ac34942ede39591 gcc-4.4.4-20100430.tar.bz2 +4e48e9d511c34389595b2ffafc29ffb5 gcc-4.4.4-20100503.tar.bz2 From 7eb4bda32b7a0a7c6931fb5fcc766bf841f81d4d Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 14 May 2010 21:50:25 +0000 Subject: [PATCH 27/38] 4.4.4-3 --- .cvsignore | 2 +- gcc.spec | 21 ++++++++++++++++++--- import.log | 1 + sources | 2 +- 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/.cvsignore b/.cvsignore index 8efaacf..b3ec3cf 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ fastjar-0.97.tar.gz -gcc-4.4.4-20100503.tar.bz2 +gcc-4.4.4-20100514.tar.bz2 diff --git a/gcc.spec b/gcc.spec index 7424d56..3c5675f 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,9 +1,9 @@ -%global DATE 20100503 -%global SVNREV 159002 +%global DATE 20100514 +%global SVNREV 159406 %global gcc_version 4.4.4 # Note, gcc_release must be integer, if you want to add suffixes to # %{release}, append them after %{gcc_release} on Release: line. -%global gcc_release 2 +%global gcc_release 3 %global _unpackaged_files_terminate_build 0 %global multilib_64_archs sparc64 ppc64 s390x x86_64 %if 0%{?fedora} >= 13 || 0%{?rhel} >= 6 @@ -1876,6 +1876,21 @@ fi %doc rpm.doc/changelogs/libmudflap/ChangeLog* %changelog +* Fri May 14 2010 Jakub Jelinek 4.4.4-3 +- update from gcc-4_4-branch + - PRs debug/43370, documentation/44016, fortran/44036, middle-end/43671, + middle-end/44085, target/43744 +- make comdat guards of STB_GNU_UNIQUE variables also STB_GNU_UNIQUE + (PR c++/44059) +- VTA backports + - PRs debug/42278, debug/43950, debug/43983,debug/44104, debug/44136 + - fix up .debug_macinfo (#479914) +- asm goto fixes (PRs middle-end/44071, middle-end/42739) +- fix up -march=native (PR target/44046) +- C++ -Wunused-but-set-{variable,parameter} support, fixes for C support + (#538266, PRs c++/44062, c/43981) +- -march=bdver1 and -mtune=bdver1 support + * Mon May 3 2010 Jakub Jelinek 4.4.4-2 - fix VTA ICE on subregs of @GOTPCREL symbols (#588154, PR debug/43972) diff --git a/import.log b/import.log index 487cf62..ab00f9c 100644 --- a/import.log +++ b/import.log @@ -21,3 +21,4 @@ gcc-4_4_3-18_fc13:F-13:gcc-4.4.3-18.fc13.src.rpm:1271928249 gcc-4_4_3-19_fc13:F-13:gcc-4.4.3-19.fc13.src.rpm:1272396517 gcc-4_4_4-1_fc13:F-13:gcc-4.4.4-1.fc13.src.rpm:1272657908 gcc-4_4_4-2_fc13:F-13:gcc-4.4.4-2.fc13.src.rpm:1272918321 +gcc-4_4_4-3_fc13:F-13:gcc-4.4.4-3.fc13.src.rpm:1273873717 diff --git a/sources b/sources index 8d88de5..b147997 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz -4e48e9d511c34389595b2ffafc29ffb5 gcc-4.4.4-20100503.tar.bz2 +f0941df8a6d1e8a9443b56122c73be3f gcc-4.4.4-20100514.tar.bz2 From a18c3ea684bc264282fb3aa5ba9602524c4fe8e3 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 18 May 2010 21:15:57 +0000 Subject: [PATCH 28/38] 4.4.4-4 --- .cvsignore | 2 +- gcc.spec | 17 ++++++-- gcc44-debug-sra-be.patch | 92 ++++++++++++++++++++++++++++++++++++++++ import.log | 1 + sources | 2 +- 5 files changed, 109 insertions(+), 5 deletions(-) create mode 100644 gcc44-debug-sra-be.patch diff --git a/.cvsignore b/.cvsignore index b3ec3cf..00c0ebe 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ fastjar-0.97.tar.gz -gcc-4.4.4-20100514.tar.bz2 +gcc-4.4.4-20100518.tar.bz2 diff --git a/gcc.spec b/gcc.spec index 3c5675f..a338abe 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,9 +1,9 @@ -%global DATE 20100514 -%global SVNREV 159406 +%global DATE 20100518 +%global SVNREV 159543 %global gcc_version 4.4.4 # Note, gcc_release must be integer, if you want to add suffixes to # %{release}, append them after %{gcc_release} on Release: line. -%global gcc_release 3 +%global gcc_release 4 %global _unpackaged_files_terminate_build 0 %global multilib_64_archs sparc64 ppc64 s390x x86_64 %if 0%{?fedora} >= 13 || 0%{?rhel} >= 6 @@ -176,6 +176,7 @@ Patch17: gcc44-pr38757.patch Patch18: gcc44-libstdc++-docs.patch Patch19: gcc44-ppc64-aixdesc.patch Patch20: gcc44-no-add-needed.patch +Patch21: gcc44-debug-sra-be.patch Patch1000: fastjar-0.97-segfault.patch Patch1001: fastjar-0.97-len1.patch @@ -487,6 +488,7 @@ which are required to compile with the GNAT. %if 0%{?fedora} >= 13 %patch20 -p0 -b .no-add-needed~ %endif +%patch21 -p0 -b .debug-sra-be~ # This testcase doesn't compile. rm libjava/testsuite/libjava.lang/PR35020* @@ -1876,6 +1878,15 @@ fi %doc rpm.doc/changelogs/libmudflap/ChangeLog* %changelog +* Tue May 18 2010 Jakub Jelinek 4.4.4-4 +- update from gcc-4_4-branch + - PR fortran/44135 +- C++ -Wunused-but-set-variable fix (PR c++/44108) +- avoid C++ gimplification affecting mangling (#591635, PR c++/44148) +- asm goto fixes (PRs middle-end/44102, bootstrap/42347) +- VTA backports + - PRs debug/41371, debug/44112 + * Fri May 14 2010 Jakub Jelinek 4.4.4-3 - update from gcc-4_4-branch - PRs debug/43370, documentation/44016, fortran/44036, middle-end/43671, diff --git a/gcc44-debug-sra-be.patch b/gcc44-debug-sra-be.patch new file mode 100644 index 0000000..8f82f6d --- /dev/null +++ b/gcc44-debug-sra-be.patch @@ -0,0 +1,92 @@ +2010-05-18 Jakub Jelinek + + * dwarf2out.c (new_loc_descr_op_bit_piece): Add offset + argument. Don't use DW_OP_piece if offset is non-zero, + put offset into second DW_OP_bit_piece argument. + (dw_sra_loc_expr): Adjust callers. For memory expressions + compute offset. + +--- gcc/dwarf2out.c.jj 2010-05-15 08:09:16.000000000 +0200 ++++ gcc/dwarf2out.c 2010-05-18 15:49:26.000000000 +0200 +@@ -14364,12 +14364,12 @@ dw_loc_list_1 (tree loc, rtx varloc, int + if it is not possible. */ + + static dw_loc_descr_ref +-new_loc_descr_op_bit_piece (HOST_WIDE_INT bitsize) ++new_loc_descr_op_bit_piece (HOST_WIDE_INT bitsize, HOST_WIDE_INT offset) + { +- if ((bitsize % BITS_PER_UNIT) == 0) ++ if ((bitsize % BITS_PER_UNIT) == 0 && offset == 0) + return new_loc_descr (DW_OP_piece, bitsize / BITS_PER_UNIT, 0); + else if (dwarf_version >= 3 || !dwarf_strict) +- return new_loc_descr (DW_OP_bit_piece, bitsize, 0); ++ return new_loc_descr (DW_OP_bit_piece, bitsize, offset); + else + return NULL; + } +@@ -14448,7 +14448,7 @@ dw_sra_loc_expr (tree decl, rtx loc) + if (padsize > decl_size) + return NULL; + decl_size -= padsize; +- *descr_tail = new_loc_descr_op_bit_piece (padsize); ++ *descr_tail = new_loc_descr_op_bit_piece (padsize, 0); + if (*descr_tail == NULL) + return NULL; + descr_tail = &(*descr_tail)->dw_loc_next; +@@ -14461,7 +14461,46 @@ dw_sra_loc_expr (tree decl, rtx loc) + decl_size -= bitsize; + if (last == NULL) + { +- *descr_tail = new_loc_descr_op_bit_piece (bitsize); ++ HOST_WIDE_INT offset = 0; ++ if (GET_CODE (varloc) == VAR_LOCATION ++ && GET_CODE (PAT_VAR_LOCATION_LOC (varloc)) != PARALLEL) ++ { ++ varloc = PAT_VAR_LOCATION_LOC (varloc); ++ if (GET_CODE (varloc) == EXPR_LIST) ++ varloc = XEXP (varloc, 0); ++ } ++ do ++ { ++ if (GET_CODE (varloc) == CONST ++ || GET_CODE (varloc) == SIGN_EXTEND ++ || GET_CODE (varloc) == ZERO_EXTEND) ++ varloc = XEXP (varloc, 0); ++ else if (GET_CODE (varloc) == SUBREG) ++ varloc = SUBREG_REG (varloc); ++ else ++ break; ++ } ++ while (1); ++ /* DW_OP_bit_size offset should be zero for register ++ or implicit location descriptions and empty location ++ descriptions, but for memory addresses needs big endian ++ adjustment. */ ++ if (MEM_P (varloc) ++ && ((unsigned HOST_WIDE_INT) INTVAL (MEM_SIZE (varloc)) ++ * BITS_PER_UNIT) != bitsize) ++ { ++ unsigned HOST_WIDE_INT memsize ++ = INTVAL (MEM_SIZE (varloc)) * BITS_PER_UNIT; ++ if (BYTES_BIG_ENDIAN != WORDS_BIG_ENDIAN ++ && (memsize > BITS_PER_WORD || bitsize > BITS_PER_WORD)) ++ return NULL; ++ if (memsize < bitsize) ++ return NULL; ++ if (BITS_BIG_ENDIAN) ++ offset = memsize - bitsize; ++ } ++ ++ *descr_tail = new_loc_descr_op_bit_piece (bitsize, offset); + if (*descr_tail == NULL) + return NULL; + descr_tail = &(*descr_tail)->dw_loc_next; +@@ -14472,7 +14511,7 @@ dw_sra_loc_expr (tree decl, rtx loc) + the decl. */ + if (descr != NULL && decl_size != 0) + { +- *descr_tail = new_loc_descr_op_bit_piece (decl_size); ++ *descr_tail = new_loc_descr_op_bit_piece (decl_size, 0); + if (*descr_tail == NULL) + return NULL; + } diff --git a/import.log b/import.log index ab00f9c..2ad5f64 100644 --- a/import.log +++ b/import.log @@ -22,3 +22,4 @@ gcc-4_4_3-19_fc13:F-13:gcc-4.4.3-19.fc13.src.rpm:1272396517 gcc-4_4_4-1_fc13:F-13:gcc-4.4.4-1.fc13.src.rpm:1272657908 gcc-4_4_4-2_fc13:F-13:gcc-4.4.4-2.fc13.src.rpm:1272918321 gcc-4_4_4-3_fc13:F-13:gcc-4.4.4-3.fc13.src.rpm:1273873717 +gcc-4_4_4-4_fc13:F-13:gcc-4.4.4-4.fc13.src.rpm:1274217265 diff --git a/sources b/sources index b147997..ecf79a9 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz -f0941df8a6d1e8a9443b56122c73be3f gcc-4.4.4-20100514.tar.bz2 +b7e838fc8d20ea7431118b45d6a7ecca gcc-4.4.4-20100518.tar.bz2 From 76b93c38a22dc8adcf8efcfe6583712b9972c5bd Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 25 May 2010 22:54:27 +0000 Subject: [PATCH 29/38] 4.4.4-5 --- .cvsignore | 2 +- gcc.spec | 20 ++++--- gcc44-debug-sra-be.patch | 92 ------------------------------- gcc44-java-debug-iface-type.patch | 17 ------ gcc44-pr44199.patch | 60 ++++++++++++++++++++ import.log | 1 + sources | 2 +- 7 files changed, 76 insertions(+), 118 deletions(-) delete mode 100644 gcc44-debug-sra-be.patch delete mode 100644 gcc44-java-debug-iface-type.patch create mode 100644 gcc44-pr44199.patch diff --git a/.cvsignore b/.cvsignore index 00c0ebe..3e46d10 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ fastjar-0.97.tar.gz -gcc-4.4.4-20100518.tar.bz2 +gcc-4.4.4-20100525.tar.bz2 diff --git a/gcc.spec b/gcc.spec index a338abe..01aec4c 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,9 +1,9 @@ -%global DATE 20100518 -%global SVNREV 159543 +%global DATE 20100525 +%global SVNREV 159836 %global gcc_version 4.4.4 # Note, gcc_release must be integer, if you want to add suffixes to # %{release}, append them after %{gcc_release} on Release: line. -%global gcc_release 4 +%global gcc_release 5 %global _unpackaged_files_terminate_build 0 %global multilib_64_archs sparc64 ppc64 s390x x86_64 %if 0%{?fedora} >= 13 || 0%{?rhel} >= 6 @@ -165,7 +165,6 @@ Patch5: gcc44-ppc32-retaddr.patch Patch6: gcc44-pr33763.patch Patch7: gcc44-rh330771.patch Patch8: gcc44-rh341221.patch -Patch9: gcc44-java-debug-iface-type.patch Patch10: gcc44-i386-libgomp.patch Patch11: gcc44-sparc-config-detection.patch Patch12: gcc44-libgomp-omp_h-multilib.patch @@ -176,7 +175,7 @@ Patch17: gcc44-pr38757.patch Patch18: gcc44-libstdc++-docs.patch Patch19: gcc44-ppc64-aixdesc.patch Patch20: gcc44-no-add-needed.patch -Patch21: gcc44-debug-sra-be.patch +Patch21: gcc44-pr44199.patch Patch1000: fastjar-0.97-segfault.patch Patch1001: fastjar-0.97-len1.patch @@ -471,7 +470,6 @@ which are required to compile with the GNAT. %patch6 -p0 -b .pr33763~ %patch7 -p0 -b .rh330771~ %patch8 -p0 -b .rh341221~ -%patch9 -p0 -b .java-debug-iface-type~ %patch10 -p0 -b .i386-libgomp~ %patch11 -p0 -b .sparc-config-detection~ %patch12 -p0 -b .libgomp-omp_h-multilib~ @@ -488,7 +486,7 @@ which are required to compile with the GNAT. %if 0%{?fedora} >= 13 %patch20 -p0 -b .no-add-needed~ %endif -%patch21 -p0 -b .debug-sra-be~ +%patch21 -p0 -b .pr44199~ # This testcase doesn't compile. rm libjava/testsuite/libjava.lang/PR35020* @@ -1878,6 +1876,14 @@ fi %doc rpm.doc/changelogs/libmudflap/ChangeLog* %changelog +* Tue May 25 2010 Jakub Jelinek 4.4.4-5 +- update from gcc-4_4-branch + - PRs bootstrap/43870, debug/44205, target/43733, target/44074, + target/44202, target/44245, tree-optimization/43845 + - fix cv-qual issue with function types (#593750, PR c++/44193) +- VTA backports + - PRs debug/41371, debug/42801, debug/43260, debug/43521 + * Tue May 18 2010 Jakub Jelinek 4.4.4-4 - update from gcc-4_4-branch - PR fortran/44135 diff --git a/gcc44-debug-sra-be.patch b/gcc44-debug-sra-be.patch deleted file mode 100644 index 8f82f6d..0000000 --- a/gcc44-debug-sra-be.patch +++ /dev/null @@ -1,92 +0,0 @@ -2010-05-18 Jakub Jelinek - - * dwarf2out.c (new_loc_descr_op_bit_piece): Add offset - argument. Don't use DW_OP_piece if offset is non-zero, - put offset into second DW_OP_bit_piece argument. - (dw_sra_loc_expr): Adjust callers. For memory expressions - compute offset. - ---- gcc/dwarf2out.c.jj 2010-05-15 08:09:16.000000000 +0200 -+++ gcc/dwarf2out.c 2010-05-18 15:49:26.000000000 +0200 -@@ -14364,12 +14364,12 @@ dw_loc_list_1 (tree loc, rtx varloc, int - if it is not possible. */ - - static dw_loc_descr_ref --new_loc_descr_op_bit_piece (HOST_WIDE_INT bitsize) -+new_loc_descr_op_bit_piece (HOST_WIDE_INT bitsize, HOST_WIDE_INT offset) - { -- if ((bitsize % BITS_PER_UNIT) == 0) -+ if ((bitsize % BITS_PER_UNIT) == 0 && offset == 0) - return new_loc_descr (DW_OP_piece, bitsize / BITS_PER_UNIT, 0); - else if (dwarf_version >= 3 || !dwarf_strict) -- return new_loc_descr (DW_OP_bit_piece, bitsize, 0); -+ return new_loc_descr (DW_OP_bit_piece, bitsize, offset); - else - return NULL; - } -@@ -14448,7 +14448,7 @@ dw_sra_loc_expr (tree decl, rtx loc) - if (padsize > decl_size) - return NULL; - decl_size -= padsize; -- *descr_tail = new_loc_descr_op_bit_piece (padsize); -+ *descr_tail = new_loc_descr_op_bit_piece (padsize, 0); - if (*descr_tail == NULL) - return NULL; - descr_tail = &(*descr_tail)->dw_loc_next; -@@ -14461,7 +14461,46 @@ dw_sra_loc_expr (tree decl, rtx loc) - decl_size -= bitsize; - if (last == NULL) - { -- *descr_tail = new_loc_descr_op_bit_piece (bitsize); -+ HOST_WIDE_INT offset = 0; -+ if (GET_CODE (varloc) == VAR_LOCATION -+ && GET_CODE (PAT_VAR_LOCATION_LOC (varloc)) != PARALLEL) -+ { -+ varloc = PAT_VAR_LOCATION_LOC (varloc); -+ if (GET_CODE (varloc) == EXPR_LIST) -+ varloc = XEXP (varloc, 0); -+ } -+ do -+ { -+ if (GET_CODE (varloc) == CONST -+ || GET_CODE (varloc) == SIGN_EXTEND -+ || GET_CODE (varloc) == ZERO_EXTEND) -+ varloc = XEXP (varloc, 0); -+ else if (GET_CODE (varloc) == SUBREG) -+ varloc = SUBREG_REG (varloc); -+ else -+ break; -+ } -+ while (1); -+ /* DW_OP_bit_size offset should be zero for register -+ or implicit location descriptions and empty location -+ descriptions, but for memory addresses needs big endian -+ adjustment. */ -+ if (MEM_P (varloc) -+ && ((unsigned HOST_WIDE_INT) INTVAL (MEM_SIZE (varloc)) -+ * BITS_PER_UNIT) != bitsize) -+ { -+ unsigned HOST_WIDE_INT memsize -+ = INTVAL (MEM_SIZE (varloc)) * BITS_PER_UNIT; -+ if (BYTES_BIG_ENDIAN != WORDS_BIG_ENDIAN -+ && (memsize > BITS_PER_WORD || bitsize > BITS_PER_WORD)) -+ return NULL; -+ if (memsize < bitsize) -+ return NULL; -+ if (BITS_BIG_ENDIAN) -+ offset = memsize - bitsize; -+ } -+ -+ *descr_tail = new_loc_descr_op_bit_piece (bitsize, offset); - if (*descr_tail == NULL) - return NULL; - descr_tail = &(*descr_tail)->dw_loc_next; -@@ -14472,7 +14511,7 @@ dw_sra_loc_expr (tree decl, rtx loc) - the decl. */ - if (descr != NULL && decl_size != 0) - { -- *descr_tail = new_loc_descr_op_bit_piece (decl_size); -+ *descr_tail = new_loc_descr_op_bit_piece (decl_size, 0); - if (*descr_tail == NULL) - return NULL; - } diff --git a/gcc44-java-debug-iface-type.patch b/gcc44-java-debug-iface-type.patch deleted file mode 100644 index 63a1b50..0000000 --- a/gcc44-java-debug-iface-type.patch +++ /dev/null @@ -1,17 +0,0 @@ -2008-01-25 Jakub Jelinek - - * lang.c (java_classify_record): Revert 2007-12-20 change. - ---- gcc/java/lang.c 2007-12-27 09:09:49.000000000 +0100 -+++ gcc/java/lang.c 2008-01-25 17:43:57.000000000 +0100 -@@ -965,9 +965,7 @@ java_classify_record (tree type) - if (! CLASS_P (type)) - return RECORD_IS_STRUCT; - -- /* ??? GDB does not support DW_TAG_interface_type as of December, -- 2007. Re-enable this at a later time. */ -- if (0 && CLASS_INTERFACE (TYPE_NAME (type))) -+ if (CLASS_INTERFACE (TYPE_NAME (type))) - return RECORD_IS_INTERFACE; - - return RECORD_IS_CLASS; diff --git a/gcc44-pr44199.patch b/gcc44-pr44199.patch new file mode 100644 index 0000000..f68c05c --- /dev/null +++ b/gcc44-pr44199.patch @@ -0,0 +1,60 @@ +2010-05-20 Jakub Jelinek + + PR target/44199 + * config/rs6000/rs6000.c (rs6000_emit_epilogue): If cfun->calls_alloca + or total_size is larger than red zone size for non-V4 ABI, emit a + stack_tie resp. frame_tie insn before stack pointer restore. + * config/rs6000/rs6000.md (frame_tie): New insn. + +--- gcc/config/rs6000/rs6000.c.jj 2010-05-17 07:52:06.000000000 +0200 ++++ gcc/config/rs6000/rs6000.c 2010-05-19 22:15:53.000000000 +0200 +@@ -19775,6 +19775,16 @@ rs6000_emit_epilogue (int sibcall) + frame_reg_rtx = sp_reg_rtx; + if (DEFAULT_ABI == ABI_V4) + frame_reg_rtx = gen_rtx_REG (Pmode, 11); ++ /* Prevent reordering memory accesses against stack pointer restore. */ ++ else if (cfun->calls_alloca ++ || offset_below_red_zone_p (-info->total_size)) ++ { ++ rtx mem1 = gen_rtx_MEM (BLKmode, hard_frame_pointer_rtx); ++ rtx mem2 = gen_rtx_MEM (BLKmode, sp_reg_rtx); ++ MEM_NOTRAP_P (mem1) = 1; ++ MEM_NOTRAP_P (mem2) = 1; ++ emit_insn (gen_frame_tie (mem1, mem2)); ++ } + + insn = emit_insn (gen_add3_insn (frame_reg_rtx, hard_frame_pointer_rtx, + GEN_INT (info->total_size))); +@@ -19784,6 +19794,14 @@ rs6000_emit_epilogue (int sibcall) + && DEFAULT_ABI != ABI_V4 + && !crtl->calls_eh_return) + { ++ /* Prevent reordering memory accesses against stack pointer restore. */ ++ if (cfun->calls_alloca ++ || offset_below_red_zone_p (-info->total_size)) ++ { ++ rtx mem = gen_rtx_MEM (BLKmode, sp_reg_rtx); ++ MEM_NOTRAP_P (mem) = 1; ++ emit_insn (gen_stack_tie (mem)); ++ } + insn = emit_insn (gen_add3_insn (sp_reg_rtx, sp_reg_rtx, + GEN_INT (info->total_size))); + sp_offset = 0; +--- gcc/config/rs6000/rs6000.md.jj 2010-03-26 17:13:37.000000000 +0100 ++++ gcc/config/rs6000/rs6000.md 2010-05-19 22:15:19.000000000 +0200 +@@ -15286,6 +15286,15 @@ (define_insn "stack_tie" + "" + [(set_attr "length" "0")]) + ++; Like stack_tie, but depend on both fp and sp based memory. ++(define_insn "frame_tie" ++ [(set (match_operand:BLK 0 "memory_operand" "+m") ++ (unspec:BLK [(match_dup 0) ++ (match_operand:BLK 1 "memory_operand" "m")] UNSPEC_TIE))] ++ "" ++ "" ++ [(set_attr "length" "0")]) ++ + + (define_expand "epilogue" + [(use (const_int 0))] diff --git a/import.log b/import.log index 2ad5f64..0a4c315 100644 --- a/import.log +++ b/import.log @@ -23,3 +23,4 @@ gcc-4_4_4-1_fc13:F-13:gcc-4.4.4-1.fc13.src.rpm:1272657908 gcc-4_4_4-2_fc13:F-13:gcc-4.4.4-2.fc13.src.rpm:1272918321 gcc-4_4_4-3_fc13:F-13:gcc-4.4.4-3.fc13.src.rpm:1273873717 gcc-4_4_4-4_fc13:F-13:gcc-4.4.4-4.fc13.src.rpm:1274217265 +gcc-4_4_4-5_fc13:F-13:gcc-4.4.4-5.fc13.src.rpm:1274827909 diff --git a/sources b/sources index ecf79a9..d99cd55 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz -b7e838fc8d20ea7431118b45d6a7ecca gcc-4.4.4-20100518.tar.bz2 +c413ea290fdbe54dbd60816ad80857a1 gcc-4.4.4-20100525.tar.bz2 From 3442905dd8397ea8923d437ff00be4b98fffe35a Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 8 Jun 2010 09:59:56 +0000 Subject: [PATCH 30/38] 4.4.4-7 --- .cvsignore | 2 +- gcc.spec | 160 ++++++++++++++++++++++++++++++++++++++++---- gcc44-pr44199.patch | 60 ----------------- import.log | 1 + sources | 2 +- 5 files changed, 151 insertions(+), 74 deletions(-) delete mode 100644 gcc44-pr44199.patch diff --git a/.cvsignore b/.cvsignore index 3e46d10..cb276db 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ fastjar-0.97.tar.gz -gcc-4.4.4-20100525.tar.bz2 +gcc-4.4.4-20100608.tar.bz2 diff --git a/gcc.spec b/gcc.spec index 01aec4c..1f27ec4 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,9 +1,9 @@ -%global DATE 20100525 -%global SVNREV 159836 +%global DATE 20100608 +%global SVNREV 160426 %global gcc_version 4.4.4 # Note, gcc_release must be integer, if you want to add suffixes to # %{release}, append them after %{gcc_release} on Release: line. -%global gcc_release 5 +%global gcc_release 7 %global _unpackaged_files_terminate_build 0 %global multilib_64_archs sparc64 ppc64 s390x x86_64 %if 0%{?fedora} >= 13 || 0%{?rhel} >= 6 @@ -175,7 +175,6 @@ Patch17: gcc44-pr38757.patch Patch18: gcc44-libstdc++-docs.patch Patch19: gcc44-ppc64-aixdesc.patch Patch20: gcc44-no-add-needed.patch -Patch21: gcc44-pr44199.patch Patch1000: fastjar-0.97-segfault.patch Patch1001: fastjar-0.97-len1.patch @@ -242,6 +241,15 @@ This is the GNU implementation of the standard C++ libraries. This package includes the header files and libraries needed for C++ development. This includes rewritten implementation of STL. +%package -n libstdc++-static +Summary: Static libraries for the GNU standard C++ library +Group: Development/Libraries +Requires: libstdc++-devel = %{version}-%{release} +Autoreq: true + +%description -n libstdc++-static +Static libraries for the GNU standard C++ library. + %package -n libstdc++-docs Summary: Documentation for the GNU standard C++ library Group: Development/Libraries @@ -329,13 +337,21 @@ Requires: libmudflap = %{version}-%{release} Requires: gcc = %{version}-%{release} %description -n libmudflap-devel -This package contains headers and static libraries for building -mudflap-instrumented programs. +This package contains headers for building mudflap-instrumented programs. To instrument a non-threaded program, add -fmudflap option to GCC and when linking add -lmudflap, for threaded programs also add -fmudflapth and -lmudflapth. +%package -n libmudflap-static +Summary: Static libraries for mudflap support +Group: Development/Libraries +Requires: libmudflap-devel = %{version}-%{release} + +%description -n libmudflap-static +This package contains static libraries for building mudflap-instrumented +programs. + %package java Summary: Java support for GCC Group: Development/Languages @@ -459,6 +475,15 @@ Autoreq: true GNAT is a GNU Ada 95 front-end to GCC. This package includes libraries, which are required to compile with the GNAT. +%package -n libgnat-static +Summary: GNU Ada 95 static libraries +Group: System Environment/Libraries +Requires: libgnat-devel = %{version}-%{release} +Autoreq: true + +%description -n libgnat-static +GNAT is a GNU Ada 95 front-end to GCC. This package includes static libraries. + %prep %setup -q -n gcc-%{version}-%{DATE} %patch0 -p0 -b .hack~ @@ -486,7 +511,6 @@ which are required to compile with the GNAT. %if 0%{?fedora} >= 13 %patch20 -p0 -b .no-add-needed~ %endif -%patch21 -p0 -b .pr44199~ # This testcase doesn't compile. rm libjava/testsuite/libjava.lang/PR35020* @@ -541,6 +565,7 @@ fi %build %if %{build_java} +export GCJ_PROPERTIES=jdt.compiler.useSingleThread=true # gjar isn't usable, so even when GCC source tree no longer includes # fastjar, build it anyway. mkdir fastjar-%{fastjar_ver}/obj-%{gcc_target_platform} @@ -765,6 +790,7 @@ rm -fr %{buildroot} cd obj-%{gcc_target_platform} %if %{build_java} +export GCJ_PROPERTIES=jdt.compiler.useSingleThread=true export PATH=`pwd`/../fastjar-%{fastjar_ver}/obj-%{gcc_target_platform}${PATH:+:$PATH} %if !%{bootstrap_java} export PATH=`pwd`/java_hacks${PATH:+:$PATH} @@ -972,7 +998,7 @@ fi mv -f %{buildroot}%{_prefix}/%{_lib}/libgcj_bc.so $FULLLPATH/ %endif mv -f %{buildroot}%{_prefix}/%{_lib}/libstdc++.*a $FULLLPATH/ -mv -f %{buildroot}%{_prefix}/%{_lib}/libsupc++.*a . +mv -f %{buildroot}%{_prefix}/%{_lib}/libsupc++.*a $FULLLPATH/ mv -f %{buildroot}%{_prefix}/%{_lib}/libgfortran.*a . mv -f %{buildroot}%{_prefix}/%{_lib}/libobjc.*a . mv -f %{buildroot}%{_prefix}/%{_lib}/libgomp.*a . @@ -1034,12 +1060,13 @@ ln -sf ../`echo ../../../../lib/libgij.so.10.* | sed s~/lib/~/lib64/~` 64/libgij ln -sf lib32/libgcj_bc.so libgcj_bc.so ln -sf ../lib64/libgcj_bc.so 64/libgcj_bc.so %endif -mv -f %{buildroot}%{_prefix}/lib64/libsupc++.*a 64/ mv -f %{buildroot}%{_prefix}/lib64/libgfortran.*a 64/ mv -f %{buildroot}%{_prefix}/lib64/libobjc.*a 64/ mv -f %{buildroot}%{_prefix}/lib64/libgomp.*a 64/ ln -sf lib32/libstdc++.a libstdc++.a ln -sf ../lib64/libstdc++.a 64/libstdc++.a +ln -sf lib32/libsupc++.a libsupc++.a +ln -sf ../lib64/libsupc++.a 64/libsupc++.a ln -sf lib32/libmudflap.a libmudflap.a ln -sf ../lib64/libmudflap.a 64/libmudflap.a ln -sf lib32/libmudflapth.a libmudflapth.a @@ -1067,7 +1094,6 @@ ln -sf ../`echo ../../../../lib64/libgcj.so.10.* | sed s~/../lib64/~/~` 32/libgc ln -sf ../`echo ../../../../lib64/libgcj-tools.so.10.* | sed s~/../lib64/~/~` 32/libgcj-tools.so ln -sf ../`echo ../../../../lib64/libgij.so.10.* | sed s~/../lib64/~/~` 32/libgij.so %endif -mv -f %{buildroot}%{_prefix}/lib/libsupc++.*a 32/ mv -f %{buildroot}%{_prefix}/lib/libgfortran.*a 32/ mv -f %{buildroot}%{_prefix}/lib/libobjc.*a 32/ mv -f %{buildroot}%{_prefix}/lib/libgomp.*a 32/ @@ -1075,6 +1101,8 @@ mv -f %{buildroot}%{_prefix}/lib/libgomp.*a 32/ %ifarch sparc64 ppc64 ln -sf ../lib32/libstdc++.a 32/libstdc++.a ln -sf lib64/libstdc++.a libstdc++.a +ln -sf ../lib32/libsupc++.a 32/libsupc++.a +ln -sf lib64/libsupc++.a libsupc++.a ln -sf ../lib32/libmudflap.a 32/libmudflap.a ln -sf lib64/libmudflap.a libmudflap.a ln -sf ../lib32/libmudflapth.a 32/libmudflapth.a @@ -1092,6 +1120,7 @@ ln -sf lib64/adalib adalib %else %ifarch %{multilib_64_archs} ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libstdc++.a 32/libstdc++.a +ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libsupc++.a 32/libsupc++.a ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libmudflap.a 32/libmudflap.a ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_version}/libmudflapth.a 32/libmudflapth.a %if %{build_java} @@ -1520,10 +1549,10 @@ fi %endif %ifarch sparcv9 ppc %{multilib_64_archs} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++.so -%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libsupc++.a %endif %ifarch sparcv9 sparc64 ppc ppc64 %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++.a +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libsupc++.a %endif %doc rpm.doc/changelogs/gcc/cp/ChangeLog* @@ -1541,23 +1570,49 @@ fi %dir %{_prefix}/lib/gcc %dir %{_prefix}/lib/gcc/%{gcc_target_platform} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version} +%if 0%{?fedora} < 14 %ifarch sparcv9 ppc %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32 %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32/libstdc++.a +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32/libsupc++.a %endif %ifarch sparc64 ppc64 %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib64 %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib64/libstdc++.a +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib64/libsupc++.a %endif %ifnarch sparcv9 sparc64 ppc ppc64 %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++.a +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libsupc++.a +%endif %endif %ifnarch sparcv9 ppc %{multilib_64_archs} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++.so -%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libsupc++.a %endif %doc rpm.doc/changelogs/libstdc++-v3/ChangeLog* libstdc++-v3/README* +%if 0%{?fedora} >= 14 +%files -n libstdc++-static +%defattr(-,root,root,-) +%dir %{_prefix}/lib/gcc +%dir %{_prefix}/lib/gcc/%{gcc_target_platform} +%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version} +%ifarch sparcv9 ppc +%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32 +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32/libstdc++.a +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32/libsupc++.a +%endif +%ifarch sparc64 ppc64 +%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib64 +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib64/libstdc++.a +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib64/libsupc++.a +%endif +%ifnarch sparcv9 sparc64 ppc ppc64 +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++.a +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libsupc++.a +%endif +%endif + %if %{build_libstdcxx_docs} %files -n libstdc++-docs %defattr(-,root,root) @@ -1827,15 +1882,52 @@ fi %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32 %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32/adainclude %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32/adalib +%if 0%{?fedora} >= 14 +%exclude %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32/adalib/libgnat.a +%exclude %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32/adalib/libgnarl.a +%endif %endif %ifarch sparc64 ppc64 %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib64 %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib64/adainclude %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib64/adalib +%if 0%{?fedora} >= 14 +%exclude %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib64/adalib/libgnat.a +%exclude %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib64/adalib/libgnarl.a +%endif %endif %ifnarch sparcv9 sparc64 ppc ppc64 %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/adainclude %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/adalib +%if 0%{?fedora} >= 14 +%exclude %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/adalib/libgnat.a +%exclude %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/adalib/libgnarl.a +%endif +%endif +%endif + +%if 0%{?fedora} >= 14 +%files -n libgnat-static +%defattr(-,root,root,-) +%dir %{_prefix}/lib/gcc +%dir %{_prefix}/lib/gcc/%{gcc_target_platform} +%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version} +%ifarch sparcv9 ppc +%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32 +%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32/adalib +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32/adalib/libgnat.a +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32/adalib/libgnarl.a +%endif +%ifarch sparc64 ppc64 +%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib64 +%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib64/adalib +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib64/adalib/libgnat.a +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib64/adalib/libgnarl.a +%endif +%ifnarch sparcv9 sparc64 ppc ppc64 +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/adalib +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/adalib/libgnat.a +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/adalib/libgnarl.a %endif %endif @@ -1857,6 +1949,7 @@ fi %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/mf-runtime.h +%if 0%{?fedora} < 14 %ifarch sparcv9 ppc %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32 %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32/libmudflap.a @@ -1870,12 +1963,55 @@ fi %ifnarch sparcv9 sparc64 ppc ppc64 %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libmudflap.a %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libmudflapth.a +%endif +%endif +%ifnarch sparcv9 sparc64 ppc ppc64 %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libmudflap.so %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libmudflapth.so %endif %doc rpm.doc/changelogs/libmudflap/ChangeLog* +%if 0%{?fedora} >= 14 +%files -n libmudflap-static +%defattr(-,root,root,-) +%dir %{_prefix}/lib/gcc +%dir %{_prefix}/lib/gcc/%{gcc_target_platform} +%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version} +%ifarch sparcv9 ppc +%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32 +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32/libmudflap.a +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32/libmudflapth.a +%endif +%ifarch sparc64 ppc64 +%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib64 +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib64/libmudflap.a +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib64/libmudflapth.a +%endif +%ifnarch sparcv9 sparc64 ppc ppc64 +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libmudflap.a +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libmudflapth.a +%endif +%endif + %changelog +* Tue Jun 8 2010 Jakub Jelinek 4.4.4-7 +- update from gcc-4_4-branch + - PRs c++/43555, fortran/42900, fortran/44360, libfortran/41169, + libgcj/38251, libobjc/36610, libstdc++/32499, pch/14940, + rtl-optimization/39580, target/44075, target/44169, target/44199 +- VTA backports + - PRs debug/44367, debug/44375, rtl-optimization/44013, + tree-optimization/44182 + - speed up var-tracking (#598310, PR debug/41371) +- -Wunused-but-set-* bugfixes + - PRs c++/44361, c++/44362, c++/44412, c++/44443, c++/44444 +- fix -mno-fused-madd -mfma4 on i?86/x86_64 (PR target/44338) +- use GCJ_PROPERTIES=jdt.compiler.useSingleThread=true when + building classes with ecj1 (#524155) +%if 0%{?fedora} >= 14 +- add some static subpackages (#556049) +%endif + * Tue May 25 2010 Jakub Jelinek 4.4.4-5 - update from gcc-4_4-branch - PRs bootstrap/43870, debug/44205, target/43733, target/44074, diff --git a/gcc44-pr44199.patch b/gcc44-pr44199.patch deleted file mode 100644 index f68c05c..0000000 --- a/gcc44-pr44199.patch +++ /dev/null @@ -1,60 +0,0 @@ -2010-05-20 Jakub Jelinek - - PR target/44199 - * config/rs6000/rs6000.c (rs6000_emit_epilogue): If cfun->calls_alloca - or total_size is larger than red zone size for non-V4 ABI, emit a - stack_tie resp. frame_tie insn before stack pointer restore. - * config/rs6000/rs6000.md (frame_tie): New insn. - ---- gcc/config/rs6000/rs6000.c.jj 2010-05-17 07:52:06.000000000 +0200 -+++ gcc/config/rs6000/rs6000.c 2010-05-19 22:15:53.000000000 +0200 -@@ -19775,6 +19775,16 @@ rs6000_emit_epilogue (int sibcall) - frame_reg_rtx = sp_reg_rtx; - if (DEFAULT_ABI == ABI_V4) - frame_reg_rtx = gen_rtx_REG (Pmode, 11); -+ /* Prevent reordering memory accesses against stack pointer restore. */ -+ else if (cfun->calls_alloca -+ || offset_below_red_zone_p (-info->total_size)) -+ { -+ rtx mem1 = gen_rtx_MEM (BLKmode, hard_frame_pointer_rtx); -+ rtx mem2 = gen_rtx_MEM (BLKmode, sp_reg_rtx); -+ MEM_NOTRAP_P (mem1) = 1; -+ MEM_NOTRAP_P (mem2) = 1; -+ emit_insn (gen_frame_tie (mem1, mem2)); -+ } - - insn = emit_insn (gen_add3_insn (frame_reg_rtx, hard_frame_pointer_rtx, - GEN_INT (info->total_size))); -@@ -19784,6 +19794,14 @@ rs6000_emit_epilogue (int sibcall) - && DEFAULT_ABI != ABI_V4 - && !crtl->calls_eh_return) - { -+ /* Prevent reordering memory accesses against stack pointer restore. */ -+ if (cfun->calls_alloca -+ || offset_below_red_zone_p (-info->total_size)) -+ { -+ rtx mem = gen_rtx_MEM (BLKmode, sp_reg_rtx); -+ MEM_NOTRAP_P (mem) = 1; -+ emit_insn (gen_stack_tie (mem)); -+ } - insn = emit_insn (gen_add3_insn (sp_reg_rtx, sp_reg_rtx, - GEN_INT (info->total_size))); - sp_offset = 0; ---- gcc/config/rs6000/rs6000.md.jj 2010-03-26 17:13:37.000000000 +0100 -+++ gcc/config/rs6000/rs6000.md 2010-05-19 22:15:19.000000000 +0200 -@@ -15286,6 +15286,15 @@ (define_insn "stack_tie" - "" - [(set_attr "length" "0")]) - -+; Like stack_tie, but depend on both fp and sp based memory. -+(define_insn "frame_tie" -+ [(set (match_operand:BLK 0 "memory_operand" "+m") -+ (unspec:BLK [(match_dup 0) -+ (match_operand:BLK 1 "memory_operand" "m")] UNSPEC_TIE))] -+ "" -+ "" -+ [(set_attr "length" "0")]) -+ - - (define_expand "epilogue" - [(use (const_int 0))] diff --git a/import.log b/import.log index 0a4c315..dabdc5a 100644 --- a/import.log +++ b/import.log @@ -24,3 +24,4 @@ gcc-4_4_4-2_fc13:F-13:gcc-4.4.4-2.fc13.src.rpm:1272918321 gcc-4_4_4-3_fc13:F-13:gcc-4.4.4-3.fc13.src.rpm:1273873717 gcc-4_4_4-4_fc13:F-13:gcc-4.4.4-4.fc13.src.rpm:1274217265 gcc-4_4_4-5_fc13:F-13:gcc-4.4.4-5.fc13.src.rpm:1274827909 +gcc-4_4_4-7_fc13:F-13:gcc-4.4.4-7.fc13.src.rpm:1275991168 diff --git a/sources b/sources index d99cd55..ff452d4 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz -c413ea290fdbe54dbd60816ad80857a1 gcc-4.4.4-20100525.tar.bz2 +e1a2819e9a9daad24662476f4a29d704 gcc-4.4.4-20100608.tar.bz2 From 462a694956527a9e5dba18805d345ca74d723865 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 11 Jun 2010 08:19:52 +0000 Subject: [PATCH 31/38] 4.4.4-8 --- .cvsignore | 2 +- fastjar-0.97-filename0.patch | 14 +++++ fastjar-CVE-2010-0831.patch | 102 +++++++++++++++++++++++++++++++++++ gcc.spec | 19 +++++-- import.log | 1 + sources | 2 +- 6 files changed, 135 insertions(+), 5 deletions(-) create mode 100644 fastjar-0.97-filename0.patch create mode 100644 fastjar-CVE-2010-0831.patch diff --git a/.cvsignore b/.cvsignore index cb276db..f13fa87 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ fastjar-0.97.tar.gz -gcc-4.4.4-20100608.tar.bz2 +gcc-4.4.4-20100611.tar.bz2 diff --git a/fastjar-0.97-filename0.patch b/fastjar-0.97-filename0.patch new file mode 100644 index 0000000..34a02a7 --- /dev/null +++ b/fastjar-0.97-filename0.patch @@ -0,0 +1,14 @@ +2010-03-01 Richard Guenther + + * jartool.c (read_entries): Properly zero-terminate filename. + +--- fastjar-0.97/jartool.c 6 Sep 2009 22:16:00 -0000 1.59 ++++ fastjar-0.97/jartool.c 1 Mar 2010 15:38:43 -0000 1.60 +@@ -790,6 +790,7 @@ int read_entries (int fd) + progname, jarfile); + return 1; + } ++ ze->filename[len] = '\0'; + len = UNPACK_UB4(header, CEN_EFLEN); + len += UNPACK_UB4(header, CEN_COMLEN); + if (lseek (fd, len, SEEK_CUR) == -1) diff --git a/fastjar-CVE-2010-0831.patch b/fastjar-CVE-2010-0831.patch new file mode 100644 index 0000000..2c6e23c --- /dev/null +++ b/fastjar-CVE-2010-0831.patch @@ -0,0 +1,102 @@ +2010-06-10 Jakub Jelinek + Dan Rosenberg + + * jartool.c (extract_jar): Fix up checks for traversal to parent + directories, disallow absolute paths, make the code slightly more + efficient. + +--- fastjar-0.97/jartool.c.jj 2009-09-07 00:10:47.000000000 +0200 ++++ fastjar-0.97/jartool.c 2010-06-08 20:00:29.000000000 +0200 +@@ -1730,7 +1730,17 @@ int extract_jar(int fd, const char **fil + struct stat sbuf; + int depth = 0; + +- tmp_buff = malloc(sizeof(char) * strlen((const char *)filename)); ++ if(*filename == '/'){ ++ fprintf(stderr, "Absolute path names are not allowed.\n"); ++ exit(EXIT_FAILURE); ++ } ++ ++ tmp_buff = malloc(strlen((const char *)filename)); ++ ++ if(tmp_buff == NULL) { ++ fprintf(stderr, "Out of memory.\n"); ++ exit(EXIT_FAILURE); ++ } + + for(;;){ + const ub1 *idx = (const unsigned char *)strchr((const char *)start, '/'); +@@ -1738,25 +1748,28 @@ int extract_jar(int fd, const char **fil + if(idx == NULL) + break; + else if(idx == start){ ++ tmp_buff[idx - filename] = '/'; + start++; + continue; + } +- start = idx + 1; + +- strncpy(tmp_buff, (const char *)filename, (idx - filename)); +- tmp_buff[(idx - filename)] = '\0'; ++ memcpy(tmp_buff + (start - filename), (const char *)start, (idx - start)); ++ tmp_buff[idx - filename] = '\0'; + + #ifdef DEBUG + printf("checking the existance of %s\n", tmp_buff); + #endif +- if(strcmp(tmp_buff, "..") == 0){ ++ if(idx - start == 2 && memcmp(start, "..", 2) == 0){ + --depth; + if (depth < 0){ + fprintf(stderr, "Traversal to parent directories during unpacking!\n"); + exit(EXIT_FAILURE); + } +- } else if (strcmp(tmp_buff, ".") != 0) ++ } else if (idx - start != 1 || *start != '.') + ++depth; ++ ++ start = idx + 1; ++ + if(stat(tmp_buff, &sbuf) < 0){ + if(errno != ENOENT) + exit_on_error("stat"); +@@ -1765,6 +1778,7 @@ int extract_jar(int fd, const char **fil + #ifdef DEBUG + printf("Directory exists\n"); + #endif ++ tmp_buff[idx - filename] = '/'; + continue; + }else { + fprintf(stderr, "Hmmm.. %s exists but isn't a directory!\n", +@@ -1781,10 +1795,11 @@ int extract_jar(int fd, const char **fil + if(verbose && handle) + printf("%10s: %s/\n", "created", tmp_buff); + ++ tmp_buff[idx - filename] = '/'; + } + + /* only a directory */ +- if(strlen((const char *)start) == 0) ++ if(*start == '\0') + dir = TRUE; + + #ifdef DEBUG +@@ -1792,7 +1807,7 @@ int extract_jar(int fd, const char **fil + #endif + + /* If the entry was just a directory, don't write to file, etc */ +- if(strlen((const char *)start) == 0) ++ if(*start == '\0') + f_fd = -1; + + free(tmp_buff); +@@ -1876,7 +1891,8 @@ int extract_jar(int fd, const char **fil + exit(EXIT_FAILURE); + } + +- close(f_fd); ++ if (f_fd != -1) ++ close(f_fd); + + if(verbose && dir == FALSE && handle) + printf("%10s: %s\n", diff --git a/gcc.spec b/gcc.spec index 1f27ec4..a2e8320 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,9 +1,9 @@ -%global DATE 20100608 -%global SVNREV 160426 +%global DATE 20100611 +%global SVNREV 160596 %global gcc_version 4.4.4 # Note, gcc_release must be integer, if you want to add suffixes to # %{release}, append them after %{gcc_release} on Release: line. -%global gcc_release 7 +%global gcc_release 8 %global _unpackaged_files_terminate_build 0 %global multilib_64_archs sparc64 ppc64 s390x x86_64 %if 0%{?fedora} >= 13 || 0%{?rhel} >= 6 @@ -178,6 +178,8 @@ Patch20: gcc44-no-add-needed.patch Patch1000: fastjar-0.97-segfault.patch Patch1001: fastjar-0.97-len1.patch +Patch1002: fastjar-0.97-filename0.patch +Patch1003: fastjar-CVE-2010-0831.patch # On ARM EABI systems, we do want -gnueabi to be part of the # target triple. @@ -519,6 +521,8 @@ tar xzf %{SOURCE4} %patch1000 -p0 -b .fastjar-0.97-segfault~ %patch1001 -p0 -b .fastjar-0.97-len1~ +%patch1002 -p0 -b .fastjar-0.97-filename0~ +%patch1003 -p0 -b .fastjar-CVE-2010-0831~ %if %{bootstrap_java} tar xjf %{SOURCE10} @@ -1994,6 +1998,15 @@ fi %endif %changelog +* Fri Jun 11 2010 Jakub Jelinek 4.4.4-8 +- update from gcc-4_4-branch + - fix demangler (PR other/43838) +- VTA backports + - further var-tracking speedup (#598310, PR debug/41371) +- for typedefs in non-template classes adjust underlying type to + emit proper debug info (#601893) +- fix up fastjar directory traversal bugs (CVE-2010-0831) + * Tue Jun 8 2010 Jakub Jelinek 4.4.4-7 - update from gcc-4_4-branch - PRs c++/43555, fortran/42900, fortran/44360, libfortran/41169, diff --git a/import.log b/import.log index dabdc5a..8ed359c 100644 --- a/import.log +++ b/import.log @@ -25,3 +25,4 @@ gcc-4_4_4-3_fc13:F-13:gcc-4.4.4-3.fc13.src.rpm:1273873717 gcc-4_4_4-4_fc13:F-13:gcc-4.4.4-4.fc13.src.rpm:1274217265 gcc-4_4_4-5_fc13:F-13:gcc-4.4.4-5.fc13.src.rpm:1274827909 gcc-4_4_4-7_fc13:F-13:gcc-4.4.4-7.fc13.src.rpm:1275991168 +gcc-4_4_4-8_fc13:F-13:gcc-4.4.4-8.fc13.src.rpm:1276244305 diff --git a/sources b/sources index ff452d4..bae7310 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz -e1a2819e9a9daad24662476f4a29d704 gcc-4.4.4-20100608.tar.bz2 +a896e6090fb9f4ef74a8b292fda42af4 gcc-4.4.4-20100611.tar.bz2 From e308cb012da7e0b1fd748e5143a3f507468a6c04 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 24 Jun 2010 20:17:17 +0000 Subject: [PATCH 32/38] 4.4.4-9 --- .cvsignore | 2 +- fastjar-man.patch | 27 ++++++ gcc.spec | 77 ++++++++++------ gcc44-pr44492.patch | 207 +++++++++++++++++++++++++++++++++++++++++++ gcc44-pr44542.patch | 49 ++++++++++ gcc44-pr44610.patch | 32 +++++++ gcc44-rh341221.patch | 28 ------ import.log | 1 + sources | 2 +- 9 files changed, 369 insertions(+), 56 deletions(-) create mode 100644 fastjar-man.patch create mode 100644 gcc44-pr44492.patch create mode 100644 gcc44-pr44542.patch create mode 100644 gcc44-pr44610.patch delete mode 100644 gcc44-rh341221.patch diff --git a/.cvsignore b/.cvsignore index f13fa87..6b76a78 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ fastjar-0.97.tar.gz -gcc-4.4.4-20100611.tar.bz2 +gcc-4.4.4-20100624.tar.bz2 diff --git a/fastjar-man.patch b/fastjar-man.patch new file mode 100644 index 0000000..34bf704 --- /dev/null +++ b/fastjar-man.patch @@ -0,0 +1,27 @@ +2010-03-24 Jan Kratochvil + + * Makefile.am (POD2MAN): Provide --date from ChangeLog. + * Makefile.in: Regenerate. + +--- fastjar-0.97/Makefile.am.jj 2008-10-16 04:24:55.000000000 -0400 ++++ fastjar-0.97/Makefile.am 2010-06-21 09:29:41.021398000 -0400 +@@ -39,7 +39,7 @@ EXTRA_DIST = \ + texi2pod.pl + + TEXI2POD = perl $(srcdir)/texi2pod.pl +-POD2MAN = pod2man --center="GNU" --release=@VERSION@ ++POD2MAN = pod2man --center="GNU" --release=@VERSION@ --date=$(shell sed -n '1s/ .*//p' <$(srcdir)/ChangeLog) + + .pod.1: + -($(POD2MAN) --section=1 $< > $(@).T$$$$ && \ +--- fastjar-0.97/Makefile.in.jj 2008-10-16 04:15:16.000000000 -0400 ++++ fastjar-0.97/Makefile.in 2010-06-21 09:30:15.882810000 -0400 +@@ -515,7 +515,7 @@ EXTRA_DIST = \ + texi2pod.pl + + TEXI2POD = perl $(srcdir)/texi2pod.pl +-POD2MAN = pod2man --center="GNU" --release=@VERSION@ ++POD2MAN = pod2man --center="GNU" --release=@VERSION@ --date=$(shell sed -n '1s/ .*//p' <$(srcdir)/ChangeLog) + + #SPLINT_FLAGS=-I . -I $(srcdir)/lib -I $(srcdir) -DHAVE_CONFIG_H +posixlib +weak + SPLINT_FLAGS = -I . -I $(srcdir)/lib -I $(srcdir) -DHAVE_CONFIG_H -DPRIx32= -warnposix +weak diff --git a/gcc.spec b/gcc.spec index a2e8320..6320523 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,9 +1,9 @@ -%global DATE 20100611 -%global SVNREV 160596 +%global DATE 20100624 +%global SVNREV 161335 %global gcc_version 4.4.4 # Note, gcc_release must be integer, if you want to add suffixes to # %{release}, append them after %{gcc_release} on Release: line. -%global gcc_release 8 +%global gcc_release 9 %global _unpackaged_files_terminate_build 0 %global multilib_64_archs sparc64 ppc64 s390x x86_64 %if 0%{?fedora} >= 13 || 0%{?rhel} >= 6 @@ -164,22 +164,25 @@ Patch4: gcc44-java-nomulti.patch Patch5: gcc44-ppc32-retaddr.patch Patch6: gcc44-pr33763.patch Patch7: gcc44-rh330771.patch -Patch8: gcc44-rh341221.patch -Patch10: gcc44-i386-libgomp.patch -Patch11: gcc44-sparc-config-detection.patch -Patch12: gcc44-libgomp-omp_h-multilib.patch -Patch13: gcc44-libtool-no-rpath.patch -Patch14: gcc44-cloog-dl.patch -Patch16: gcc44-unwind-debug-hook.patch -Patch17: gcc44-pr38757.patch -Patch18: gcc44-libstdc++-docs.patch -Patch19: gcc44-ppc64-aixdesc.patch -Patch20: gcc44-no-add-needed.patch +Patch8: gcc44-i386-libgomp.patch +Patch9: gcc44-sparc-config-detection.patch +Patch10: gcc44-libgomp-omp_h-multilib.patch +Patch11: gcc44-libtool-no-rpath.patch +Patch12: gcc44-cloog-dl.patch +Patch13: gcc44-unwind-debug-hook.patch +Patch14: gcc44-pr38757.patch +Patch15: gcc44-libstdc++-docs.patch +Patch16: gcc44-ppc64-aixdesc.patch +Patch17: gcc44-no-add-needed.patch +Patch18: gcc44-pr44492.patch +Patch19: gcc44-pr44542.patch +Patch20: gcc44-pr44610.patch Patch1000: fastjar-0.97-segfault.patch Patch1001: fastjar-0.97-len1.patch Patch1002: fastjar-0.97-filename0.patch Patch1003: fastjar-CVE-2010-0831.patch +Patch1004: fastjar-man.patch # On ARM EABI systems, we do want -gnueabi to be part of the # target triple. @@ -496,23 +499,25 @@ GNAT is a GNU Ada 95 front-end to GCC. This package includes static libraries. %patch5 -p0 -b .ppc32-retaddr~ %patch6 -p0 -b .pr33763~ %patch7 -p0 -b .rh330771~ -%patch8 -p0 -b .rh341221~ -%patch10 -p0 -b .i386-libgomp~ -%patch11 -p0 -b .sparc-config-detection~ -%patch12 -p0 -b .libgomp-omp_h-multilib~ -%patch13 -p0 -b .libtool-no-rpath~ +%patch8 -p0 -b .i386-libgomp~ +%patch9 -p0 -b .sparc-config-detection~ +%patch10 -p0 -b .libgomp-omp_h-multilib~ +%patch11 -p0 -b .libtool-no-rpath~ %if %{build_cloog} -%patch14 -p0 -b .cloog-dl~ +%patch12 -p0 -b .cloog-dl~ %endif -%patch16 -p0 -b .unwind-debug-hook~ -%patch17 -p0 -b .pr38757~ +%patch13 -p0 -b .unwind-debug-hook~ +%patch14 -p0 -b .pr38757~ %if %{build_libstdcxx_docs} -%patch18 -p0 -b .libstdc++-docs~ +%patch15 -p0 -b .libstdc++-docs~ %endif -%patch19 -p0 -b .ppc64-aixdesc~ +%patch16 -p0 -b .ppc64-aixdesc~ %if 0%{?fedora} >= 13 -%patch20 -p0 -b .no-add-needed~ +%patch17 -p0 -b .no-add-needed~ %endif +%patch18 -p0 -b .pr44492~ +%patch19 -p0 -b .pr44542~ +%patch20 -p0 -b .pr44610~ # This testcase doesn't compile. rm libjava/testsuite/libjava.lang/PR35020* @@ -523,6 +528,7 @@ tar xzf %{SOURCE4} %patch1001 -p0 -b .fastjar-0.97-len1~ %patch1002 -p0 -b .fastjar-0.97-filename0~ %patch1003 -p0 -b .fastjar-CVE-2010-0831~ +%patch1004 -p0 -b .fastjar-man~ %if %{bootstrap_java} tar xjf %{SOURCE10} @@ -1929,7 +1935,7 @@ fi %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib64/adalib/libgnarl.a %endif %ifnarch sparcv9 sparc64 ppc ppc64 -%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/adalib +%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/adalib %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/adalib/libgnat.a %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/adalib/libgnarl.a %endif @@ -1998,6 +2004,25 @@ fi %endif %changelog +* Thu Jun 24 2010 Jakub Jelinek 4.4.4-9 +- update from gcc-4_4-branch + - PRs bootstrap/44426, bootstrap/44544, c++/44627, fortran/44536, + libgcj/44216, target/39690, target/43740, target/44261, target/44481, + target/44534, target/44615, testsuite/32843, testsuite/43739, + tree-optimization/44508 +- VTA backports + - PRs debug/43650, debug/44181, debug/44247 +- -Wunused-but-set-* ->*/.* fix (PR c++/44619) +- undeprecate #ident and #sccs (#606069) +%if 0%{?fedora} >= 14 +- fix up libgnat-static +%endif +- fixup dates in generated man pages even for fastjar and gcc/ man pages +- don't realign stack on x86/x86-64 just because a DECL_ALIGN was set + too high by expansion code (#603924, PR target/44542) +- don't allow side-effects in inline-asm memory operands unless + < or > is present in operand's constraint (#602359, PR middle-end/44492) + * Fri Jun 11 2010 Jakub Jelinek 4.4.4-8 - update from gcc-4_4-branch - fix demangler (PR other/43838) diff --git a/gcc44-pr44492.patch b/gcc44-pr44492.patch new file mode 100644 index 0000000..cbedae8 --- /dev/null +++ b/gcc44-pr44492.patch @@ -0,0 +1,207 @@ +2010-06-24 Jakub Jelinek + + PR middle-end/44492 + * recog.h (struct recog_data): Add is_asm field. + * recog.c (asm_operand_ok, constrain_operands): If neither < nor > is + present in constraints of inline-asm operand and memory operand + contains {PRE,POST}_{INC,DEC,MODIFY}, return 0. + (extract_insn): Initialize recog_data.is_asm. + * doc/md.texi (Constraints): Document operand side-effect rules. + + * g++.dg/torture/pr44492.C: New test. + +--- gcc/doc/md.texi (revision 161327) ++++ gcc/doc/md.texi (revision 161328) +@@ -1052,6 +1052,10 @@ an operand may be in a register, and whi + operand can be a memory reference, and which kinds of address; whether the + operand may be an immediate constant, and which possible values it may + have. Constraints can also require two operands to match. ++Side-effects aren't allowed in operands of inline @code{asm}, unless ++@samp{<} or @samp{>} constraints are used, because there is no guarantee ++that the side-effects will happen exactly once in an instruction that can update ++the addressing register. + + @ifset INTERNALS + @menu +@@ -1129,12 +1133,21 @@ would fit the @samp{m} constraint but no + @cindex @samp{<} in constraint + @item @samp{<} + A memory operand with autodecrement addressing (either predecrement or +-postdecrement) is allowed. ++postdecrement) is allowed. In inline @code{asm} this constraint is only ++allowed if the operand is used exactly once in an instruction that can ++handle the side-effects. Not using an operand with @samp{<} in constraint ++string in the inline @code{asm} pattern at all or using it in multiple ++instructions isn't valid, because the side-effects wouldn't be performed ++or would be performed more than once. Furthermore, on some targets ++the operand with @samp{<} in constraint string must be accompanied by ++special instruction suffixes like @code{%U0} instruction suffix on PowerPC ++or @code{%P0} on IA-64. + + @cindex @samp{>} in constraint + @item @samp{>} + A memory operand with autoincrement addressing (either preincrement or +-postincrement) is allowed. ++postincrement) is allowed. In inline @code{asm} the same restrictions ++as for @samp{<} apply. + + @cindex @samp{r} in constraint + @cindex registers in constraints +--- gcc/recog.c (revision 161327) ++++ gcc/recog.c (revision 161328) +@@ -1601,6 +1601,9 @@ int + asm_operand_ok (rtx op, const char *constraint, const char **constraints) + { + int result = 0; ++#ifdef AUTO_INC_DEC ++ bool incdec_ok = false; ++#endif + + /* Use constrain_operands after reload. */ + gcc_assert (!reload_completed); +@@ -1608,7 +1611,7 @@ asm_operand_ok (rtx op, const char *cons + /* Empty constraint string is the same as "X,...,X", i.e. X for as + many alternatives as required to match the other operands. */ + if (*constraint == '\0') +- return 1; ++ result = 1; + + while (*constraint) + { +@@ -1685,6 +1688,9 @@ asm_operand_ok (rtx op, const char *cons + || GET_CODE (XEXP (op, 0)) == PRE_DEC + || GET_CODE (XEXP (op, 0)) == POST_DEC)) + result = 1; ++#ifdef AUTO_INC_DEC ++ incdec_ok = true; ++#endif + break; + + case '>': +@@ -1693,6 +1699,9 @@ asm_operand_ok (rtx op, const char *cons + || GET_CODE (XEXP (op, 0)) == PRE_INC + || GET_CODE (XEXP (op, 0)) == POST_INC)) + result = 1; ++#ifdef AUTO_INC_DEC ++ incdec_ok = true; ++#endif + break; + + case 'E': +@@ -1814,6 +1823,23 @@ asm_operand_ok (rtx op, const char *cons + return 0; + } + ++#ifdef AUTO_INC_DEC ++ /* For operands without < or > constraints reject side-effects. */ ++ if (!incdec_ok && result && MEM_P (op)) ++ switch (GET_CODE (XEXP (op, 0))) ++ { ++ case PRE_INC: ++ case POST_INC: ++ case PRE_DEC: ++ case POST_DEC: ++ case PRE_MODIFY: ++ case POST_MODIFY: ++ return 0; ++ default: ++ break; ++ } ++#endif ++ + return result; + } + +@@ -2039,6 +2065,7 @@ extract_insn (rtx insn) + recog_data.n_operands = 0; + recog_data.n_alternatives = 0; + recog_data.n_dups = 0; ++ recog_data.is_asm = false; + + switch (GET_CODE (body)) + { +@@ -2085,6 +2112,7 @@ extract_insn (rtx insn) + while (*p) + recog_data.n_alternatives += (*p++ == ','); + } ++ recog_data.is_asm = true; + break; + } + fatal_insn_not_found (insn); +@@ -2699,6 +2727,30 @@ constrain_operands (int strict) + = recog_data.operand[funny_match[funny_match_index].this_op]; + } + ++#ifdef AUTO_INC_DEC ++ /* For operands without < or > constraints reject side-effects. */ ++ if (recog_data.is_asm) ++ { ++ for (opno = 0; opno < recog_data.n_operands; opno++) ++ if (MEM_P (recog_data.operand[opno])) ++ switch (GET_CODE (XEXP (recog_data.operand[opno], 0))) ++ { ++ case PRE_INC: ++ case POST_INC: ++ case PRE_DEC: ++ case POST_DEC: ++ case PRE_MODIFY: ++ case POST_MODIFY: ++ if (strchr (recog_data.constraints[opno], '<') == NULL ++ || strchr (recog_data.constraints[opno], '>') ++ == NULL) ++ return 0; ++ break; ++ default: ++ break; ++ } ++ } ++#endif + return 1; + } + } +--- gcc/recog.h (revision 161327) ++++ gcc/recog.h (revision 161328) +@@ -230,6 +230,9 @@ struct recog_data + /* The number of alternatives in the constraints for the insn. */ + char n_alternatives; + ++ /* True if insn is ASM_OPERANDS. */ ++ bool is_asm; ++ + /* Specifies whether an insn alternative is enabled using the + `enabled' attribute in the insn pattern definition. For back + ends not using the `enabled' attribute the array fields are +--- gcc/testsuite/g++.dg/torture/pr44492.C (revision 0) ++++ gcc/testsuite/g++.dg/torture/pr44492.C (revision 161328) +@@ -0,0 +1,31 @@ ++// PR middle-end/44492 ++// { dg-do run } ++ ++struct T { unsigned long p; }; ++struct S { T a, b, c; unsigned d; }; ++ ++__attribute__((noinline)) ++void ++bar (const T &x, const T &y) ++{ ++ if (x.p != 0x2348 || y.p != 0x2346) ++ __builtin_abort (); ++} ++ ++__attribute__((noinline)) ++void ++foo (S &s, T e) ++{ ++ unsigned long a = e.p; ++ unsigned long b = s.b.p; ++ __asm__ volatile ("" : : "rm" (a), "rm" (b)); ++ bar (e, s.b); ++} ++ ++int ++main () ++{ ++ S s = { { 0x2345 }, { 0x2346 }, { 0x2347 }, 6 }; ++ T t = { 0x2348 }; ++ foo (s, t); ++} diff --git a/gcc44-pr44542.patch b/gcc44-pr44542.patch new file mode 100644 index 0000000..0926e40 --- /dev/null +++ b/gcc44-pr44542.patch @@ -0,0 +1,49 @@ +2010-06-17 Jakub Jelinek + + PR target/44542 + * cfgexpand.c (expand_one_stack_var_at): Limit align to maximum + of max_used_stack_slot_alignment and PREFERRED_STACK_BOUNDARY + instead of MAX_SUPPORTED_STACK_ALIGNMENT. + (expand_one_var): Don't consider DECL_ALIGN for variables for + which expand_one_stack_var_at has been already called. + +--- gcc/cfgexpand.c.jj 2010-06-17 17:01:11.964198458 +0200 ++++ gcc/cfgexpand.c 2010-06-17 18:25:18.940335757 +0200 +@@ -839,7 +839,7 @@ static void + expand_one_stack_var_at (tree decl, HOST_WIDE_INT offset) + { + /* Alignment is unsigned. */ +- unsigned HOST_WIDE_INT align; ++ unsigned HOST_WIDE_INT align, max_align; + rtx x; + + /* If this fails, we've overflowed the stack frame. Error nicely? */ +@@ -852,10 +852,10 @@ expand_one_stack_var_at (tree decl, HOST + offset -= frame_phase; + align = offset & -offset; + align *= BITS_PER_UNIT; +- if (align == 0) +- align = STACK_BOUNDARY; +- else if (align > MAX_SUPPORTED_STACK_ALIGNMENT) +- align = MAX_SUPPORTED_STACK_ALIGNMENT; ++ max_align = MAX (crtl->max_used_stack_slot_alignment, ++ PREFERRED_STACK_BOUNDARY); ++ if (align == 0 || align > max_align) ++ align = max_align; + DECL_ALIGN (decl) = align; + DECL_USER_ALIGN (decl) = 0; + +@@ -1054,6 +1054,13 @@ expand_one_var (tree var, bool toplevel, + align = MINIMUM_ALIGNMENT (TREE_TYPE (var), + TYPE_MODE (TREE_TYPE (var)), + TYPE_ALIGN (TREE_TYPE (var))); ++ else if (DECL_HAS_VALUE_EXPR_P (var) ++ || (DECL_RTL_SET_P (var) && MEM_P (DECL_RTL (var)))) ++ /* Don't consider debug only variables with DECL_HAS_VALUE_EXPR_P set ++ or variables which were assigned a stack slot already by ++ expand_one_stack_var_at - in the latter case DECL_ALIGN has been ++ changed from the offset chosen to it. */ ++ align = crtl->stack_alignment_estimated; + else + align = MINIMUM_ALIGNMENT (var, DECL_MODE (var), DECL_ALIGN (var)); + diff --git a/gcc44-pr44610.patch b/gcc44-pr44610.patch new file mode 100644 index 0000000..de89604 --- /dev/null +++ b/gcc44-pr44610.patch @@ -0,0 +1,32 @@ +2010-06-23 Alexandre Oliva + + PR debug/44610 + * simplify-rtx.c (delegitimize_mem_from_attrs): Don't use a base + address if the offset is unknown. + +--- gcc/simplify-rtx.c.orig 2010-06-23 01:15:14.000000000 -0300 ++++ gcc/simplify-rtx.c 2010-06-23 01:20:21.000000000 -0300 +@@ -208,10 +208,11 @@ avoid_constant_pool_reference (rtx x) + rtx + delegitimize_mem_from_attrs (rtx x) + { ++ /* MEMs without MEM_OFFSETs may have been offset, so we can't just ++ use their base addresses as equivalent. */ + if (MEM_P (x) + && MEM_EXPR (x) +- && (!MEM_OFFSET (x) +- || GET_CODE (MEM_OFFSET (x)) == CONST_INT)) ++ && MEM_OFFSET (x)) + { + tree decl = MEM_EXPR (x); + enum machine_mode mode = GET_MODE (x); +@@ -264,8 +265,7 @@ delegitimize_mem_from_attrs (rtx x) + { + rtx newx; + +- if (MEM_OFFSET (x)) +- offset += INTVAL (MEM_OFFSET (x)); ++ offset += INTVAL (MEM_OFFSET (x)); + + newx = DECL_RTL (decl); + diff --git a/gcc44-rh341221.patch b/gcc44-rh341221.patch deleted file mode 100644 index 1f5ff91..0000000 --- a/gcc44-rh341221.patch +++ /dev/null @@ -1,28 +0,0 @@ -2007-10-21 Jakub Jelinek - - * doc/Makefile.am (POD2MAN): Set date from cp-tools.texinfo - timestamp rather than from current date. - * doc/Makefile.in: Regenerated. - ---- libjava/classpath/doc/Makefile.am.jj 2007-12-07 17:55:00.000000000 +0100 -+++ libjava/classpath/doc/Makefile.am 2007-12-07 18:55:28.000000000 +0100 -@@ -31,7 +31,7 @@ TOOLS_MANFILES = \ - gtnameserv.1 \ - gjdoc.1 - --POD2MAN = pod2man --center="GNU" --release="$(VERSION)" -+POD2MAN = pod2man --center="GNU" --release="$(VERSION)" --date="$(shell ls --time-style=+%F -l $(srcdir)/cp-tools.texinfo | awk '{print $$6}')" - TEXI2POD = perl $(srcdir)/texi2pod.pl - STAMP = echo timestamp > - ---- libjava/classpath/doc/Makefile.in.jj 2007-12-07 17:55:00.000000000 +0100 -+++ libjava/classpath/doc/Makefile.in 2007-12-07 18:55:43.000000000 +0100 -@@ -382,7 +382,7 @@ TOOLS_MANFILES = \ - gtnameserv.1 \ - gjdoc.1 - --POD2MAN = pod2man --center="GNU" --release="$(VERSION)" -+POD2MAN = pod2man --center="GNU" --release="$(VERSION)" --date="$(shell ls --time-style=+%F -l $(srcdir)/cp-tools.texinfo | awk '{print $$6}')" - TEXI2POD = perl $(srcdir)/texi2pod.pl - STAMP = echo timestamp > - @GENINSRC_FALSE@STAMP_GENINSRC = diff --git a/import.log b/import.log index 8ed359c..fd3b2e9 100644 --- a/import.log +++ b/import.log @@ -26,3 +26,4 @@ gcc-4_4_4-4_fc13:F-13:gcc-4.4.4-4.fc13.src.rpm:1274217265 gcc-4_4_4-5_fc13:F-13:gcc-4.4.4-5.fc13.src.rpm:1274827909 gcc-4_4_4-7_fc13:F-13:gcc-4.4.4-7.fc13.src.rpm:1275991168 gcc-4_4_4-8_fc13:F-13:gcc-4.4.4-8.fc13.src.rpm:1276244305 +gcc-4_4_4-9_fc13:F-13:gcc-4.4.4-9.fc13.src.rpm:1277410568 diff --git a/sources b/sources index bae7310..7f1bce5 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz -a896e6090fb9f4ef74a8b292fda42af4 gcc-4.4.4-20100611.tar.bz2 +32d385c34788faa23d93cd8b55fecd32 gcc-4.4.4-20100624.tar.bz2 From 3828d4db973db591d45e1164deed2ffbdb67258f Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 30 Jun 2010 07:26:40 +0000 Subject: [PATCH 33/38] 4.4.4-10 --- .cvsignore | 2 +- gcc.spec | 25 +++--- gcc44-pr44492.patch | 207 -------------------------------------------- gcc44-pr44610.patch | 32 ------- import.log | 1 + sources | 2 +- 6 files changed, 18 insertions(+), 251 deletions(-) delete mode 100644 gcc44-pr44492.patch delete mode 100644 gcc44-pr44610.patch diff --git a/.cvsignore b/.cvsignore index 6b76a78..8751100 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ fastjar-0.97.tar.gz -gcc-4.4.4-20100624.tar.bz2 +gcc-4.4.4-20100630.tar.bz2 diff --git a/gcc.spec b/gcc.spec index 6320523..f3613f9 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,9 +1,9 @@ -%global DATE 20100624 -%global SVNREV 161335 +%global DATE 20100630 +%global SVNREV 161589 %global gcc_version 4.4.4 # Note, gcc_release must be integer, if you want to add suffixes to # %{release}, append them after %{gcc_release} on Release: line. -%global gcc_release 9 +%global gcc_release 10 %global _unpackaged_files_terminate_build 0 %global multilib_64_archs sparc64 ppc64 s390x x86_64 %if 0%{?fedora} >= 13 || 0%{?rhel} >= 6 @@ -174,9 +174,7 @@ Patch14: gcc44-pr38757.patch Patch15: gcc44-libstdc++-docs.patch Patch16: gcc44-ppc64-aixdesc.patch Patch17: gcc44-no-add-needed.patch -Patch18: gcc44-pr44492.patch -Patch19: gcc44-pr44542.patch -Patch20: gcc44-pr44610.patch +Patch18: gcc44-pr44542.patch Patch1000: fastjar-0.97-segfault.patch Patch1001: fastjar-0.97-len1.patch @@ -515,9 +513,7 @@ GNAT is a GNU Ada 95 front-end to GCC. This package includes static libraries. %if 0%{?fedora} >= 13 %patch17 -p0 -b .no-add-needed~ %endif -%patch18 -p0 -b .pr44492~ -%patch19 -p0 -b .pr44542~ -%patch20 -p0 -b .pr44610~ +%patch18 -p0 -b .pr44542~ # This testcase doesn't compile. rm libjava/testsuite/libjava.lang/PR35020* @@ -1914,7 +1910,6 @@ fi %exclude %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/adalib/libgnarl.a %endif %endif -%endif %if 0%{?fedora} >= 14 %files -n libgnat-static @@ -1940,6 +1935,7 @@ fi %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/adalib/libgnarl.a %endif %endif +%endif %files -n libgomp %defattr(-,root,root,-) @@ -2004,6 +2000,15 @@ fi %endif %changelog +* Wed Jun 30 2010 Jakub Jelinek 4.4.4-10 +- update from gcc-4_4-branch + - PRs fortran/43841, fortran/43843, tree-optimization/44683 + - fix qualified-id as template argument handling (#605761, PR c++/44587) +- -Wunused-but-set-* static_cast fix (PR c++/44682) +- VTA backports + - PRs debug/44610, debug/44668, debug/44694 +- unswitching fixes (PR middle-end/43866) + * Thu Jun 24 2010 Jakub Jelinek 4.4.4-9 - update from gcc-4_4-branch - PRs bootstrap/44426, bootstrap/44544, c++/44627, fortran/44536, diff --git a/gcc44-pr44492.patch b/gcc44-pr44492.patch deleted file mode 100644 index cbedae8..0000000 --- a/gcc44-pr44492.patch +++ /dev/null @@ -1,207 +0,0 @@ -2010-06-24 Jakub Jelinek - - PR middle-end/44492 - * recog.h (struct recog_data): Add is_asm field. - * recog.c (asm_operand_ok, constrain_operands): If neither < nor > is - present in constraints of inline-asm operand and memory operand - contains {PRE,POST}_{INC,DEC,MODIFY}, return 0. - (extract_insn): Initialize recog_data.is_asm. - * doc/md.texi (Constraints): Document operand side-effect rules. - - * g++.dg/torture/pr44492.C: New test. - ---- gcc/doc/md.texi (revision 161327) -+++ gcc/doc/md.texi (revision 161328) -@@ -1052,6 +1052,10 @@ an operand may be in a register, and whi - operand can be a memory reference, and which kinds of address; whether the - operand may be an immediate constant, and which possible values it may - have. Constraints can also require two operands to match. -+Side-effects aren't allowed in operands of inline @code{asm}, unless -+@samp{<} or @samp{>} constraints are used, because there is no guarantee -+that the side-effects will happen exactly once in an instruction that can update -+the addressing register. - - @ifset INTERNALS - @menu -@@ -1129,12 +1133,21 @@ would fit the @samp{m} constraint but no - @cindex @samp{<} in constraint - @item @samp{<} - A memory operand with autodecrement addressing (either predecrement or --postdecrement) is allowed. -+postdecrement) is allowed. In inline @code{asm} this constraint is only -+allowed if the operand is used exactly once in an instruction that can -+handle the side-effects. Not using an operand with @samp{<} in constraint -+string in the inline @code{asm} pattern at all or using it in multiple -+instructions isn't valid, because the side-effects wouldn't be performed -+or would be performed more than once. Furthermore, on some targets -+the operand with @samp{<} in constraint string must be accompanied by -+special instruction suffixes like @code{%U0} instruction suffix on PowerPC -+or @code{%P0} on IA-64. - - @cindex @samp{>} in constraint - @item @samp{>} - A memory operand with autoincrement addressing (either preincrement or --postincrement) is allowed. -+postincrement) is allowed. In inline @code{asm} the same restrictions -+as for @samp{<} apply. - - @cindex @samp{r} in constraint - @cindex registers in constraints ---- gcc/recog.c (revision 161327) -+++ gcc/recog.c (revision 161328) -@@ -1601,6 +1601,9 @@ int - asm_operand_ok (rtx op, const char *constraint, const char **constraints) - { - int result = 0; -+#ifdef AUTO_INC_DEC -+ bool incdec_ok = false; -+#endif - - /* Use constrain_operands after reload. */ - gcc_assert (!reload_completed); -@@ -1608,7 +1611,7 @@ asm_operand_ok (rtx op, const char *cons - /* Empty constraint string is the same as "X,...,X", i.e. X for as - many alternatives as required to match the other operands. */ - if (*constraint == '\0') -- return 1; -+ result = 1; - - while (*constraint) - { -@@ -1685,6 +1688,9 @@ asm_operand_ok (rtx op, const char *cons - || GET_CODE (XEXP (op, 0)) == PRE_DEC - || GET_CODE (XEXP (op, 0)) == POST_DEC)) - result = 1; -+#ifdef AUTO_INC_DEC -+ incdec_ok = true; -+#endif - break; - - case '>': -@@ -1693,6 +1699,9 @@ asm_operand_ok (rtx op, const char *cons - || GET_CODE (XEXP (op, 0)) == PRE_INC - || GET_CODE (XEXP (op, 0)) == POST_INC)) - result = 1; -+#ifdef AUTO_INC_DEC -+ incdec_ok = true; -+#endif - break; - - case 'E': -@@ -1814,6 +1823,23 @@ asm_operand_ok (rtx op, const char *cons - return 0; - } - -+#ifdef AUTO_INC_DEC -+ /* For operands without < or > constraints reject side-effects. */ -+ if (!incdec_ok && result && MEM_P (op)) -+ switch (GET_CODE (XEXP (op, 0))) -+ { -+ case PRE_INC: -+ case POST_INC: -+ case PRE_DEC: -+ case POST_DEC: -+ case PRE_MODIFY: -+ case POST_MODIFY: -+ return 0; -+ default: -+ break; -+ } -+#endif -+ - return result; - } - -@@ -2039,6 +2065,7 @@ extract_insn (rtx insn) - recog_data.n_operands = 0; - recog_data.n_alternatives = 0; - recog_data.n_dups = 0; -+ recog_data.is_asm = false; - - switch (GET_CODE (body)) - { -@@ -2085,6 +2112,7 @@ extract_insn (rtx insn) - while (*p) - recog_data.n_alternatives += (*p++ == ','); - } -+ recog_data.is_asm = true; - break; - } - fatal_insn_not_found (insn); -@@ -2699,6 +2727,30 @@ constrain_operands (int strict) - = recog_data.operand[funny_match[funny_match_index].this_op]; - } - -+#ifdef AUTO_INC_DEC -+ /* For operands without < or > constraints reject side-effects. */ -+ if (recog_data.is_asm) -+ { -+ for (opno = 0; opno < recog_data.n_operands; opno++) -+ if (MEM_P (recog_data.operand[opno])) -+ switch (GET_CODE (XEXP (recog_data.operand[opno], 0))) -+ { -+ case PRE_INC: -+ case POST_INC: -+ case PRE_DEC: -+ case POST_DEC: -+ case PRE_MODIFY: -+ case POST_MODIFY: -+ if (strchr (recog_data.constraints[opno], '<') == NULL -+ || strchr (recog_data.constraints[opno], '>') -+ == NULL) -+ return 0; -+ break; -+ default: -+ break; -+ } -+ } -+#endif - return 1; - } - } ---- gcc/recog.h (revision 161327) -+++ gcc/recog.h (revision 161328) -@@ -230,6 +230,9 @@ struct recog_data - /* The number of alternatives in the constraints for the insn. */ - char n_alternatives; - -+ /* True if insn is ASM_OPERANDS. */ -+ bool is_asm; -+ - /* Specifies whether an insn alternative is enabled using the - `enabled' attribute in the insn pattern definition. For back - ends not using the `enabled' attribute the array fields are ---- gcc/testsuite/g++.dg/torture/pr44492.C (revision 0) -+++ gcc/testsuite/g++.dg/torture/pr44492.C (revision 161328) -@@ -0,0 +1,31 @@ -+// PR middle-end/44492 -+// { dg-do run } -+ -+struct T { unsigned long p; }; -+struct S { T a, b, c; unsigned d; }; -+ -+__attribute__((noinline)) -+void -+bar (const T &x, const T &y) -+{ -+ if (x.p != 0x2348 || y.p != 0x2346) -+ __builtin_abort (); -+} -+ -+__attribute__((noinline)) -+void -+foo (S &s, T e) -+{ -+ unsigned long a = e.p; -+ unsigned long b = s.b.p; -+ __asm__ volatile ("" : : "rm" (a), "rm" (b)); -+ bar (e, s.b); -+} -+ -+int -+main () -+{ -+ S s = { { 0x2345 }, { 0x2346 }, { 0x2347 }, 6 }; -+ T t = { 0x2348 }; -+ foo (s, t); -+} diff --git a/gcc44-pr44610.patch b/gcc44-pr44610.patch deleted file mode 100644 index de89604..0000000 --- a/gcc44-pr44610.patch +++ /dev/null @@ -1,32 +0,0 @@ -2010-06-23 Alexandre Oliva - - PR debug/44610 - * simplify-rtx.c (delegitimize_mem_from_attrs): Don't use a base - address if the offset is unknown. - ---- gcc/simplify-rtx.c.orig 2010-06-23 01:15:14.000000000 -0300 -+++ gcc/simplify-rtx.c 2010-06-23 01:20:21.000000000 -0300 -@@ -208,10 +208,11 @@ avoid_constant_pool_reference (rtx x) - rtx - delegitimize_mem_from_attrs (rtx x) - { -+ /* MEMs without MEM_OFFSETs may have been offset, so we can't just -+ use their base addresses as equivalent. */ - if (MEM_P (x) - && MEM_EXPR (x) -- && (!MEM_OFFSET (x) -- || GET_CODE (MEM_OFFSET (x)) == CONST_INT)) -+ && MEM_OFFSET (x)) - { - tree decl = MEM_EXPR (x); - enum machine_mode mode = GET_MODE (x); -@@ -264,8 +265,7 @@ delegitimize_mem_from_attrs (rtx x) - { - rtx newx; - -- if (MEM_OFFSET (x)) -- offset += INTVAL (MEM_OFFSET (x)); -+ offset += INTVAL (MEM_OFFSET (x)); - - newx = DECL_RTL (decl); - diff --git a/import.log b/import.log index fd3b2e9..6d7f465 100644 --- a/import.log +++ b/import.log @@ -27,3 +27,4 @@ gcc-4_4_4-5_fc13:F-13:gcc-4.4.4-5.fc13.src.rpm:1274827909 gcc-4_4_4-7_fc13:F-13:gcc-4.4.4-7.fc13.src.rpm:1275991168 gcc-4_4_4-8_fc13:F-13:gcc-4.4.4-8.fc13.src.rpm:1276244305 gcc-4_4_4-9_fc13:F-13:gcc-4.4.4-9.fc13.src.rpm:1277410568 +gcc-4_4_4-10_fc13:F-13:gcc-4.4.4-10.fc13.src.rpm:1277882765 diff --git a/sources b/sources index 7f1bce5..9ecbe6e 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz -32d385c34788faa23d93cd8b55fecd32 gcc-4.4.4-20100624.tar.bz2 +1e5a3dc8063ea17ed92939cd01d244d0 gcc-4.4.4-20100630.tar.bz2 From 5f74d245e0bd9fca8613485e4912a1a19d0120e3 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 7 Jul 2010 10:18:09 +0000 Subject: [PATCH 34/38] 4.4.4-11 --- .cvsignore | 2 +- gcc.spec | 22 +++++++++++-- gcc44-rh578382.patch | 76 ++++++++++++++++++++++++++++++++++++++++++++ gcc44-rh610785.patch | 74 ++++++++++++++++++++++++++++++++++++++++++ import.log | 1 + sources | 2 +- 6 files changed, 172 insertions(+), 5 deletions(-) create mode 100644 gcc44-rh578382.patch create mode 100644 gcc44-rh610785.patch diff --git a/.cvsignore b/.cvsignore index 8751100..5e85cb0 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ fastjar-0.97.tar.gz -gcc-4.4.4-20100630.tar.bz2 +gcc-4.4.4-20100707.tar.bz2 diff --git a/gcc.spec b/gcc.spec index f3613f9..3424479 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,9 +1,9 @@ -%global DATE 20100630 -%global SVNREV 161589 +%global DATE 20100707 +%global SVNREV 161902 %global gcc_version 4.4.4 # Note, gcc_release must be integer, if you want to add suffixes to # %{release}, append them after %{gcc_release} on Release: line. -%global gcc_release 10 +%global gcc_release 11 %global _unpackaged_files_terminate_build 0 %global multilib_64_archs sparc64 ppc64 s390x x86_64 %if 0%{?fedora} >= 13 || 0%{?rhel} >= 6 @@ -175,6 +175,8 @@ Patch15: gcc44-libstdc++-docs.patch Patch16: gcc44-ppc64-aixdesc.patch Patch17: gcc44-no-add-needed.patch Patch18: gcc44-pr44542.patch +Patch19: gcc44-rh610785.patch +Patch20: gcc44-rh578382.patch Patch1000: fastjar-0.97-segfault.patch Patch1001: fastjar-0.97-len1.patch @@ -514,6 +516,8 @@ GNAT is a GNU Ada 95 front-end to GCC. This package includes static libraries. %patch17 -p0 -b .no-add-needed~ %endif %patch18 -p0 -b .pr44542~ +%patch19 -p0 -b .rh610785~ +%patch20 -p0 -b .rh578382~ # This testcase doesn't compile. rm libjava/testsuite/libjava.lang/PR35020* @@ -2000,6 +2004,18 @@ fi %endif %changelog +* Wed Jul 7 2010 Jakub Jelinek 4.4.4-11 +- update from gcc-4_4-branch + - PRs target/44597, target/44705 +- VTA backports + - PR c++/44808 + - avoid outputting invalid registers in debug info (#610455) +- -Wunused-but-set-* vector assignment fix (PR c++/44780) +- fix PowerPC address reloading for inline-asms (#608768, PR target/44707) +- fix predictive commoning (#609488, PR tree-optimization/40421) +- fix SRA not to do useless sign-extensions that confuses ivopts (#610785) +- fix IPP handling in libgcj (#578382) + * Wed Jun 30 2010 Jakub Jelinek 4.4.4-10 - update from gcc-4_4-branch - PRs fortran/43841, fortran/43843, tree-optimization/44683 diff --git a/gcc44-rh578382.patch b/gcc44-rh578382.patch new file mode 100644 index 0000000..92eb96a --- /dev/null +++ b/gcc44-rh578382.patch @@ -0,0 +1,76 @@ +2010-04-27 Andrew Haley + + * gnu/javax/print/ipp/IppResponse.java (parseAttributes): Handle + IppValueTag.UNKNOWN. + * gnu/javax/print/ipp/IppRequest.java (writeOperationAttributes): + Handle RequestedAttributes. + * gnu/javax/print/ipp/IppPrintService.java (processResponse): Add + DocFlavor.SERVICE_FORMATTED.PAGEABLE and + DocFlavor.SERVICE_FORMATTED.PRINTABLE. + +--- libjava/classpath/gnu/javax/print/ipp/IppRequest.java (revision 158788) ++++ libjava/classpath/gnu/javax/print/ipp/IppRequest.java (revision 158789) +@@ -434,6 +434,8 @@ public class IppRequest + PrinterURI printerUri = (PrinterURI) attributes.get(PrinterURI.class); + JobUri jobUri = (JobUri) attributes.get(JobUri.class); + JobId jobId = (JobId) attributes.get(JobId.class); ++ RequestedAttributes reqAttrs ++ = (RequestedAttributes)attributes.get(RequestedAttributes.class); + if (printerUri != null && jobId == null && jobUri == null) + { + write(printerUri); +@@ -467,6 +469,12 @@ public class IppRequest + logger.log(Component.IPP, "Attribute: Name: <" + jobUri.getCategory() + .getName() + "> Value: <" + jobUri.toString() + ">"); + } ++ else if (reqAttrs != null) ++ { ++ write(reqAttrs); ++ attributes.remove(RequestedAttributes.class); ++ logger.log(Component.IPP, "RequestedAttributes: <" + reqAttrs + ">"); ++ } + else + { + throw new IppException("Unknown target operation attribute combination."); +--- libjava/classpath/gnu/javax/print/ipp/IppPrintService.java (revision 158788) ++++ libjava/classpath/gnu/javax/print/ipp/IppPrintService.java (revision 158789) +@@ -356,8 +356,17 @@ public class IppPrintService implements + // should not happen, all fields are public + } + } ++ ++ if (this.getClass() ++ .isAssignableFrom(gnu.javax.print.CupsPrintService.class)) ++ { ++// CUPS always provides filters to convert from Postscript. ++// This logic looks odd, but it's what OpenJDK does. ++ flavors.add(DocFlavor.SERVICE_FORMATTED.PAGEABLE); ++ flavors.add(DocFlavor.SERVICE_FORMATTED.PRINTABLE); ++ } + } +- ++ + // printer uris + Set uris = getPrinterAttributeSet(PrinterUriSupported.class); + printerUris = new ArrayList(uris.size()); +--- libjava/classpath/gnu/javax/print/ipp/IppResponse.java (revision 158788) ++++ libjava/classpath/gnu/javax/print/ipp/IppResponse.java (revision 158789) +@@ -302,11 +302,14 @@ public class IppResponse + // out-of-band values + case IppValueTag.UNSUPPORTED: + case IppValueTag.UNKNOWN: +- case IppValueTag.NO_VALUE: + // TODO implement out-of-band handling +- // We currently throw an exception to see when it occurs - not yet :-) +- throw new IppException( +- "Unexpected name value for out-of-band value tag"); ++ // We currently throw an exception to see when it occurs - not yet :-) ++ throw new IppException( ++ "Unexpected name value for out-of-band value tag " + tag); ++ case IppValueTag.NO_VALUE: ++ attribute = null; ++ ++ break; + case IppValueTag.INTEGER: + int intValue = IppUtilities.convertToInt(value); + attribute = IppUtilities.getIntegerAttribute(name, intValue); diff --git a/gcc44-rh610785.patch b/gcc44-rh610785.patch new file mode 100644 index 0000000..91d0934 --- /dev/null +++ b/gcc44-rh610785.patch @@ -0,0 +1,74 @@ +2010-07-07 Jakub Jelinek + + * tree-sra.c (sra_build_assignment): Don't add BIT_XOR_EXPR/MINUS_EXPR + of signbit if signbit is the most significant bit of utype already. + + * gcc.c-torture/execute/20100707-1.c: New test. + +--- gcc/tree-sra.c.jj 2010-05-13 13:08:52.000000000 +0200 ++++ gcc/tree-sra.c 2010-07-06 19:50:09.000000000 +0200 +@@ -2211,7 +2211,10 @@ sra_build_assignment (tree dst, tree src + + /* Perform sign extension, if required. + ??? This should never be necessary. */ +- if (!unsignedp) ++ if (!unsignedp ++ && (TREE_INT_CST_LOW (width) != TYPE_PRECISION (utype) ++ || (TREE_INT_CST_LOW (width) ++ != GET_MODE_BITSIZE (TYPE_MODE (utype))))) + { + tree signbit = int_const_binop (LSHIFT_EXPR, + build_int_cst_wide (utype, 1, 0), +--- gcc/testsuite/gcc.c-torture/execute/20100707-1.c 2010-05-27 15:41:40.446237053 +0200 ++++ gcc/testsuite/gcc.c-torture/execute/20100707-1.c 2010-07-06 13:55:35.000000000 +0200 +@@ -0,0 +1,50 @@ ++struct S { int s; }; ++struct T { int w; int h; }; ++int vr; ++ ++inline struct T ++bar (const struct S * x) ++{ ++ struct T t; ++ t.w = vr; ++ t.h = x->s; ++ return t; ++} ++ ++__attribute__ ((noinline)) ++void foo (struct S * w, unsigned char *x, int y, int *z[2]) ++{ ++ struct T t; ++ int i, j, k; ++ t = bar (w); ++ k = t.w + 2; ++ for (i = 0; i <= t.h; i++) ++ { ++ int *u = z[i > 0] + 1; ++ unsigned char *v; ++ int q = 0; ++ v = x + k * i + 1; ++ for (j = 0; j < t.w; j++) ++ { ++ int m = u[j]; ++ if (m > y && !q && v[j - k] != 2) ++ v[j] = 0; ++ } ++ } ++} ++ ++unsigned char b[64]; ++ ++int ++main (void) ++{ ++ int v[32], *z[2]; ++ struct S s; ++ __builtin_memset (v, 0, sizeof (v)); ++ vr = 16; ++ s.s = 16; ++ z[0] = v; ++ z[1] = v; ++ foo (&s, b + 32, -1, z); ++ return 0; ++} diff --git a/import.log b/import.log index 6d7f465..373af4a 100644 --- a/import.log +++ b/import.log @@ -28,3 +28,4 @@ gcc-4_4_4-7_fc13:F-13:gcc-4.4.4-7.fc13.src.rpm:1275991168 gcc-4_4_4-8_fc13:F-13:gcc-4.4.4-8.fc13.src.rpm:1276244305 gcc-4_4_4-9_fc13:F-13:gcc-4.4.4-9.fc13.src.rpm:1277410568 gcc-4_4_4-10_fc13:F-13:gcc-4.4.4-10.fc13.src.rpm:1277882765 +gcc-4_4_4-11_fc13:F-13:gcc-4.4.4-11.fc13.src.rpm:1278497746 diff --git a/sources b/sources index 9ecbe6e..1ad13c4 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz -1e5a3dc8063ea17ed92939cd01d244d0 gcc-4.4.4-20100630.tar.bz2 +ccea98dc838ad0ce98ee1a52ee2931cd gcc-4.4.4-20100707.tar.bz2 From 5112141b99abc216ffc8b6b4fb307eec84b36dcf Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 13 Jul 2010 21:33:34 +0000 Subject: [PATCH 35/38] 4.4.4-12 --- .cvsignore | 2 +- gcc.spec | 15 ++++++--- gcc44-rh578382.patch | 76 -------------------------------------------- import.log | 1 + sources | 2 +- 5 files changed, 13 insertions(+), 83 deletions(-) delete mode 100644 gcc44-rh578382.patch diff --git a/.cvsignore b/.cvsignore index 5e85cb0..a318c50 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ fastjar-0.97.tar.gz -gcc-4.4.4-20100707.tar.bz2 +gcc-4.4.4-20100713.tar.bz2 diff --git a/gcc.spec b/gcc.spec index 3424479..5589fd9 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,9 +1,9 @@ -%global DATE 20100707 -%global SVNREV 161902 +%global DATE 20100713 +%global SVNREV 162154 %global gcc_version 4.4.4 # Note, gcc_release must be integer, if you want to add suffixes to # %{release}, append them after %{gcc_release} on Release: line. -%global gcc_release 11 +%global gcc_release 12 %global _unpackaged_files_terminate_build 0 %global multilib_64_archs sparc64 ppc64 s390x x86_64 %if 0%{?fedora} >= 13 || 0%{?rhel} >= 6 @@ -176,7 +176,6 @@ Patch16: gcc44-ppc64-aixdesc.patch Patch17: gcc44-no-add-needed.patch Patch18: gcc44-pr44542.patch Patch19: gcc44-rh610785.patch -Patch20: gcc44-rh578382.patch Patch1000: fastjar-0.97-segfault.patch Patch1001: fastjar-0.97-len1.patch @@ -517,7 +516,6 @@ GNAT is a GNU Ada 95 front-end to GCC. This package includes static libraries. %endif %patch18 -p0 -b .pr44542~ %patch19 -p0 -b .rh610785~ -%patch20 -p0 -b .rh578382~ # This testcase doesn't compile. rm libjava/testsuite/libjava.lang/PR35020* @@ -2004,6 +2002,13 @@ fi %endif %changelog +* Tue Jul 13 2010 Jakub Jelinek 4.4.4-12 +- update from gcc-4_4-branch + - PRs fortran/44582, fortran/44773, fortran/44847, pch/14940, target/33743 +- fix inline-asm check for auto-inc-dec operands (PR testsuite/44701) +- use DW_OP_const[48]u instead of DW_OP_addr for DW_OP_GNU_push_tls_address + operand + * Wed Jul 7 2010 Jakub Jelinek 4.4.4-11 - update from gcc-4_4-branch - PRs target/44597, target/44705 diff --git a/gcc44-rh578382.patch b/gcc44-rh578382.patch deleted file mode 100644 index 92eb96a..0000000 --- a/gcc44-rh578382.patch +++ /dev/null @@ -1,76 +0,0 @@ -2010-04-27 Andrew Haley - - * gnu/javax/print/ipp/IppResponse.java (parseAttributes): Handle - IppValueTag.UNKNOWN. - * gnu/javax/print/ipp/IppRequest.java (writeOperationAttributes): - Handle RequestedAttributes. - * gnu/javax/print/ipp/IppPrintService.java (processResponse): Add - DocFlavor.SERVICE_FORMATTED.PAGEABLE and - DocFlavor.SERVICE_FORMATTED.PRINTABLE. - ---- libjava/classpath/gnu/javax/print/ipp/IppRequest.java (revision 158788) -+++ libjava/classpath/gnu/javax/print/ipp/IppRequest.java (revision 158789) -@@ -434,6 +434,8 @@ public class IppRequest - PrinterURI printerUri = (PrinterURI) attributes.get(PrinterURI.class); - JobUri jobUri = (JobUri) attributes.get(JobUri.class); - JobId jobId = (JobId) attributes.get(JobId.class); -+ RequestedAttributes reqAttrs -+ = (RequestedAttributes)attributes.get(RequestedAttributes.class); - if (printerUri != null && jobId == null && jobUri == null) - { - write(printerUri); -@@ -467,6 +469,12 @@ public class IppRequest - logger.log(Component.IPP, "Attribute: Name: <" + jobUri.getCategory() - .getName() + "> Value: <" + jobUri.toString() + ">"); - } -+ else if (reqAttrs != null) -+ { -+ write(reqAttrs); -+ attributes.remove(RequestedAttributes.class); -+ logger.log(Component.IPP, "RequestedAttributes: <" + reqAttrs + ">"); -+ } - else - { - throw new IppException("Unknown target operation attribute combination."); ---- libjava/classpath/gnu/javax/print/ipp/IppPrintService.java (revision 158788) -+++ libjava/classpath/gnu/javax/print/ipp/IppPrintService.java (revision 158789) -@@ -356,8 +356,17 @@ public class IppPrintService implements - // should not happen, all fields are public - } - } -+ -+ if (this.getClass() -+ .isAssignableFrom(gnu.javax.print.CupsPrintService.class)) -+ { -+// CUPS always provides filters to convert from Postscript. -+// This logic looks odd, but it's what OpenJDK does. -+ flavors.add(DocFlavor.SERVICE_FORMATTED.PAGEABLE); -+ flavors.add(DocFlavor.SERVICE_FORMATTED.PRINTABLE); -+ } - } -- -+ - // printer uris - Set uris = getPrinterAttributeSet(PrinterUriSupported.class); - printerUris = new ArrayList(uris.size()); ---- libjava/classpath/gnu/javax/print/ipp/IppResponse.java (revision 158788) -+++ libjava/classpath/gnu/javax/print/ipp/IppResponse.java (revision 158789) -@@ -302,11 +302,14 @@ public class IppResponse - // out-of-band values - case IppValueTag.UNSUPPORTED: - case IppValueTag.UNKNOWN: -- case IppValueTag.NO_VALUE: - // TODO implement out-of-band handling -- // We currently throw an exception to see when it occurs - not yet :-) -- throw new IppException( -- "Unexpected name value for out-of-band value tag"); -+ // We currently throw an exception to see when it occurs - not yet :-) -+ throw new IppException( -+ "Unexpected name value for out-of-band value tag " + tag); -+ case IppValueTag.NO_VALUE: -+ attribute = null; -+ -+ break; - case IppValueTag.INTEGER: - int intValue = IppUtilities.convertToInt(value); - attribute = IppUtilities.getIntegerAttribute(name, intValue); diff --git a/import.log b/import.log index 373af4a..123de75 100644 --- a/import.log +++ b/import.log @@ -29,3 +29,4 @@ gcc-4_4_4-8_fc13:F-13:gcc-4.4.4-8.fc13.src.rpm:1276244305 gcc-4_4_4-9_fc13:F-13:gcc-4.4.4-9.fc13.src.rpm:1277410568 gcc-4_4_4-10_fc13:F-13:gcc-4.4.4-10.fc13.src.rpm:1277882765 gcc-4_4_4-11_fc13:F-13:gcc-4.4.4-11.fc13.src.rpm:1278497746 +gcc-4_4_4-12_fc13:F-13:gcc-4.4.4-12.fc13.src.rpm:1279056750 diff --git a/sources b/sources index 1ad13c4..c79db54 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz -ccea98dc838ad0ce98ee1a52ee2931cd gcc-4.4.4-20100707.tar.bz2 +cde3a182cf99c529597bdc2bf50073c4 gcc-4.4.4-20100713.tar.bz2 From 4d7c159642f48f2d73b5810f1d2fdd2d14028c48 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 26 Jul 2010 09:22:23 +0000 Subject: [PATCH 36/38] 4.4.4-13 --- .cvsignore | 2 +- gcc.spec | 17 ++++- gcc44-rh533181.patch | 153 +++++++++++++++++++++++++++++++++++++++++++ import.log | 1 + sources | 2 +- 5 files changed, 170 insertions(+), 5 deletions(-) create mode 100644 gcc44-rh533181.patch diff --git a/.cvsignore b/.cvsignore index a318c50..ca03765 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ fastjar-0.97.tar.gz -gcc-4.4.4-20100713.tar.bz2 +gcc-4.4.4-20100726.tar.bz2 diff --git a/gcc.spec b/gcc.spec index 5589fd9..f70a521 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,9 +1,9 @@ -%global DATE 20100713 -%global SVNREV 162154 +%global DATE 20100726 +%global SVNREV 162526 %global gcc_version 4.4.4 # Note, gcc_release must be integer, if you want to add suffixes to # %{release}, append them after %{gcc_release} on Release: line. -%global gcc_release 12 +%global gcc_release 13 %global _unpackaged_files_terminate_build 0 %global multilib_64_archs sparc64 ppc64 s390x x86_64 %if 0%{?fedora} >= 13 || 0%{?rhel} >= 6 @@ -176,6 +176,7 @@ Patch16: gcc44-ppc64-aixdesc.patch Patch17: gcc44-no-add-needed.patch Patch18: gcc44-pr44542.patch Patch19: gcc44-rh610785.patch +Patch20: gcc44-rh533181.patch Patch1000: fastjar-0.97-segfault.patch Patch1001: fastjar-0.97-len1.patch @@ -516,6 +517,7 @@ GNAT is a GNU Ada 95 front-end to GCC. This package includes static libraries. %endif %patch18 -p0 -b .pr44542~ %patch19 -p0 -b .rh610785~ +%patch20 -p0 -b .rh533181~ # This testcase doesn't compile. rm libjava/testsuite/libjava.lang/PR35020* @@ -2002,6 +2004,15 @@ fi %endif %changelog +* Mon Jul 26 2010 Jakub Jelinek 4.4.4-13 +- update from gcc-4_4-branch + - PRs fortran/45019, target/42869, target/44942, testsuite/38946 +- VTA backports + - PRs debug/45015, bootstrap/45028 + - var-tracking improvements (#616050, PR debug/45003, PR debug/45006) +- fix fortran SELECT CASE handling with CHARACTER type (PR fortran/40206) +- small OpenMP debug info improvements (#533181) + * Tue Jul 13 2010 Jakub Jelinek 4.4.4-12 - update from gcc-4_4-branch - PRs fortran/44582, fortran/44773, fortran/44847, pch/14940, target/33743 diff --git a/gcc44-rh533181.patch b/gcc44-rh533181.patch new file mode 100644 index 0000000..76326e2 --- /dev/null +++ b/gcc44-rh533181.patch @@ -0,0 +1,153 @@ +2010-07-22 Jakub Jelinek + + * gimplify.c (enum gimplify_omp_var_data): Add + GOVD_THREADPRIVATE_WARNED. + (gimplify_bind_expr): Add GOVD_LOCAL | GOVD_SEEN even for global vars. + (omp_notice_threadprivate_variable): Note used threadprivate vars + with current function's context in shared clauses. + (gimplify_adjust_omp_clauses_1): Allow globals with current function's + context in taskreg shared clause. + * omp-low.c (lower_rec_input_clauses): For function-local is_global_var + VAR_DECLs in shared clauses add a decl copy with DECL_VALUE_EXPR + pointing to the original. + + * trans-openmp.c (gfc_omp_private_debug_clause): Return false for + threadprivate decls. + + * gcc.dg/gomp/tls-3.c: New test. + +--- gcc/fortran/trans-openmp.c.jj 2010-06-24 21:47:09.908230044 +0200 ++++ gcc/fortran/trans-openmp.c 2010-07-26 10:45:15.830229443 +0200 +@@ -351,6 +351,18 @@ gfc_omp_disregard_value_expr (tree decl, + bool + gfc_omp_private_debug_clause (tree decl, bool shared) + { ++ if (TREE_STATIC (decl) || DECL_EXTERNAL (decl)) ++ { ++ if (DECL_THREAD_LOCAL_P (decl)) ++ return false; ++ if (DECL_HAS_VALUE_EXPR_P (decl)) ++ { ++ tree value = get_base_address (DECL_VALUE_EXPR (decl)); ++ if (value && DECL_P (value) && DECL_THREAD_LOCAL_P (value)) ++ return false; ++ } ++ } ++ + if (GFC_DECL_CRAY_POINTEE (decl)) + return true; + +--- gcc/gimplify.c.jj 2010-07-09 09:01:37.049604412 +0200 ++++ gcc/gimplify.c 2010-07-26 10:50:05.646291216 +0200 +@@ -66,6 +66,7 @@ enum gimplify_omp_var_data + GOVD_LOCAL = 128, + GOVD_DEBUG_PRIVATE = 256, + GOVD_PRIVATE_OUTER_REF = 512, ++ GOVD_THREADPRIVATE_WARNED = 1024, + GOVD_DATA_SHARE_CLASS = (GOVD_SHARED | GOVD_PRIVATE | GOVD_FIRSTPRIVATE + | GOVD_LASTPRIVATE | GOVD_REDUCTION | GOVD_LOCAL) + }; +@@ -1234,7 +1235,7 @@ gimplify_bind_expr (tree *expr_p, gimple + struct gimplify_omp_ctx *ctx = gimplify_omp_ctxp; + + /* Mark variable as local. */ +- if (ctx && !is_global_var (t) ++ if (ctx + && (! DECL_SEEN_IN_BIND_EXPR_P (t) + || splay_tree_lookup (ctx->variables, + (splay_tree_key) t) == NULL)) +@@ -5339,18 +5340,36 @@ omp_notice_threadprivate_variable (struc + { + splay_tree_node n; + +- if (ctx->region_type != ORT_UNTIED_TASK) ++ while (ctx && ctx->region_type == ORT_WORKSHARE) ++ { ++ n = splay_tree_lookup (ctx->variables, (splay_tree_key)decl); ++ if (n != NULL) ++ { ++ gcc_assert (n->value & GOVD_LOCAL); ++ return false; ++ } ++ ctx = ctx->outer_context; ++ } ++ if (ctx == NULL) + return false; ++ + n = splay_tree_lookup (ctx->variables, (splay_tree_key)decl); + if (n == NULL) ++ n = splay_tree_insert (ctx->variables, (splay_tree_key)decl, ++ DECL_CONTEXT (decl) == current_function_decl ++ ? GOVD_SHARED | GOVD_SEEN : 0); ++ if (ctx->region_type == ORT_UNTIED_TASK ++ && (n->value & GOVD_THREADPRIVATE_WARNED) == 0) + { + error ("threadprivate variable %qs used in untied task", + IDENTIFIER_POINTER (DECL_NAME (decl))); + error ("%Henclosing task", &ctx->location); +- splay_tree_insert (ctx->variables, (splay_tree_key)decl, 0); ++ n->value |= GOVD_THREADPRIVATE_WARNED; + } + if (decl2) +- splay_tree_insert (ctx->variables, (splay_tree_key)decl2, 0); ++ splay_tree_insert (ctx->variables, (splay_tree_key)decl2, ++ DECL_CONTEXT (decl2) == current_function_decl ++ ? GOVD_SHARED | GOVD_SEEN : 0); + return false; + } + +@@ -5779,7 +5798,9 @@ gimplify_adjust_omp_clauses_1 (splay_tre + break; + ctx = ctx->outer_context; + } +- if (ctx == NULL) ++ if (ctx == NULL ++ && (DECL_CONTEXT (decl) != current_function_decl ++ || gimplify_omp_ctxp->region_type == ORT_WORKSHARE)) + return 0; + } + code = OMP_CLAUSE_SHARED; +--- gcc/omp-low.c.jj 2010-06-11 11:06:00.913659301 +0200 ++++ gcc/omp-low.c 2010-07-26 10:45:15.866229447 +0200 +@@ -2222,6 +2222,17 @@ lower_rec_input_clauses (tree clauses, g + continue; + break; + case OMP_CLAUSE_SHARED: ++ if (pass == 0 ++ && is_global_var (OMP_CLAUSE_DECL (c)) ++ && (DECL_CONTEXT (OMP_CLAUSE_DECL (c)) ++ == current_function_decl) ++ && is_taskreg_ctx (ctx) ++ && !DECL_IGNORED_P (OMP_CLAUSE_DECL (c))) ++ { ++ new_var = omp_copy_decl_1 (OMP_CLAUSE_DECL (c), ctx); ++ SET_DECL_VALUE_EXPR (new_var, OMP_CLAUSE_DECL (c)); ++ DECL_HAS_VALUE_EXPR_P (new_var) = 1; ++ } + if (maybe_lookup_decl (OMP_CLAUSE_DECL (c), ctx) == NULL) + { + gcc_assert (is_global_var (OMP_CLAUSE_DECL (c))); +--- gcc/testsuite/gcc.dg/gomp/tls-3.c.jj 2010-07-26 10:45:15.868228753 +0200 ++++ gcc/testsuite/gcc.dg/gomp/tls-3.c 2010-07-26 10:45:15.868228753 +0200 +@@ -0,0 +1,21 @@ ++/* { dg-do compile } */ ++/* { dg-require-effective-target tls_native } */ ++ ++int thr; ++#pragma omp threadprivate(thr) ++ ++void ++foo (void) ++{ ++ #pragma omp task untied /* { dg-error "enclosing task" } */ ++ { ++ static int thr2; ++ #pragma omp threadprivate(thr2) ++ static int thr3; ++ #pragma omp threadprivate(thr3) ++ thr++; /* { dg-error "used in untied task" } */ ++ thr2++; /* { dg-error "used in untied task" } */ ++ thr++; ++ thr2++; ++ } ++} diff --git a/import.log b/import.log index 123de75..6aa2e0e 100644 --- a/import.log +++ b/import.log @@ -30,3 +30,4 @@ gcc-4_4_4-9_fc13:F-13:gcc-4.4.4-9.fc13.src.rpm:1277410568 gcc-4_4_4-10_fc13:F-13:gcc-4.4.4-10.fc13.src.rpm:1277882765 gcc-4_4_4-11_fc13:F-13:gcc-4.4.4-11.fc13.src.rpm:1278497746 gcc-4_4_4-12_fc13:F-13:gcc-4.4.4-12.fc13.src.rpm:1279056750 +gcc-4_4_4-13_fc13:F-13:gcc-4.4.4-13.fc13.src.rpm:1280136090 diff --git a/sources b/sources index c79db54..d7d06c7 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz -cde3a182cf99c529597bdc2bf50073c4 gcc-4.4.4-20100713.tar.bz2 +618d68882881c344eb25220955803260 gcc-4.4.4-20100726.tar.bz2 From 0ed39024de315353b572d2e96b43b3ce1170422f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 28 Jul 2010 15:07:01 +0000 Subject: [PATCH 37/38] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- branch | 1 - import.log | 33 --------------------------------- 4 files changed, 55 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 branch delete mode 100644 import.log diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index a72a0ea..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: gcc -# $Id: Makefile,v 1.2 2007/10/15 18:46:35 notting Exp $ -NAME := gcc -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attempt a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/branch b/branch deleted file mode 100644 index baa94ef..0000000 --- a/branch +++ /dev/null @@ -1 +0,0 @@ -F-13 diff --git a/import.log b/import.log deleted file mode 100644 index 6aa2e0e..0000000 --- a/import.log +++ /dev/null @@ -1,33 +0,0 @@ -gcc-4_4_0-0_3:HEAD:gcc-4.4.0-0.3.src.rpm:1232130841 -gcc-4_4_0-5:HEAD:gcc-4.4.0-5.src.rpm:1242291126 -gcc-4_4_2-14_fc13:HEAD:gcc-4.4.2-14.fc13.src.rpm:1259930464 -gcc-4_4_2-20_fc13:HEAD:gcc-4.4.2-20.fc13.src.rpm:1261484502 -gcc-4_4_2-25_fc13:HEAD:gcc-4.4.2-25.fc13.src.rpm:1263487371 -gcc-4_4_3-1_fc13:HEAD:gcc-4.4.3-1.fc13.src.rpm:1264094717 -gcc-4_4_3-4_fc13:HEAD:gcc-4.4.3-4.fc13.src.rpm:1264621537 -gcc-4_4_3-5_fc13:HEAD:gcc-4.4.3-5.fc13.src.rpm:1265659730 -gcc-4_4_3-6_fc13:HEAD:gcc-4.4.3-6.fc13.src.rpm:1265925505 -gcc-4_4_3-7_fc13:F-13:gcc-4.4.3-7.fc13.src.rpm:1266793373 -gcc-4_4_3-8_fc13:F-13:gcc-4.4.3-8.fc13.src.rpm:1267230097 -gcc-4_4_3-9_fc13:F-13:gcc-4.4.3-9.fc13.src.rpm:1268168014 -gcc-4_4_3-10_fc13:F-13:gcc-4.4.3-10.fc13.src.rpm:1268755563 -gcc-4_4_3-11_fc13:F-13:gcc-4.4.3-11.fc13.src.rpm:1269273622 -gcc-4_4_3-12_fc13:F-13:gcc-4.4.3-12.fc13.src.rpm:1269531219 -gcc-4_4_3-13_fc13:F-13:gcc-4.4.3-13.fc13.src.rpm:1269701401 -gcc-4_4_3-14_fc13:F-13:gcc-4.4.3-14.fc13.src.rpm:1270134283 -gcc-4_4_3-15_fc13:F-13:gcc-4.4.3-15.fc13.src.rpm:1270645785 -gcc-4_4_3-16_fc13:F-13:gcc-4.4.3-16.fc13.src.rpm:1270804069 -gcc-4_4_3-18_fc13:F-13:gcc-4.4.3-18.fc13.src.rpm:1271928249 -gcc-4_4_3-19_fc13:F-13:gcc-4.4.3-19.fc13.src.rpm:1272396517 -gcc-4_4_4-1_fc13:F-13:gcc-4.4.4-1.fc13.src.rpm:1272657908 -gcc-4_4_4-2_fc13:F-13:gcc-4.4.4-2.fc13.src.rpm:1272918321 -gcc-4_4_4-3_fc13:F-13:gcc-4.4.4-3.fc13.src.rpm:1273873717 -gcc-4_4_4-4_fc13:F-13:gcc-4.4.4-4.fc13.src.rpm:1274217265 -gcc-4_4_4-5_fc13:F-13:gcc-4.4.4-5.fc13.src.rpm:1274827909 -gcc-4_4_4-7_fc13:F-13:gcc-4.4.4-7.fc13.src.rpm:1275991168 -gcc-4_4_4-8_fc13:F-13:gcc-4.4.4-8.fc13.src.rpm:1276244305 -gcc-4_4_4-9_fc13:F-13:gcc-4.4.4-9.fc13.src.rpm:1277410568 -gcc-4_4_4-10_fc13:F-13:gcc-4.4.4-10.fc13.src.rpm:1277882765 -gcc-4_4_4-11_fc13:F-13:gcc-4.4.4-11.fc13.src.rpm:1278497746 -gcc-4_4_4-12_fc13:F-13:gcc-4.4.4-12.fc13.src.rpm:1279056750 -gcc-4_4_4-13_fc13:F-13:gcc-4.4.4-13.fc13.src.rpm:1280136090 From 5d98d7edaf0b63b2bc270024ca34642a0d26bc37 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 31 Aug 2010 09:22:22 -0500 Subject: [PATCH 38/38] enable cloog support on sparc arches --- gcc.spec | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/gcc.spec b/gcc.spec index f70a521..d67e35d 100644 --- a/gcc.spec +++ b/gcc.spec @@ -3,7 +3,7 @@ %global gcc_version 4.4.4 # Note, gcc_release must be integer, if you want to add suffixes to # %{release}, append them after %{gcc_release} on Release: line. -%global gcc_release 13 +%global gcc_release 14 %global _unpackaged_files_terminate_build 0 %global multilib_64_archs sparc64 ppc64 s390x x86_64 %if 0%{?fedora} >= 13 || 0%{?rhel} >= 6 @@ -17,11 +17,7 @@ %global build_ada 0 %endif %global build_java 1 -%ifarch %{sparc} -%global build_cloog 0 -%else %global build_cloog 1 -%endif %global build_libstdcxx_docs 1 # If you don't have already a usable gcc-java and libgcj for your arch, # do on some arch which has it rpmbuild -bc --with java_tar gcc41.spec @@ -2004,6 +2000,9 @@ fi %endif %changelog +* Tue Aug 31 2010 Dennis Gilmore 4.4.4-14 +- enable cloog on sparc arches + * Mon Jul 26 2010 Jakub Jelinek 4.4.4-13 - update from gcc-4_4-branch - PRs fortran/45019, target/42869, target/44942, testsuite/38946