[gcc] 4.7.0-0.9

Jakub Jelinek jakub at fedoraproject.org
Mon Jan 23 22:24:42 UTC 2012


commit c0579b832a1b153d7c53ebd0fbf82ce6da34006d
Author: Jakub Jelinek <jakub at redhat.com>
Date:   Mon Jan 23 23:24:38 2012 +0100

    4.7.0-0.9

 .gitignore                 |    1 +
 gcc.spec                   |   34 ++++++-
 gcc47-pr46590-revert.patch |   96 ++++++++++++++++++++
 gcc47-pr51856.patch        |   45 ----------
 gcc47-pr51895.patch        |   55 ++++++++++++
 gcc47-pr51957.patch        |  206 ++++++++++++++++++++++++++++++++++++++++++++
 gcc47-pr51968.patch        |   21 +++++
 sources                    |    2 +-
 8 files changed, 409 insertions(+), 51 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 92fa084..5abe4a6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,3 +14,4 @@
 /gcc-4.7.0-20120112.tar.bz2
 /gcc-4.7.0-20120117.tar.bz2
 /gcc-4.7.0-20120119.tar.bz2
+/gcc-4.7.0-20120123.tar.bz2
diff --git a/gcc.spec b/gcc.spec
index 52740ec..9564ca0 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,9 +1,9 @@
-%global DATE 20120119
-%global SVNREV 183308
+%global DATE 20120123
+%global SVNREV 183456
 %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.8
+%global gcc_release 0.9
 %global _unpackaged_files_terminate_build 0
 %global multilib_64_archs sparc64 ppc64 s390x x86_64
 %ifarch %{ix86} x86_64 ia64 ppc ppc64 alpha
@@ -174,7 +174,10 @@ 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-pr51856.patch
+Patch16: gcc47-pr51895.patch
+Patch17: gcc47-pr51957.patch
+Patch18: gcc47-pr46590-revert.patch
+Patch19: gcc47-pr51968.patch
 
 Patch1000: fastjar-0.97-segfault.patch
 Patch1001: fastjar-0.97-len1.patch
@@ -674,7 +677,10 @@ package or when debugging this package.
 %patch14 -p0 -b .ppl-0.10~
 %endif
 %patch15 -p0 -b .libitm-fno-exceptions~
-%patch16 -p0 -b .pr51856~
+%patch16 -p0 -b .pr51895~
+%patch17 -p0 -b .pr51957~
+%patch18 -p0 -b .pr46590-revert~
+%patch19 -p0 -b .pr51968~
 
 %if 0%{?_enable_debug_packages}
 cat > split-debuginfo.sh <<\EOF
@@ -2635,6 +2641,24 @@ fi
 %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/plugin
 
 %changelog
+* Mon Jan 23 2012 Jakub Jelinek <jakub at redhat.com> 4.7.0-0.9
+- update from trunk
+  - PRs ada/46192, c++/51344, c++/51398, c++/51402, c++/51832, c++/51919,
+	c++/51922, debug/45682, fortran/50556, fortran/51056, fortran/51904,
+	fortran/51913, fortran/51948, libgcj/23182, libgfortran/51899,
+	libitm/51830, libstdc++/50982, lto/51916, middle-end/45416,
+	rtl-optimization/40761, rtl-optimization/51924, target/47096,
+	target/49868, target/50313, target/50887, target/51106, target/51819,
+	target/51900, target/51915, target/51931, target/51934,
+	testsuite/51941, tree-optimization/51895, tree-optimization/51903,
+	tree-optimization/51914, tree-optimization/51949
+  - fix REE pass (#783481, PR rtl-optimization/51933)
+  - further overload fixes with using decls (#783586, PR c++/51925)
+- fix ICE during expansion with BLKmode MEM_REF (#782868, PR middle-end/51895)
+- fix ppc64 profiledbootstrap (PR target/51957)
+- revert broken stack layout change (PR tree-optimization/46590)
+- fix ARM ICE on neon insn splitting (PR target/51968)
+
 * Thu Jan 19 2012 Jakub Jelinek <jakub at redhat.com> 4.7.0-0.8
 - update from trunk
   - PRs bootstrap/50237, c++/51225, c++/51889, fortran/48426, fortran/51634,
diff --git a/gcc47-pr46590-revert.patch b/gcc47-pr46590-revert.patch
new file mode 100644
index 0000000..3ff8841
--- /dev/null
+++ b/gcc47-pr46590-revert.patch
@@ -0,0 +1,96 @@
+Revert:
+2012-01-19  Michael Matz  <matz at suse.de>
+
+	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
new file mode 100644
index 0000000..4cf7a0c
--- /dev/null
+++ b/gcc47-pr51895.patch
@@ -0,0 +1,55 @@
+2012-01-19  Jakub Jelinek  <jakub at redhat.com>
+
+	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-pr51957.patch b/gcc47-pr51957.patch
new file mode 100644
index 0000000..e36de40
--- /dev/null
+++ b/gcc47-pr51957.patch
@@ -0,0 +1,206 @@
+2012-01-23  Jakub Jelinek  <jakub at redhat.com>
+
+	PR target/51957
+	* target.def (const_not_ok_for_debug_p): New hook.
+	* doc/tm.texi.in (TARGET_CONST_NOT_OK_FOR_DEBUG_P): New hook
+	documentation.
+	* doc/tm.texi: Regenerated.
+	* dwarf2out.c (const_ok_for_output_1): If
+	targetm.const_not_ok_for_debug_p returns true, fail.
+	* config/rs6000/rs6000.c (rs6000_const_not_ok_for_debug_p): New
+	function.
+	(TARGET_CONST_NOT_OK_FOR_DEBUG_P): Redefine.
+
+	* gcc.dg/pr51957-1.c: New test.
+	* gcc.dg/pr51957-1.h: New file.
+	* gcc.dg/pr51957-2.c: New test.
+
+--- gcc/target.def.jj	2012-01-20 12:35:16.000000000 +0100
++++ gcc/target.def	2012-01-23 13:14:52.601638343 +0100
+@@ -1382,6 +1382,14 @@ DEFHOOK
+  rtx, (rtx x),
+  delegitimize_mem_from_attrs)
+ 
++/* Given an RTX, return true if it is not ok to emit it into debug info
++   section.  */
++DEFHOOK
++(const_not_ok_for_debug_p,
++ "",
++ bool, (rtx x),
++ hook_bool_rtx_false)
++
+ /* Given an address RTX, say whether it is valid.  */
+ DEFHOOK
+ (legitimate_address_p,
+--- gcc/doc/tm.texi.in.jj	2012-01-20 12:35:10.000000000 +0100
++++ gcc/doc/tm.texi.in	2012-01-23 13:27:19.544241676 +0100
+@@ -5567,6 +5567,11 @@ the semantics of these opaque @code{UNSP
+ into their original form.
+ @end deftypefn
+ 
++ at hook TARGET_CONST_NOT_OK_FOR_DEBUG_P
++This hook should return true if @var{x} should not be emitted into
++debug sections.
++ at end deftypefn
++
+ @hook TARGET_CANNOT_FORCE_CONST_MEM
+ This hook should return true if @var{x} is of a form that cannot (or
+ should not) be spilled to the constant pool.  @var{mode} is the mode
+--- gcc/doc/tm.texi.jj	2012-01-20 12:35:10.000000000 +0100
++++ gcc/doc/tm.texi	2012-01-23 13:27:33.000000000 +0100
+@@ -5631,6 +5631,11 @@ the semantics of these opaque @code{UNSP
+ into their original form.
+ @end deftypefn
+ 
++ at deftypefn {Target Hook} bool TARGET_CONST_NOT_OK_FOR_DEBUG_P (rtx @var{x})
++This hook should return true if @var{x} should not be emitted into
++debug sections.
++ at end deftypefn
++
+ @deftypefn {Target Hook} bool TARGET_CANNOT_FORCE_CONST_MEM (enum machine_mode @var{mode}, rtx @var{x})
+ This hook should return true if @var{x} is of a form that cannot (or
+ should not) be spilled to the constant pool.  @var{mode} is the mode
+--- gcc/dwarf2out.c.jj	2012-01-22 16:02:10.000000000 +0100
++++ gcc/dwarf2out.c	2012-01-23 13:58:09.887380014 +0100
+@@ -10683,6 +10683,13 @@ const_ok_for_output_1 (rtx *rtlp, void *
+       return 1;
+     }
+ 
++  if (targetm.const_not_ok_for_debug_p (rtl))
++    {
++      expansion_failed (NULL_TREE, rtl,
++			"Expression rejected for debug by the backend.\n");
++      return 1;
++    }
++
+   if (GET_CODE (rtl) != SYMBOL_REF)
+     return 0;
+ 
+--- gcc/config/rs6000/rs6000.c.jj	2012-01-22 16:02:10.000000000 +0100
++++ gcc/config/rs6000/rs6000.c	2012-01-23 13:25:05.092031129 +0100
+@@ -1106,6 +1106,7 @@ static rtx rs6000_debug_legitimize_addre
+ static rtx rs6000_legitimize_tls_address (rtx, enum tls_model);
+ static void rs6000_output_dwarf_dtprel (FILE *, int, rtx) ATTRIBUTE_UNUSED;
+ static rtx rs6000_delegitimize_address (rtx);
++static bool rs6000_const_not_ok_for_debug_p (rtx);
+ static rtx rs6000_tls_get_addr (void);
+ static rtx rs6000_got_sym (void);
+ static int rs6000_tls_symbol_ref_1 (rtx *, void *);
+@@ -1405,6 +1406,9 @@ static const struct attribute_spec rs600
+ #undef TARGET_DELEGITIMIZE_ADDRESS
+ #define TARGET_DELEGITIMIZE_ADDRESS rs6000_delegitimize_address
+ 
++#undef TARGET_CONST_NOT_OK_FOR_DEBUG_P
++#define TARGET_CONST_NOT_OK_FOR_DEBUG_P rs6000_const_not_ok_for_debug_p
++
+ #undef TARGET_ASM_FUNCTION_PROLOGUE
+ #define TARGET_ASM_FUNCTION_PROLOGUE rs6000_output_function_prologue
+ #undef TARGET_ASM_FUNCTION_EPILOGUE
+@@ -5815,6 +5819,25 @@ rs6000_delegitimize_address (rtx orig_x)
+   return orig_x;
+ }
+ 
++/* Return true if X shouldn't be emitted into the debug info.
++   The linker doesn't like .toc section references from
++   .debug_* sections, so reject .toc section symbols.  */
++
++static bool
++rs6000_const_not_ok_for_debug_p (rtx x)
++{
++  if (GET_CODE (x) == SYMBOL_REF
++      && CONSTANT_POOL_ADDRESS_P (x))
++    {
++      rtx c = get_pool_constant (x);
++      enum machine_mode cmode = get_pool_mode (x);
++      if (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P (c, cmode))
++	return true;
++    }
++
++  return false;
++}
++
+ /* Construct the SYMBOL_REF for the tls_get_addr function.  */
+ 
+ static GTY(()) rtx rs6000_tls_symbol;
+--- gcc/testsuite/gcc.dg/pr51957-1.c.jj	2012-01-23 14:06:45.024357678 +0100
++++ gcc/testsuite/gcc.dg/pr51957-1.c	2012-01-23 14:12:02.895492825 +0100
+@@ -0,0 +1,29 @@
++/* PR target/51957 */
++/* { dg-do link } */
++/* { dg-options "-O2 -g -fprofile-use" } */
++/* { dg-additional-sources "pr51957-2.c" } */
++
++int v[128];
++#include "pr51957-1.h"
++
++void
++foo (U *x)
++{
++  T *a = x->u;
++  while (1)
++    {
++      union R *b;
++      b = fn1 ();
++      if (b != w[0] && !(v[b->p->c] == 1))
++	{
++	  fn2 (a->t, "foobar", b->p);
++	  b = w[0];
++	}
++      if (b != w[0])
++	fn3 ();
++      if (w[0] && b != w[0])
++	fn4 (b->p);
++      if (b != w[0] && (v[b->p->c] == 1) && fn4 (b->p))
++	break;
++    }
++}
+--- gcc/testsuite/gcc.dg/pr51957-1.h.jj	2012-01-23 14:06:56.491290757 +0100
++++ gcc/testsuite/gcc.dg/pr51957-1.h	2012-01-23 14:07:35.243060438 +0100
+@@ -0,0 +1,9 @@
++union R { int c; union R *p; };
++extern union R *w[];
++typedef struct { int t; } T;
++typedef struct { void *u; } U;
++union R *fn1 (void);
++void fn2 (int, const char *, union R *);
++void fn3 (void);
++int fn4 (union R *);
++void foo (U *x);
+--- gcc/testsuite/gcc.dg/pr51957-2.c.jj	2012-01-23 14:10:59.840862700 +0100
++++ gcc/testsuite/gcc.dg/pr51957-2.c	2012-01-23 14:10:52.870904033 +0100
+@@ -0,0 +1,35 @@
++/* PR target/51957 */
++/* { dg-do compile } */
++/* { dg-options "-O0" } */
++
++#include "pr51957-1.h"
++
++union R *w[10];
++
++union R *
++fn1 (void)
++{
++  return (union R *) 0;
++}
++
++void
++fn2 (int x, const char *y, union R *z)
++{
++}
++
++void
++fn3 (void)
++{
++}
++
++int
++fn4 (union R *x)
++{
++  return 0;
++}
++
++int
++main ()
++{
++  return 0;
++}
diff --git a/gcc47-pr51968.patch b/gcc47-pr51968.patch
new file mode 100644
index 0000000..c6f4c1d
--- /dev/null
+++ b/gcc47-pr51968.patch
@@ -0,0 +1,21 @@
+2012-01-23  Richard Henderson  <rth at redhat.com>
+
+	PR target/51968
+	* config/arm/arm.c (neon_split_vcombine): Split into
+	NOTE_INSN_DELETED instead of nothing.
+
+--- gcc/config/arm/arm.c
++++ gcc/config/arm/arm.c
+@@ -20928,7 +20928,11 @@ neon_split_vcombine (rtx operands[3])
+   rtx destlo, desthi;
+ 
+   if (src1 == dest && src2 == dest + halfregs)
+-    return;
++    {
++      /* No-op move.  Can't split to nothing; emit something.  */
++      emit_note (NOTE_INSN_DELETED);
++      return;
++    }
+ 
+   /* Preserve register attributes for variable tracking.  */
+   destlo = gen_rtx_REG_offset (operands[0], halfmode, dest, 0);
diff --git a/sources b/sources
index 86ce8b4..db935a4 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
 2659f09c2e43ef8b7d4406321753f1b2  fastjar-0.97.tar.gz
-9aa7323402e9680079c3f1d16bdc595f  gcc-4.7.0-20120119.tar.bz2
+c616ff4d911b6888dedf1d49df177e73  gcc-4.7.0-20120123.tar.bz2


More information about the scm-commits mailing list