diff --git a/.gitignore b/.gitignore index c85b456..26d679f 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ /gcc-4.7.0-20120119.tar.bz2 /gcc-4.7.0-20120123.tar.bz2 /gcc-4.7.0-20120126.tar.bz2 +/gcc-4.7.0-20120206.tar.bz2 diff --git a/gcc.spec b/gcc.spec index 0150c7b..fc7e476 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,9 +1,9 @@ -%global DATE 20120126 -%global SVNREV 183558 +%global DATE 20120206 +%global SVNREV 183946 %global gcc_version 4.7.0 # 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 0.10 +%global gcc_release 0.11 %global _unpackaged_files_terminate_build 0 %global multilib_64_archs sparc64 ppc64 s390x x86_64 %ifarch %{ix86} x86_64 ia64 ppc ppc64 alpha @@ -174,9 +174,9 @@ Patch12: gcc47-libstdc++-docs.patch Patch13: gcc47-no-add-needed.patch Patch14: gcc47-ppl-0.10.patch Patch15: gcc47-libitm-fno-exceptions.patch -Patch16: gcc47-pr51895.patch -Patch17: gcc47-pr46590-revert.patch -Patch18: gcc47-pr52006.patch +Patch16: gcc47-pr51950.patch +Patch17: gcc47-pr52060.patch +Patch18: gcc47-pr52132.patch Patch1000: fastjar-0.97-segfault.patch Patch1001: fastjar-0.97-len1.patch @@ -496,6 +496,8 @@ The Java(tm) runtime library sources for use in Eclipse. %package -n cpp Summary: The C Preprocessor Group: Development/Languages +Requires: filesystem >= 3 +Provides: /lib/cpp Requires(post): /sbin/install-info Requires(preun): /sbin/install-info Autoreq: true @@ -676,9 +678,9 @@ package or when debugging this package. %patch14 -p0 -b .ppl-0.10~ %endif %patch15 -p0 -b .libitm-fno-exceptions~ -%patch16 -p0 -b .pr51895~ -%patch17 -p0 -b .pr46590-revert~ -%patch18 -p0 -b .pr52006~ +%patch16 -p0 -b .pr51950~ +%patch17 -p0 -b .pr52060~ +%patch18 -p0 -b .pr52132~ %if 0%{?_enable_debug_packages} cat > split-debuginfo.sh <<\EOF @@ -1071,8 +1073,8 @@ FULLEPATH=%{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_versio # fix some things ln -sf gcc %{buildroot}%{_prefix}/bin/cc -mkdir -p %{buildroot}/lib -ln -sf ..%{_prefix}/bin/cpp %{buildroot}/lib/cpp +rm -f %{buildroot}%{_prefix}/lib/cpp +ln -sf ../bin/cpp %{buildroot}/%{_prefix}/lib/cpp ln -sf gfortran %{buildroot}%{_prefix}/bin/f95 rm -f %{buildroot}%{_infodir}/dir gzip -9 %{buildroot}%{_infodir}/*.info* @@ -1857,7 +1859,6 @@ fi %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/lto1 %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/lto-wrapper -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/liblto_plugin.so* %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/rpmver %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/stddef.h %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/stdarg.h @@ -2002,7 +2003,7 @@ fi %files -n cpp -f cpplib.lang %defattr(-,root,root,-) -/lib/cpp +%{_prefix}/lib/cpp %{_prefix}/bin/cpp %{_mandir}/man1/cpp.1* %{_infodir}/cpp* @@ -2010,6 +2011,7 @@ fi %dir %{_prefix}/libexec/gcc/%{gcc_target_platform} %dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cc1 +%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/liblto_plugin.so* %files -n libgcc %defattr(-,root,root,-) @@ -2639,6 +2641,42 @@ fi %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/plugin %changelog +* Mon Feb 6 2012 Jakub Jelinek 4.7.0-0.11 +- update from trunk + - PRs bootstrap/52039, bootstrap/52041, bootstrap/52058, c++/48680, + c++/51327, c++/51370, c++/51852, c++/52043, c++/52088, c/52118, + debug/52001, debug/52027, debug/52048, fortran/32373, fortran/41587, + fortran/41600, fortran/46356, fortran/48705, fortran/48847, + fortran/51754, fortran/51808, fortran/51870, fortran/51943, + fortran/51946, fortran/51953, fortran/51958, fortran/51970, + fortran/51972, fortran/51977, fortran/52012, fortran/52013, + fortran/52016, fortran/52022, fortran/52024, fortran/52029, + fortran/52038, fortran/52093, fortran/52102, go/47656, go/48501, + libitm/51822, libjava/48512, libstdc++/49445, libstdc++/51649, + libstdc++/51795, libstdc++/51798, libstdc++/51811, libstdc++/51956, + libstdc++/52068, libstdc++/52104, libstdc++/52119, libstdc++/52128, + middle-end/43967, middle-end/47982, middle-end/48071, + middle-end/51389, middle-end/51959, middle-end/51998, + middle-end/52047, rtl-optimization/49800, rtl-optimization/51374, + rtl-optimization/51978, rtl-optimization/52092, + rtl-optimization/52095, rtl-optimization/52113, target/51500, + target/51835, target/51871, target/51920, target/51974, target/52079, + target/52107, target/52125, target/52129, testsuite/51875, + testsuite/52011, tree-optimization/48794, tree-optimization/50444, + tree-optimization/50955, tree-optimization/50969, + tree-optimization/51528, tree-optimization/51990, + tree-optimization/52020, tree-optimization/52028, + tree-optimization/52045, tree-optimization/52046, + tree-optimization/52073, tree-optimization/52091, + tree-optimization/52115 + - fix i?86 mem += reg; mem cmp 0 8-bit peephole2 (#786570, PR target/52086) + - fix fortran ICE on elemental call (#785433, PR fortran/52059) +- fix up /lib/cpp symlink for UsrMove (#787460) +- move LTO plugin into cpp subpackage (#787345) +- fix debug ICE with i387 reg-stack (#787518, PR debug/52132) +- fix ARM combine bug (PR rtl-optimization/52060) +- fix a DWARF4 .debug_types DIE cloning bug (PR debug/51950) + * Thu Jan 26 2012 Jakub Jelinek 4.7.0-0.10 - update from trunk - PRs bootstrap/51985, c++/51223, c++/51812, c++/51917, c++/51928, diff --git a/gcc47-pr46590-revert.patch b/gcc47-pr46590-revert.patch deleted file mode 100644 index 3ff8841..0000000 --- a/gcc47-pr46590-revert.patch +++ /dev/null @@ -1,96 +0,0 @@ -Revert: -2012-01-19 Michael Matz - - PR tree-optimization/46590 - * cfgexpand.c (add_scope_conflicts_1): New old_conflicts argument, - use it in remembering which conflicts we already created. - (add_scope_conflicts): Adjust call to above, (de)allocate helper - bitmap. - ---- gcc/cfgexpand.c (revision 183305) -+++ gcc/cfgexpand.c (revision 183304) -@@ -441,12 +441,11 @@ visit_conflict (gimple stmt ATTRIBUTE_UN - - /* Helper routine for add_scope_conflicts, calculating the active partitions - at the end of BB, leaving the result in WORK. We're called to generate -- conflicts when OLD_CONFLICTS is non-null, otherwise we're just tracking -- liveness. If we generate conflicts then OLD_CONFLICTS stores the bits -- for which we generated conflicts already. */ -+ conflicts when FOR_CONFLICT is true, otherwise we're just tracking -+ liveness. */ - - static void --add_scope_conflicts_1 (basic_block bb, bitmap work, bitmap old_conflicts) -+add_scope_conflicts_1 (basic_block bb, bitmap work, bool for_conflict) - { - edge e; - edge_iterator ei; -@@ -483,7 +482,7 @@ add_scope_conflicts_1 (basic_block bb, b - } - else if (!is_gimple_debug (stmt)) - { -- if (old_conflicts -+ if (for_conflict - && visit == visit_op) - { - /* If this is the first real instruction in this BB we need -@@ -491,27 +490,16 @@ add_scope_conflicts_1 (basic_block bb, b - Unlike classical liveness for named objects we can't - rely on seeing a def/use of the names we're interested in. - There might merely be indirect loads/stores. We'd not add any -- conflicts for such partitions. We know that we generated -- conflicts between all partitions in old_conflicts already, -- so we need to generate only the new ones, avoiding to -- repeatedly pay the O(N^2) cost for each basic block. */ -+ conflicts for such partitions. */ - bitmap_iterator bi; - unsigned i; -- -- EXECUTE_IF_AND_COMPL_IN_BITMAP (work, old_conflicts, 0, i, bi) -+ EXECUTE_IF_SET_IN_BITMAP (work, 0, i, bi) - { - unsigned j; - bitmap_iterator bj; -- /* First the conflicts between new and old_conflicts. */ -- EXECUTE_IF_SET_IN_BITMAP (old_conflicts, 0, j, bj) -- add_stack_var_conflict (i, j); -- /* Then the conflicts between only the new members. */ -- EXECUTE_IF_AND_COMPL_IN_BITMAP (work, old_conflicts, i + 1, -- j, bj) -+ EXECUTE_IF_SET_IN_BITMAP (work, i + 1, j, bj) - add_stack_var_conflict (i, j); - } -- /* And remember for the next basic block. */ -- bitmap_ior_into (old_conflicts, work); - visit = visit_conflict; - } - walk_stmt_load_store_addr_ops (stmt, work, visit, visit, visit); -@@ -528,7 +516,6 @@ add_scope_conflicts (void) - basic_block bb; - bool changed; - bitmap work = BITMAP_ALLOC (NULL); -- bitmap old_conflicts; - - /* We approximate the live range of a stack variable by taking the first - mention of its name as starting point(s), and by the end-of-scope -@@ -550,18 +537,15 @@ add_scope_conflicts (void) - FOR_EACH_BB (bb) - { - bitmap active = (bitmap)bb->aux; -- add_scope_conflicts_1 (bb, work, NULL); -+ add_scope_conflicts_1 (bb, work, false); - if (bitmap_ior_into (active, work)) - changed = true; - } - } - -- old_conflicts = BITMAP_ALLOC (NULL); -- - FOR_EACH_BB (bb) -- add_scope_conflicts_1 (bb, work, old_conflicts); -+ add_scope_conflicts_1 (bb, work, true); - -- BITMAP_FREE (old_conflicts); - BITMAP_FREE (work); - FOR_ALL_BB (bb) - BITMAP_FREE (bb->aux); diff --git a/gcc47-pr51895.patch b/gcc47-pr51895.patch deleted file mode 100644 index 4cf7a0c..0000000 --- a/gcc47-pr51895.patch +++ /dev/null @@ -1,55 +0,0 @@ -2012-01-19 Jakub Jelinek - - PR middle-end/51895 - * expr.c (expand_expr_real_1): Handle BLKmode MEM_REF of - non-addressable non-BLKmode base correctly. - - * g++.dg/opt/pr51895.C: New test. - ---- gcc/expr.c.jj 2012-01-13 21:47:35.000000000 +0100 -+++ gcc/expr.c 2012-01-19 13:12:14.218760812 +0100 -@@ -9328,6 +9328,16 @@ expand_expr_real_1 (tree exp, rtx target - bftype = TREE_TYPE (base); - if (TYPE_MODE (TREE_TYPE (exp)) != BLKmode) - bftype = TREE_TYPE (exp); -+ else -+ { -+ temp = assign_stack_temp (DECL_MODE (base), -+ GET_MODE_SIZE (DECL_MODE (base)), -+ 0); -+ store_expr (base, temp, 0, false); -+ temp = adjust_address (temp, BLKmode, offset); -+ set_mem_size (temp, int_size_in_bytes (TREE_TYPE (exp))); -+ return temp; -+ } - return expand_expr (build3 (BIT_FIELD_REF, bftype, - base, - TYPE_SIZE (TREE_TYPE (exp)), ---- gcc/testsuite/g++.dg/opt/pr51895.C.jj 2012-01-19 13:20:27.808899825 +0100 -+++ gcc/testsuite/g++.dg/opt/pr51895.C 2012-01-19 13:21:10.042655293 +0100 -@@ -0,0 +1,25 @@ -+// PR middle-end/51895 -+// { dg-do compile } -+// { dg-options "-O2" } -+ -+struct S -+{ -+ long a; -+ char b; -+ S () : a (0), b (0) {} -+ bool baz (); -+}; -+ -+__attribute__((noinline)) static bool -+bar (S x, S y) -+{ -+ y = x; -+ return y.baz (); -+} -+ -+bool -+foo (S x) -+{ -+ S y; -+ return bar (x, y); -+} diff --git a/gcc47-pr51950.patch b/gcc47-pr51950.patch new file mode 100644 index 0000000..b898a49 --- /dev/null +++ b/gcc47-pr51950.patch @@ -0,0 +1,54 @@ +2012-01-25 Jakub Jelinek + + PR debug/51950 + * dwarf2out.c (clone_tree_hash): New function. + (copy_decls_walk): Use it instead of clone_tree. + +--- gcc/dwarf2out.c.jj 2012-01-23 18:23:45.000000000 +0100 ++++ gcc/dwarf2out.c 2012-01-25 18:32:24.026350399 +0100 +@@ -7406,6 +7406,32 @@ copy_ancestor_tree (dw_die_ref unit, dw_ + return copy; + } + ++/* Like clone_tree, but additionally enter all the children into ++ the hash table decl_table. */ ++ ++static dw_die_ref ++clone_tree_hash (dw_die_ref die, htab_t decl_table) ++{ ++ dw_die_ref c; ++ dw_die_ref clone = clone_die (die); ++ struct decl_table_entry *entry; ++ void **slot = htab_find_slot_with_hash (decl_table, die, ++ htab_hash_pointer (die), INSERT); ++ /* Assert that DIE isn't in the hash table yet. If it would be there ++ before, the ancestors would be necessarily there as well, therefore ++ clone_tree_hash wouldn't be called. */ ++ gcc_assert (*slot == HTAB_EMPTY_ENTRY); ++ entry = XCNEW (struct decl_table_entry); ++ entry->orig = die; ++ entry->copy = clone; ++ *slot = entry; ++ ++ FOR_EACH_CHILD (die, c, ++ add_child_die (clone, clone_tree_hash (c, decl_table))); ++ ++ return clone; ++} ++ + /* Walk the DIE and its children, looking for references to incomplete + or trivial types that are unmarked (i.e., that are not in the current + type_unit). */ +@@ -7442,7 +7468,11 @@ copy_decls_walk (dw_die_ref unit, dw_die + else + { + dw_die_ref parent = unit; +- dw_die_ref copy = clone_tree (targ); ++ dw_die_ref copy = clone_die (targ); ++ ++ FOR_EACH_CHILD (targ, c, ++ add_child_die (copy, ++ clone_tree_hash (c, decl_table))); + + /* Make sure the cloned tree is marked as part of the + type unit. */ diff --git a/gcc47-pr52006.patch b/gcc47-pr52006.patch deleted file mode 100644 index 67a0e5c..0000000 --- a/gcc47-pr52006.patch +++ /dev/null @@ -1,43 +0,0 @@ -2012-01-26 Jakub Jelinek - - PR target/52006 - * config/arm/arm.md (pic_add_dot_plus_eight peephole2): Use - arm_general_register_operand predicate for operand 2 instead of - register_operand. - - * gcc.target/arm/pr52006.c: New test. - ---- gcc/config/arm/arm.md.jj 2012-01-20 12:35:15.000000000 +0100 -+++ gcc/config/arm/arm.md 2012-01-26 10:24:13.082570508 +0100 -@@ -5719,7 +5719,8 @@ (define_peephole2 - (const_int 8) - (match_operand 1 "" "")] - UNSPEC_PIC_BASE)) -- (set (match_operand:SI 2 "register_operand" "") (mem:SI (match_dup 0)))] -+ (set (match_operand:SI 2 "arm_general_register_operand" "") -+ (mem:SI (match_dup 0)))] - "TARGET_ARM && peep2_reg_dead_p (2, operands[0])" - [(set (match_dup 2) - (mem:SI (unspec:SI [(match_dup 3) ---- gcc/testsuite/gcc.target/arm/pr52006.c.jj 2012-01-26 10:32:27.989658669 +0100 -+++ gcc/testsuite/gcc.target/arm/pr52006.c 2012-01-26 10:32:34.626620068 +0100 -@@ -0,0 +1,19 @@ -+/* PR target/52006 */ -+/* { dg-do compile } */ -+/* { dg-options "-march=armv7-a -mfloat-abi=hard -O2 -fPIC" } */ -+ -+unsigned long a; -+static int b; -+ -+void -+foo (void) -+{ -+ asm volatile ("" : "=r" (b)); -+} -+ -+void -+bar (float f) -+{ -+ if (f < b / 100.0) -+ a = 1; -+} diff --git a/gcc47-pr52060.patch b/gcc47-pr52060.patch new file mode 100644 index 0000000..179dfe1 --- /dev/null +++ b/gcc47-pr52060.patch @@ -0,0 +1,132 @@ +2012-02-06 Jakub Jelinek + + PR rtl-optimization/52060 + * combine.c (try_combine): Add i0src_copy and i0src_copy2 variables, + copy i1src to i1src_copy whenever added_sets_2 && i1_feeds_i2_n already + before i1dest -> i1src substitution in newpat, copy i0src to i0src_copy + and/or i0src_copy2 when needed. + + * gcc.dg/torture/pr52060.c: New test. + +--- gcc/combine.c.jj 2012-02-03 13:31:41.000000000 +0100 ++++ gcc/combine.c 2012-02-06 17:49:40.000000000 +0100 +@@ -2591,8 +2591,8 @@ try_combine (rtx i3, rtx i2, rtx i1, rtx + rtx i3dest_killed = 0; + /* SET_DEST and SET_SRC of I2, I1 and I0. */ + rtx i2dest = 0, i2src = 0, i1dest = 0, i1src = 0, i0dest = 0, i0src = 0; +- /* Copy of SET_SRC of I1, if needed. */ +- rtx i1src_copy = 0; ++ /* Copy of SET_SRC of I1 and I0, if needed. */ ++ rtx i1src_copy = 0, i0src_copy = 0, i0src_copy2 = 0; + /* Set if I2DEST was reused as a scratch register. */ + bool i2scratch = false; + /* The PATTERNs of I0, I1, and I2, or a copy of them in certain cases. */ +@@ -3246,6 +3246,11 @@ try_combine (rtx i3, rtx i2, rtx i1, rtx + n_occurrences = 0; + subst_low_luid = DF_INSN_LUID (i1); + ++ /* If the following substitution will modify I1SRC, make a copy of it ++ for the case where it is substituted for I1DEST in I2PAT later. */ ++ if (added_sets_2 && i1_feeds_i2_n) ++ i1src_copy = copy_rtx (i1src); ++ + /* If I0 feeds into I1 and I0DEST is in I0SRC, we need to make a unique + copy of I1SRC each time we substitute it, in order to avoid creating + self-referential RTL when we will be substituting I0SRC for I0DEST +@@ -3273,10 +3278,14 @@ try_combine (rtx i3, rtx i2, rtx i1, rtx + return 0; + } + +- /* If the following substitution will modify I1SRC, make a copy of it +- for the case where it is substituted for I1DEST in I2PAT later. */ +- if (i0_feeds_i1_n && added_sets_2 && i1_feeds_i2_n) +- i1src_copy = copy_rtx (i1src); ++ /* If the following substitution will modify I0SRC, make a copy of it ++ for the case where it is substituted for I0DEST in I1PAT later. */ ++ if (added_sets_1 && i0_feeds_i1_n) ++ i0src_copy = copy_rtx (i0src); ++ /* And a copy for I0DEST in I2PAT substitution. */ ++ if (added_sets_2 && ((i0_feeds_i1_n && i1_feeds_i2_n) ++ || (i0_feeds_i2_n))) ++ i0src_copy2 = copy_rtx (i0src); + + n_occurrences = 0; + subst_low_luid = DF_INSN_LUID (i0); +@@ -3342,7 +3351,7 @@ try_combine (rtx i3, rtx i2, rtx i1, rtx + { + rtx t = i1pat; + if (i0_feeds_i1_n) +- t = subst (t, i0dest, i0src, 0, 0, 0); ++ t = subst (t, i0dest, i0src_copy ? i0src_copy : i0src, 0, 0, 0); + + XVECEXP (newpat, 0, --total_sets) = t; + } +@@ -3353,7 +3362,7 @@ try_combine (rtx i3, rtx i2, rtx i1, rtx + t = subst (t, i1dest, i1src_copy ? i1src_copy : i1src, 0, 0, + i0_feeds_i1_n && i0dest_in_i0src); + if ((i0_feeds_i1_n && i1_feeds_i2_n) || i0_feeds_i2_n) +- t = subst (t, i0dest, i0src, 0, 0, 0); ++ t = subst (t, i0dest, i0src_copy2 ? i0src_copy2 : i0src, 0, 0, 0); + + XVECEXP (newpat, 0, --total_sets) = t; + } +--- gcc/testsuite/gcc.dg/torture/pr52060.c.jj 2012-02-06 18:35:51.215511107 +0100 ++++ gcc/testsuite/gcc.dg/torture/pr52060.c 2012-02-06 18:34:18.000000000 +0100 +@@ -0,0 +1,57 @@ ++/* PR rtl-optimization/52060 */ ++/* { dg-do run { target int32plus } } */ ++ ++extern void abort (void); ++union U { float f; unsigned int i; }; ++ ++static inline __attribute__((always_inline)) unsigned int ++foo (float x) ++{ ++ union U u; ++ unsigned int a, b, c; ++ int d; ++ int e; ++ u.f = x; ++ d = ((unsigned) u.i >> 23) & 0xFF; ++ c = d < 126 ? 0 : ~0; ++ e = 127 + 30 - d; ++ a = (u.i << 8) | 0x80000000U; ++ b = a & ((1 << e) - 1); ++ a = a >> e; ++ c &= (b | (a & 2)) ? ~0 : ~1; ++ a = ((a + 1U) >> 1) & c; ++ return a; ++} ++ ++__attribute__((noinline)) unsigned int ++bar (float x) ++{ ++ unsigned int a, b, c; ++ static const unsigned int d[128] = ++ { ++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ++ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ++ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ++ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ++ 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 6, 7 ++ }; ++ a = foo (1048575.0f * x); ++ c = d[a >> 13]; ++ b = (c << 13) | ((a >> (7 - c)) & 0x1fff); ++ return b; ++} ++ ++int ++main () ++{ ++ union U u; ++ u.f = 1048575.0f; ++ if (sizeof (u.i) == sizeof (u.f) ++ && u.i == 0x497ffff0U ++ && bar (1.0f) != 65535) ++ abort (); ++ return 0; ++} diff --git a/gcc47-pr52132.patch b/gcc47-pr52132.patch new file mode 100644 index 0000000..61070cc --- /dev/null +++ b/gcc47-pr52132.patch @@ -0,0 +1,47 @@ +2012-02-06 Jakub Jelinek + + PR debug/52132 + * reg-stack.c (subst_stack_regs_in_debug_insn): Don't use + get_true_reg. + + * gcc.dg/pr52132.c: New test. + +--- gcc/reg-stack.c.jj 2011-12-01 11:45:06.000000000 +0100 ++++ gcc/reg-stack.c 2012-02-06 11:13:28.777795938 +0100 +@@ -1323,14 +1323,10 @@ compare_for_stack_reg (rtx insn, stack r + static int + subst_stack_regs_in_debug_insn (rtx *loc, void *data) + { +- rtx *tloc = get_true_reg (loc); + stack regstack = (stack)data; + int hard_regno; + +- if (!STACK_REG_P (*tloc)) +- return 0; +- +- if (tloc != loc) ++ if (!STACK_REG_P (*loc)) + return 0; + + hard_regno = get_hard_regnum (regstack, *loc); +--- gcc/testsuite/gcc.dg/pr52132.c.jj 2012-02-06 11:14:23.572547529 +0100 ++++ gcc/testsuite/gcc.dg/pr52132.c 2012-02-06 11:14:46.656442861 +0100 +@@ -0,0 +1,18 @@ ++/* PR debug/52132 */ ++/* { dg-do compile } */ ++/* { dg-options "-std=c99 -O2 -g" } */ ++ ++int l; ++void bar (void); ++ ++void ++foo (int *x, float y) ++{ ++ float b; ++ union { float f; int i; } u = { .f = y }; ++ u.i += 127 << 23; ++ u.f = ((-1.0f / 3) * u.f + 2) * u.f - 2.0f / 3; ++ b = 0.5 * (u.f + l); ++ if (b >= *x) ++ bar (); ++} diff --git a/sources b/sources index 4227672..91639e8 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz -d96c83882dc395b8465feb9f86ba999d gcc-4.7.0-20120126.tar.bz2 +1007011c629089b6cb283d2dd77e847b gcc-4.7.0-20120206.tar.bz2