rpms/gcc/devel gcc41-pr27898.patch, NONE, 1.1 gcc41-pr28755.patch, NONE, 1.1 .cvsignore, 1.165, 1.166 gcc41.spec, 1.95, 1.96 sources, 1.167, 1.168

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Fri Aug 18 07:38:39 UTC 2006


Author: jakub

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

Modified Files:
	.cvsignore gcc41.spec sources 
Added Files:
	gcc41-pr27898.patch gcc41-pr28755.patch 
Log Message:
4.1.1-18

gcc41-pr27898.patch:
 c-typeck.c                 |   50 ++++++++++++++++++++++++---------------------
 testsuite/gcc.dg/pr27898.c |    8 +++++++
 2 files changed, 35 insertions(+), 23 deletions(-)

--- NEW FILE gcc41-pr27898.patch ---
2006-07-06  Alexandre Oliva  <aoliva at redhat.com>

	PR c/27898
	* c-typeck.c (tagged_types_tu_compatible_p): Enable exact
	matches between anonymous union fields.

2006-08-18  Jakub Jelinek  <jakub at redhat.com>

	PR c/27898
	* gcc.dg/pr27898.c: New test.

--- gcc/testsuite/gcc.dg/pr27898.c.jj	2006-08-18 09:19:33.000000000 +0200
+++ gcc/testsuite/gcc.dg/pr27898.c	2006-08-18 09:19:27.000000000 +0200
@@ -0,0 +1,8 @@
+/* PR c/27898 */
+/* { dg-do compile } */
+/* { dg-options "--combine" } */
+/* { dg-additional-sources "pr27898.c" } */
+
+union u { struct { int i; }; };
+
+extern int foo (union u *);
--- gcc/c-typeck.c.jj	2006-08-17 09:55:11.000000000 +0200
+++ gcc/c-typeck.c	2006-08-18 09:14:15.000000000 +0200
@@ -1126,11 +1126,12 @@ tagged_types_tu_compatible_p (tree t1, t
 	  {
 	    int result;
 
-
-	    if (DECL_NAME (s1) == NULL
-		|| DECL_NAME (s1) != DECL_NAME (s2))
+	    if (DECL_NAME (s1) != DECL_NAME (s2))
 	      break;
 	    result = comptypes_internal (TREE_TYPE (s1), TREE_TYPE (s2));
+
+	    if (result != 1 && !DECL_NAME (s1))
+	      break;
 	    if (result == 0)
 	      {
 		tu->val = 0;
@@ -1157,28 +1158,31 @@ tagged_types_tu_compatible_p (tree t1, t
 	  {
 	    bool ok = false;
 
-	    if (DECL_NAME (s1) != NULL)
-	      for (s2 = TYPE_FIELDS (t2); s2; s2 = TREE_CHAIN (s2))
-		if (DECL_NAME (s1) == DECL_NAME (s2))
-		  {
-		    int result;
-		    result = comptypes_internal (TREE_TYPE (s1), TREE_TYPE (s2));
-		    if (result == 0)
-		      {
-			tu->val = 0;
-			return 0;
-		      }
-		    if (result == 2)
-		      needs_warning = true;
-
-		    if (TREE_CODE (s1) == FIELD_DECL
-			&& simple_cst_equal (DECL_FIELD_BIT_OFFSET (s1),
-					     DECL_FIELD_BIT_OFFSET (s2)) != 1)
-		      break;
+	    for (s2 = TYPE_FIELDS (t2); s2; s2 = TREE_CHAIN (s2))
+	      if (DECL_NAME (s1) == DECL_NAME (s2))
+		{
+		  int result;
+
+		  result = comptypes_internal (TREE_TYPE (s1), TREE_TYPE (s2));
 
-		    ok = true;
+		  if (result != 1 && !DECL_NAME (s1))
+		    continue;
+		  if (result == 0)
+		    {
+		      tu->val = 0;
+		      return 0;
+		    }
+		  if (result == 2)
+		    needs_warning = true;
+
+		  if (TREE_CODE (s1) == FIELD_DECL
+		      && simple_cst_equal (DECL_FIELD_BIT_OFFSET (s1),
+					   DECL_FIELD_BIT_OFFSET (s2)) != 1)
 		    break;
-		  }
+
+		  ok = true;
+		  break;
+		}
 	    if (!ok)
 	      {
 		tu->val = 0;

gcc41-pr28755.patch:
 expr.c                     |   16 ++++++++++++++--
 testsuite/gcc.dg/pr28755.c |   22 ++++++++++++++++++++++
 2 files changed, 36 insertions(+), 2 deletions(-)

--- NEW FILE gcc41-pr28755.patch ---
2006-08-17  Jakub Jelinek  <jakub at redhat.com>

	PR middle-end/28755
	* expr.c (expand_expr_real_1) <case ARRAY_REF>: Make sure
	the const array field optimization doesn't create an extra constant
	MEM.

	* gcc.dg/pr28755.c: New test.

--- gcc/expr.c.jj	2006-08-09 17:54:03.000000000 +0200
+++ gcc/expr.c	2006-08-17 13:00:33.000000000 +0200
@@ -7105,13 +7105,25 @@ expand_expr_real_1 (tree exp, rtx target
 					      field, value)
 		      if (tree_int_cst_equal (field, index))
 			{
-			  if (!TREE_SIDE_EFFECTS (value))
+			  if (TREE_SIDE_EFFECTS (value))
+			    break;
+
+			  if (TREE_CODE (value) != CONSTRUCTOR)
 			    return expand_expr (fold (value), target, tmode,
 						modifier);
+
+			  /* For CONSTRUCTOR this optimization is not always
+			     a win - if expand_expr creates a temporary
+			     constant, we just waste unnecessarily rodata
+			     space.  */
+			  temp = expand_expr (value, target, tmode, modifier);
+			  if (temp == target
+			      || (temp && GET_CODE (temp) != MEM))
+			    return temp;
 			  break;
 			}
 		  }
-		else if(TREE_CODE (init) == STRING_CST)
+		else if (TREE_CODE (init) == STRING_CST)
 		  {
 		    tree index1 = index;
 		    tree low_bound = array_ref_low_bound (exp);
--- gcc/testsuite/gcc.dg/pr28755.c.jj	2006-08-17 12:59:57.000000000 +0200
+++ gcc/testsuite/gcc.dg/pr28755.c	2006-08-17 12:59:57.000000000 +0200
@@ -0,0 +1,22 @@
+/* PR middle-end/28755 */
+/* { dg-do compile } */
+/* { dg-options "-Os" } */
+/* { dg-final { scan-assembler-times "2112543726\|7deadbee" 2 } } */
+
+struct S
+{
+  void *s1;
+  unsigned s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14;
+};
+
+const struct S array[] = {
+  { (void *) 0, 60, 640, 2112543726, 39682, 48, 16, 33, 10, 96, 2, 0, 0, 4 },
+  { (void *) 0, 60, 2112543726, 192, 18251, 16, 33, 10, 96, 2, 0, 0, 4, 212 }
+};
+
+void
+foo (struct S *x)
+{
+  x[0] = array[0];
+  x[5] = array[1];
+}


Index: .cvsignore
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/.cvsignore,v
retrieving revision 1.165
retrieving revision 1.166
diff -u -r1.165 -r1.166
--- .cvsignore	16 Aug 2006 18:08:42 -0000	1.165
+++ .cvsignore	18 Aug 2006 07:38:36 -0000	1.166
@@ -1 +1 @@
-gcc-4.1.1-20060816.tar.bz2
+gcc-4.1.1-20060818.tar.bz2


Index: gcc41.spec
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/gcc41.spec,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -r1.95 -r1.96
--- gcc41.spec	16 Aug 2006 18:28:12 -0000	1.95
+++ gcc41.spec	18 Aug 2006 07:38:36 -0000	1.96
@@ -1,6 +1,6 @@
-%define DATE 20060816
+%define DATE 20060818
 %define gcc_version 4.1.1
-%define gcc_release 17
+%define gcc_release 18
 %define _unpackaged_files_terminate_build 0
 %define multilib_64_archs sparc64 ppc64 s390x x86_64
 %ifarch %{ix86} x86_64 ia64
@@ -144,6 +144,8 @@
 Patch37: gcc41-pr28709.patch
 Patch38: gcc41-pr28744.patch
 Patch39: gcc41-x86_64-kernel-ssp.patch
+Patch40: gcc41-pr28755.patch
+Patch41: gcc41-pr27898.patch
 
 %define _gnu %{nil}
 %ifarch sparc
@@ -464,6 +466,8 @@
 %patch37 -p0 -b .pr28709~
 %patch38 -p0 -b .pr28744~
 %patch39 -p0 -b .x86_64-kernel-ssp~
+%patch40 -p0 -b .pr28755~
+%patch41 -p0 -b .pr27898~
 
 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
@@ -1524,6 +1528,17 @@
 %doc rpm.doc/changelogs/libmudflap/ChangeLog*
 
 %changelog
+* Fri Aug 18 2006 Jakub Jelinek <jakub at redhat.com> 4.1.1-18
+- update from gcc-4_1-branch (-r116176:116223)
+  - PRs c++/28593, c++/28606, c++/28710, c/27697, middle-end/20256,
+	middle-end/25211, middle-end/26435
+- don't waste .rodata space when copying from const array with large
+  entries (PR middle-end/28755)
+- fix --combine with anonymous structures in unions (Alexandre Oliva,
+  PR c/27898)
+- rebuilt with latest binutils to pick up 64K -z commonpagesize on ppc*
+  (#203001)
+
 * Wed Aug 16 2006 Jakub Jelinek <jakub at redhat.com> 4.1.1-17
 - update from gcc-4_1-branch (-r116082:116176)
   - PRs c++/27894, c++/28677, c/28649, middle-end/28075,


Index: sources
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/sources,v
retrieving revision 1.167
retrieving revision 1.168
diff -u -r1.167 -r1.168
--- sources	16 Aug 2006 18:08:42 -0000	1.167
+++ sources	18 Aug 2006 07:38:36 -0000	1.168
@@ -1 +1 @@
-3743f891cb127e18bca681d57c07a2c0  gcc-4.1.1-20060816.tar.bz2
+6c13068f0da00ac2e7fcef129cc6e555  gcc-4.1.1-20060818.tar.bz2




More information about the fedora-cvs-commits mailing list