rpms/gcc/devel gcc41-pr27266.patch, NONE, 1.1 gcc41-pr30143.patch, NONE, 1.1 gcc41-pr30230.patch, NONE, 1.1 gcc41-pr30262.patch, NONE, 1.1 .cvsignore, 1.187, 1.188 gcc41.spec, 1.130, 1.131 sources, 1.189, 1.190 gcc41-pr30185.patch, 1.1, NONE

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Wed Dec 20 18:56:43 UTC 2006


Author: jakub

Update of /cvs/dist/rpms/gcc/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv16827

Modified Files:
	.cvsignore gcc41.spec sources 
Added Files:
	gcc41-pr27266.patch gcc41-pr30143.patch gcc41-pr30230.patch 
	gcc41-pr30262.patch 
Removed Files:
	gcc41-pr30185.patch 
Log Message:
4.1.1-48

gcc41-pr27266.patch:
 0 files changed

--- NEW FILE gcc41-pr27266.patch ---
2006-05-22  Kazu Hirata  <kazu at codesourcery.com>

	PR target/27266
	* config/i386/i386.c (ix86_expand_branch): Jump to simple if
	ix86_compare_emitted is non-NULL.

	* gcc.target/i386/pr27266.c: New.

--- gcc/config/i386/i386.c	(revision 113986)
+++ gcc/config/i386/i386.c	(revision 113987)
@@ -10175,6 +10175,12 @@ ix86_expand_branch (enum rtx_code code, 
 {
   rtx tmp;
 
+  /* If we have emitted a compare insn, go straight to simple.
+     ix86_expand_compare won't emit anything if ix86_compare_emitted
+     is non NULL.  */
+  if (ix86_compare_emitted)
+    goto simple;
+
   switch (GET_MODE (ix86_compare_op0))
     {
     case QImode:
--- gcc/testsuite/gcc.target/i386/pr27266.c	(revision 0)
+++ gcc/testsuite/gcc.target/i386/pr27266.c	(revision 113987)
@@ -0,0 +1,14 @@
+/* PR target/27266.
+   The testcase below used to trigger an ICE.  */
+
+/* { dg-do compile } */
+/* { dg-require-effective-target ilp32 } */
+/* { dg-options "-march=pentium" } */
+
+signed long long sll;
+
+void
+foo (void)
+{
+  __sync_fetch_and_add (&sll, 1);
+}

gcc41-pr30143.patch:
 0 files changed

--- NEW FILE gcc41-pr30143.patch ---
2006-12-20  Andrew Pinski  <pinskia at gmail.com>

	PR middle-end/30143
	* omp-low.c (init_tmp_var): New function.
	(save_tmp_var): New function.
	(lower_omp_1): Use them for VAR_DECL.

	* gcc.dg/gomp/complex-1.c: New testcase.

--- gcc/omp-low.c	(revision 119958)
+++ gcc/omp-low.c	(working copy)
@@ -4188,6 +4188,38 @@ lower_regimplify (tree *tp, struct walk_
     tsi_link_before (&wi->tsi, pre, TSI_SAME_STMT);
 }
 
+/* Copy EXP into a temporary.  Insert the initialization statement before TSI.  */
+
+static tree
+init_tmp_var (tree exp, tree_stmt_iterator *tsi)
+{
+  tree t, stmt;
+
+  t = create_tmp_var (TREE_TYPE (exp), NULL);
+  DECL_GIMPLE_REG_P (t) = 1;
+  stmt = build2 (GIMPLE_MODIFY_STMT, TREE_TYPE (t), t, exp);
+  SET_EXPR_LOCUS (stmt, EXPR_LOCUS (tsi_stmt (*tsi)));
+  tsi_link_before (tsi, stmt, TSI_SAME_STMT);
+
+  return t;
+}
+
+/* Similarly, but copy from the temporary and insert the statement
+   after the iterator.  */
+
+static tree
+save_tmp_var (tree exp, tree_stmt_iterator *tsi)
+{
+  tree t, stmt;
+
+  t = create_tmp_var (TREE_TYPE (exp), NULL);
+  DECL_GIMPLE_REG_P (t) = 1;
+  stmt = build2 (GIMPLE_MODIFY_STMT, TREE_TYPE (t), exp, t);
+  SET_EXPR_LOCUS (stmt, EXPR_LOCUS (tsi_stmt (*tsi)));
+  tsi_link_after (tsi, stmt, TSI_SAME_STMT);
+
+  return t;
+}
 
 /* Callback for walk_stmts.  Lower the OpenMP directive pointed by TP.  */
 
@@ -4253,7 +4285,17 @@ lower_omp_1 (tree *tp, int *walk_subtree
 
     case VAR_DECL:
       if (ctx && DECL_HAS_VALUE_EXPR_P (t))
-	lower_regimplify (tp, wi);
+	{
+	  lower_regimplify (&t, wi);
+	  if (wi->val_only)
+	    {
+	      if (wi->is_lhs)
+		t = save_tmp_var (t, &wi->tsi);
+	      else
+		t = init_tmp_var (t, &wi->tsi);
+	    }
+	  *tp = t;
+	}
       break;
 
     case ADDR_EXPR:
--- gcc/testsuite/gcc.dg/gomp/complex-1.c	(revision 0)
+++ gcc/testsuite/gcc.dg/gomp/complex-1.c	(revision 0)
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-fopenmp -O1" } */
+/* PR middle-end/30143 */
+
+
+int f (int n)
+{
+  int i;
+  _Complex float t;
+#pragma omp parallel
+    for (i = 1; i < n - 1; ++i)
+      t+=1;
+}

gcc41-pr30230.patch:
 config/ia64/ia64.c           |   57 ++++++++++++++++++++++++++++++++++++-------
 testsuite/g++.dg/eh/ia64-2.C |   57 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 106 insertions(+), 8 deletions(-)

--- NEW FILE gcc41-pr30230.patch ---
2006-12-16  Jakub Jelinek  <jakub at redhat.com>

	PR target/30230
	* config/ia64/ia64.c (ia64_add_bundle_selector_before): New function.
	(bundling): Use it.

	* g++.dg/eh/ia64-2.C: New test.

--- gcc/config/ia64/ia64.c.jj	2006-12-08 15:58:05.000000000 +0100
+++ gcc/config/ia64/ia64.c	2006-12-16 10:01:38.000000000 +0100
@@ -7693,6 +7693,51 @@ get_next_important_insn (rtx insn, rtx t
   return NULL_RTX;
 }
 
+/* Add a bundle selector TEMPLATE0 before INSN.  */
+
+static void
+ia64_add_bundle_selector_before (int template0, rtx insn)
+{
+  rtx b = gen_bundle_selector (GEN_INT (template0));
+  ia64_emit_insn_before (b, insn);
+#if NR_BUNDLES == 10
+  if ((template0 == 4 || template0 == 5)
+      && (flag_unwind_tables || (flag_exceptions && !USING_SJLJ_EXCEPTIONS)))
+    {
+      int i;
+      rtx note = NULL_RTX;
+
+      /* In .mbb and .bbb bundles, check if CALL_INSN isn't in the
+	 first or second slot.  If it is and has REG_EH_NOTE set, copy it
+	 to following nops, as br.call sets rp to the address of following
+	 bundle and therefore an EH region end must be on a bundle
+	 boundary.  */
+      insn = PREV_INSN (insn);
+      for (i = 0; i < 3; i++)
+	{
+	  do
+	    insn = next_active_insn (insn);
+	  while (GET_CODE (insn) == INSN
+		 && get_attr_empty (insn) == EMPTY_YES);
+	  if (GET_CODE (insn) == CALL_INSN)
+	    note = find_reg_note (insn, REG_EH_REGION, NULL_RTX);
+	  else if (note)
+	    {
+	      int code;
+	      gcc_assert ((code = recog_memoized (insn)) == CODE_FOR_nop
+			  || code == CODE_FOR_nop_b);
+	      if (find_reg_note (insn, REG_EH_REGION, NULL_RTX))
+		note = NULL_RTX;
+	      else
+		REG_NOTES (insn)
+		  = gen_rtx_EXPR_LIST (REG_EH_REGION, XEXP (note, 0),
+				       REG_NOTES (insn));
+	    }
+	}
+    }
+#endif
+}
+
 /* The following function does insn bundling.  Bundling means
    inserting templates and nop insns to fit insn groups into permitted
    templates.  Instruction scheduling uses NDFA (non-deterministic
@@ -7974,8 +8019,7 @@ bundling (FILE *dump, int verbose, rtx p
 		/* We are at the start of a bundle: emit the template
 		   (it should be defined).  */
 		gcc_assert (template0 >= 0);
-		b = gen_bundle_selector (GEN_INT (template0));
-		ia64_emit_insn_before (b, nop);
+		ia64_add_bundle_selector_before (template0, nop);
 		/* If we have two bundle window, we make one bundle
 		   rotation.  Otherwise template0 will be undefined
 		   (negative value).  */
@@ -8001,8 +8045,7 @@ bundling (FILE *dump, int verbose, rtx p
 	  /* The current insn is at the bundle start: emit the
 	     template.  */
 	  gcc_assert (template0 >= 0);
-	  b = gen_bundle_selector (GEN_INT (template0));
-	  ia64_emit_insn_before (b, insn);
+	  ia64_add_bundle_selector_before (template0, insn);
 	  b = PREV_INSN (insn);
 	  insn = b;
 	  /* See comment above in analogous place for emitting nops
@@ -8024,8 +8067,7 @@ bundling (FILE *dump, int verbose, rtx p
 	      /* See comment above in analogous place for emitting nops
 		 after the insn.  */
 	      gcc_assert (template0 >= 0);
-	      b = gen_bundle_selector (GEN_INT (template0));
-	      ia64_emit_insn_before (b, insn);
+	      ia64_add_bundle_selector_before (template0, insn);
 	      b = PREV_INSN (insn);
 	      insn = b;
 	      template0 = template1;
@@ -8119,8 +8161,7 @@ bundling (FILE *dump, int verbose, rtx p
 	      }
 	    /* Put the MM-insn in the same slot of a bundle with the
 	       same template as the original one.  */
-	    ia64_emit_insn_before (gen_bundle_selector (GEN_INT (template0)),
-				   insn);
+	    ia64_add_bundle_selector_before (template0, insn);
 	    /* To put the insn in the same slot, add necessary number
 	       of nops.  */
 	    for (j = n; j > 0; j --)
--- gcc/testsuite/g++.dg/eh/ia64-2.C.jj	2006-12-16 10:06:38.000000000 +0100
+++ gcc/testsuite/g++.dg/eh/ia64-2.C	2006-12-16 10:09:03.000000000 +0100
@@ -0,0 +1,57 @@
+// PR target/30230
+// This testcase failed on IA-64, where end of an EH region ended
+// in the middle of a bundle (with br.call insn in first or second
+// slot of .bbb/.mbb bundles and EH region end right after it).
+// But br.call returns to the start of the next bundlem so during
+// unwinding the call was considered to be outside of the EH region
+// while it should have been inside.
+// { dg-options "-O2" }
+// { dg-do run }
+
+struct A {};
+struct B { virtual ~B(); };
+B::~B () {}
+struct C { void foo (short &, B &); };
+struct D { void *d1; C *d2; virtual void virt (void) {} };
+struct E { D *e1; B *e2; };
+struct F { void bar (void *, B &); };
+F *p __attribute__((weak));
+volatile int r;
+
+void C::foo (short &x, B &)
+{
+  if (r)
+    throw A ();
+  x = 1;
+}
+
+void F::bar (void *, B &)
+{
+  throw A ();
+}
+
+void baz (E &x)
+{
+  short g = 0;
+  B b = *x.e2;
+  x.e1->d2->foo (g, b);
+  if (g)
+    p->bar(x.e1->d1, b);
+}
+
+int main ()
+{
+  F g;
+  D s;
+  E h;
+  p = &g;
+  h.e1 = &s;
+  try
+    {
+      baz (h);
+    }
+  catch (A &)
+    {
+    }
+  return 0;
+}

gcc41-pr30262.patch:
 testsuite/gcc.c-torture/execute/20061220-1.c |   72 +++++++++++++++++++++++++++
 testsuite/gcc.dg/gomp/asm-1.c                |   19 +++++++
 tree-nested.c                                |   45 ++++++++++++++++
 3 files changed, 136 insertions(+)

--- NEW FILE gcc41-pr30262.patch ---
2006-12-20  Jakub Jelinek  <jakub at redhat.com>

	PR middle-end/30262
	PR middle-end/30263
	* tree-nested.c (walk_asm_expr): New function.
	(walk_stmts): Use it for ASM_EXPR.

	* gcc.c-torture/execute/20061220-1.c: New test.
	* gcc.dg/gomp/asm-1.c: New test.

--- gcc/tree-nested.c.jj	2006-12-08 15:58:09.000000000 +0100
+++ gcc/tree-nested.c	2006-12-20 16:28:35.000000000 +0100
@@ -546,6 +546,47 @@ get_nl_goto_field (struct nesting_info *
   return field;
 }
 
+/* Helper function for walk_stmts.  Walk output operands of an ASM_EXPR.  */
+
+static void
+walk_asm_expr (struct walk_stmt_info *wi, tree stmt)
+{
+  int noutputs = list_length (ASM_OUTPUTS (stmt));
+  const char **oconstraints
+    = (const char **) alloca ((noutputs) * sizeof (const char *));
+  int i;
+  tree link;
+  const char *constraint;
+  bool allows_mem, allows_reg, is_inout;
+
+  wi->is_lhs = true;
+  for (i=0, link = ASM_OUTPUTS (stmt); link; ++i, link = TREE_CHAIN (link))
+    {
+      constraint = TREE_STRING_POINTER (TREE_VALUE (TREE_PURPOSE (link)));
+      oconstraints[i] = constraint;
+      parse_output_constraint (&constraint, i, 0, 0, &allows_mem,
+			       &allows_reg, &is_inout);
+
+      wi->val_only = (allows_reg || !allows_mem);
+      walk_tree (&TREE_VALUE (link), wi->callback, wi, NULL);
+    }
+
+  for (link = ASM_INPUTS (stmt); link; link = TREE_CHAIN (link))
+    {
+      constraint = TREE_STRING_POINTER (TREE_VALUE (TREE_PURPOSE (link)));
+      parse_input_constraint (&constraint, 0, 0, noutputs, 0,
+			      oconstraints, &allows_mem, &allows_reg);
+
+      wi->val_only = (allows_reg || !allows_mem);
+      /* Although input "m" is not really a LHS, we need a lvalue.  */
+      wi->is_lhs = !wi->val_only;
+      walk_tree (&TREE_VALUE (link), wi->callback, wi, NULL);
+    }
+
+  wi->is_lhs = false;
+  wi->val_only = true;
+}
+
 /* Iterate over all sub-statements of *TP calling walk_tree with
    WI->CALLBACK for every sub-expression in each statement found.  */
 
@@ -628,6 +669,10 @@ walk_stmts (struct walk_stmt_info *wi, t
       wi->is_lhs = false;
       break;
 
+    case ASM_EXPR:
+      walk_asm_expr (wi, *tp);
+      break;
+
     default:
       wi->val_only = true;
       walk_tree (tp, wi->callback, wi, NULL);
--- gcc/testsuite/gcc.c-torture/execute/20061220-1.c.jj	2006-12-20 15:40:09.000000000 +0100
+++ gcc/testsuite/gcc.c-torture/execute/20061220-1.c	2006-12-20 15:39:33.000000000 +0100
@@ -0,0 +1,72 @@
+/* PR middle-end/30262 */
+extern void abort (void);
+
+int
+foo (void)
+{
+  unsigned int x = 0;
+
+  void nested (void)
+  {
+    x = 254;
+  }
+
+  nested ();
+  asm volatile ("" :: "r" (x));
+  asm volatile ("" :: "m" (x));
+  asm volatile ("" :: "mr" (x));
+  asm volatile ("" : "=r" (x) : "0" (x));
+  asm volatile ("" : "=m" (x) : "m" (x));
+  return x;
+}
+
+int
+bar (void)
+{
+  unsigned int x = 0;
+
+  void nested (void)
+  {
+    asm volatile ("" :: "r" (x));
+    asm volatile ("" :: "m" (x));
+    asm volatile ("" :: "mr" (x));
+    x += 4;
+    asm volatile ("" : "=r" (x) : "0" (x));
+    asm volatile ("" : "=m" (x) : "m" (x));
+  }
+
+  nested ();
+  return x;
+}
+
+int
+baz (void)
+{
+  unsigned int x = 0;
+
+  void nested (void)
+  {
+    void nested2 (void)
+    {
+      asm volatile ("" :: "r" (x));
+      asm volatile ("" :: "m" (x));
+      asm volatile ("" :: "mr" (x));
+      x += 4;
+      asm volatile ("" : "=r" (x) : "0" (x));
+      asm volatile ("" : "=m" (x) : "m" (x));
+    }
+    nested2 ();
+    nested2 ();
+  }
+
+  nested ();
+  return x;
+}
+
+int
+main (void)
+{
+  if (foo () != 254 || bar () != 4 || baz () != 8)
+    abort ();
+  return 0;
+}
--- gcc/testsuite/gcc.dg/gomp/asm-1.c.jj	2006-12-20 16:35:57.000000000 +0100
+++ gcc/testsuite/gcc.dg/gomp/asm-1.c	2006-12-20 16:36:41.000000000 +0100
@@ -0,0 +1,19 @@
+/* PR middle-end/30263 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fopenmp" } */
+
+void
+foo (void)
+{
+  int s0, s1 = 5, s2 = 6;
+  int p0, p1, p2;
+  int f0 = 4, f1 = 5, f2 = 6;
+#pragma omp parallel shared (s0, s1, s2) private (p0, p1, p2) \
+	    firstprivate (f0, f1, f2)
+  {
+    asm ("" : "=m" (p0) : "m" (p1), "mr" (p2));
+    if (omp_get_thread_num () == 0)
+      asm ("" : "=m" (s0) : "m" (s1), "mr" (s2));
+    asm ("" : "=m" (f0) : "m" (f1), "mr" (f2));
+  }
+}


Index: .cvsignore
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/.cvsignore,v
retrieving revision 1.187
retrieving revision 1.188
diff -u -r1.187 -r1.188
--- .cvsignore	13 Dec 2006 18:57:53 -0000	1.187
+++ .cvsignore	20 Dec 2006 18:56:41 -0000	1.188
@@ -1 +1 @@
-gcc-4.1.1-20061213.tar.bz2
+gcc-4.1.1-20061220.tar.bz2


Index: gcc41.spec
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/gcc41.spec,v
retrieving revision 1.130
retrieving revision 1.131
diff -u -r1.130 -r1.131
--- gcc41.spec	14 Dec 2006 19:26:31 -0000	1.130
+++ gcc41.spec	20 Dec 2006 18:56:41 -0000	1.131
@@ -1,6 +1,6 @@
-%define DATE 20061213
+%define DATE 20061220
 %define gcc_version 4.1.1
-%define gcc_release 47
+%define gcc_release 48
 %define _unpackaged_files_terminate_build 0
 %define multilib_64_archs sparc64 ppc64 s390x x86_64
 %ifarch %{ix86} x86_64 ia64
@@ -141,8 +141,10 @@
 Patch33: gcc41-pr30113.patch
 Patch34: gcc41-pr30110.patch
 Patch35: gcc41-pr29166.patch
-Patch36: gcc41-pr30185.patch
-
+Patch36: gcc41-pr27266.patch
+Patch37: gcc41-pr30143.patch
+Patch38: gcc41-pr30262.patch
+Patch39: gcc41-pr30230.patch
 %define _gnu %{nil}
 %ifarch sparc
 %define gcc_target_platform sparc64-%{_vendor}-%{_target_os}
@@ -453,7 +455,10 @@
 %patch33 -p0 -b .pr30113~
 %patch34 -p0 -b .pr30110~
 %patch35 -p0 -b .pr29166~
-%patch36 -p0 -b .pr30185~
+%patch36 -p0 -b .pr27266~
+%patch37 -p0 -b .pr30143~
+%patch38 -p0 -b .pr30262~
+%patch39 -p0 -b .pr30230~
 
 sed -i -e 's/4\.1\.2/4.1.1/' gcc/BASE-VER gcc/version.c
 sed -i -e 's/" (Red Hat[^)]*)"/" (Red Hat %{version}-%{gcc_release})"/' gcc/version.c
@@ -1519,6 +1524,18 @@
 %doc rpm.doc/changelogs/libmudflap/ChangeLog*
 
 %changelog
+* Wed Dec 20 2006 Jakub Jelinek <jakub at redhat.com> 4.1.1-48
+- update from gcc-4_1-branch (-r119833:120062)
+  - PRs libstdc++/11953, target/24036
+- fix ia64 EH region boundaries where last br.call in the region
+  is not at the end of a bundle (#219596, PR target/30230)
+- fix DI resp. TImode __sync_*_compare_and_swap on i?86 resp. x86_64
+  (Kazu Hirata, #220258, PR target/27266)
+- fix asm vs. nested functions or OpenMP (#220250, PRs middle-end/30262,
+  middle-end/30263)
+- fix handling of complex shared OpenMP vars (Andrew Pinski,
+  PR middle-end/30143)
+
 * Thu Dec 14 2006 Jakub Jelinek <jakub at redhat.com> 4.1.1-47
 - fix ia64 prologue generation (Andreas Schwab, #219594, PR target/29166)
 - fix ppc64 divdi3 (PR target/30185)


Index: sources
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/sources,v
retrieving revision 1.189
retrieving revision 1.190
diff -u -r1.189 -r1.190
--- sources	13 Dec 2006 18:57:53 -0000	1.189
+++ sources	20 Dec 2006 18:56:41 -0000	1.190
@@ -1 +1 @@
-cd77e814ad1b4336b4e66146d82e8892  gcc-4.1.1-20061213.tar.bz2
+750bda4d0c5278dd34f79731ac8a7f9d  gcc-4.1.1-20061220.tar.bz2


--- gcc41-pr30185.patch DELETED ---




More information about the fedora-cvs-commits mailing list