rpms/gcc/devel gcc4-ppc64-libffi.patch, NONE, 1.1 gcc4-pr24109.patch, NONE, 1.1 .cvsignore, 1.111, 1.112 gcc4.spec, 1.74, 1.75 sources, 1.113, 1.114 gcc4-libstdc++-pr22309.patch, 1.3, NONE

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Thu Sep 29 10:58:56 UTC 2005


Author: jakub

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

Modified Files:
	.cvsignore gcc4.spec sources 
Added Files:
	gcc4-ppc64-libffi.patch gcc4-pr24109.patch 
Removed Files:
	gcc4-libstdc++-pr22309.patch 
Log Message:
4.0.2-1


gcc4-ppc64-libffi.patch:
 src/powerpc/ffi.c              |    7 +++++++
 src/powerpc/linux64.S          |    6 +++++-
 testsuite/libffi.call/float1.c |   24 ++++++++++++++++++++----
 3 files changed, 32 insertions(+), 5 deletions(-)

--- NEW FILE gcc4-ppc64-libffi.patch ---
2005-09-26  Tom Tromey  <tromey at redhat.com>

	* testsuite/libffi.call/float1.c (value_type): New typedef.
	(CANARY): New define.
	(main): Check for result buffer overflow.
	* src/powerpc/linux64.S: Handle linux64 long double returns.
	* src/powerpc/ffi.c (FLAG_RETURNS_128BITS): New constant.
	(ffi_prep_cif_machdep): Handle linux64 long double returns.

--- libffi/src/powerpc/ffi.c 25 Aug 2005 00:54:54 -0000 1.15
+++ libffi/src/powerpc/ffi.c 26 Sep 2005 16:08:18 -0000
@@ -39,6 +39,7 @@
   FLAG_RETURNS_NOTHING  = 1 << (31-30), /* These go in cr7 */
   FLAG_RETURNS_FP       = 1 << (31-29),
   FLAG_RETURNS_64BITS   = 1 << (31-28),
+  FLAG_RETURNS_128BITS  = 1 << (31-27),
 
   FLAG_ARG_NEEDS_COPY   = 1 << (31- 7),
   FLAG_FP_ARGUMENTS     = 1 << (31- 6), /* cr1.eq; specified by ABI */
@@ -543,6 +544,12 @@
       /* else fall through.  */
 #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
     case FFI_TYPE_LONGDOUBLE:
+      if (type == FFI_TYPE_LONGDOUBLE && cif->abi == FFI_LINUX64)
+	{
+	  flags |= FLAG_RETURNS_128BITS;
+	  flags |= FLAG_RETURNS_FP;
+	  break;
+	}
 #endif
       intarg_count++;
       flags |= FLAG_RETVAL_REFERENCE;
--- libffi/src/powerpc/linux64.S 2 Sep 2004 21:07:21 -0000 1.7
+++ libffi/src/powerpc/linux64.S 26 Sep 2005 16:08:18 -0000
@@ -120,9 +120,13 @@
 	blr
 
 .Lfp_return_value:
+	bt	27, .Lfd_return_value
 	bf	28, .Lfloat_return_value
 	stfd	%f1, 0(%r30)
-	stfd	%f2, 8(%r30)	/* It might be a long double */
+	b	.Ldone_return_value
+.Lfd_return_value:
+	stfd	%f1, 0(%r30)
+	stfd	%f2, 8(%r30)
 	b	.Ldone_return_value
 .Lfloat_return_value:
 	stfs	%f1, 0(%r30)
--- libffi/testsuite/libffi.call/float1.c 4 Sep 2003 14:47:48 -0000 1.1
+++ libffi/testsuite/libffi.call/float1.c 26 Sep 2005 16:08:18 -0000
@@ -8,6 +8,14 @@
 #include "ffitest.h"
 #include "float.h"
 
+typedef union
+{
+  double d;
+  unsigned char c[sizeof (double)];
+} value_type;
+
+#define CANARY 0xba
+
 static double dblit(float f)
 {
   return f/3.0;
@@ -19,8 +27,8 @@
   ffi_type *args[MAX_ARGS];
   void *values[MAX_ARGS];
   float f;
-  double d;
-
+  value_type result[2];
+  int i;
 
   args[0] = &ffi_type_float;
   values[0] = &f;
@@ -31,11 +39,19 @@
   
   f = 3.14159;
   
-  ffi_call(&cif, FFI_FN(dblit), &d, values);
+  /* Put a canary in the return array.  This is a regression test for
+     a buffer overrun.  */
+  memset(result[1].c, CANARY, sizeof (double));
+
+  ffi_call(&cif, FFI_FN(dblit), &result[0].d, values);
   
   /* These are not always the same!! Check for a reasonable delta */
  
-  CHECK(d - dblit(f) < DBL_EPSILON);
+  CHECK(result[0].d - dblit(f) < DBL_EPSILON);
+
+  /* Check the canary.  */
+  for (i = 0; i < sizeof (double); ++i)
+    CHECK(result[1].c[i] == CANARY);
 
   exit(0);
 


gcc4-pr24109.patch:
 c-decl.c                                     |   14 ++++++++++++--
 testsuite/gcc.c-torture/execute/20050929-1.c |   20 ++++++++++++++++++++
 2 files changed, 32 insertions(+), 2 deletions(-)

--- NEW FILE gcc4-pr24109.patch ---
2005-09-29  Jakub Jelinek  <jakub at redhat.com>

	* c-decl.c (c_write_global_declarations_1): If any
	wrapup_global_declaration_2 call returned true, restart the loop.

	* gcc.c-torture/execute/20050929-1.c: New test.

--- gcc/c-decl.c.jj	2005-09-28 21:12:06.000000000 +0200
+++ gcc/c-decl.c	2005-09-29 10:01:41.000000000 +0200
@@ -7527,6 +7527,7 @@ static void
 c_write_global_declarations_1 (tree globals)
 {
   tree decl;
+  bool reconsider;
 
   /* Process the decls in the order they were written.  */
   for (decl = globals; decl; decl = TREE_CHAIN (decl))
@@ -7545,9 +7546,18 @@ c_write_global_declarations_1 (tree glob
 	}
 
       wrapup_global_declaration_1 (decl);
-      wrapup_global_declaration_2 (decl);
-      check_global_declaration_1 (decl);
     }
+
+  do
+    {
+      reconsider = false;
+      for (decl = globals; decl; decl = TREE_CHAIN (decl))
+	reconsider |= wrapup_global_declaration_2 (decl);
+    }
+  while (reconsider);
+
+  for (decl = globals; decl; decl = TREE_CHAIN (decl))
+    check_global_declaration_1 (decl);
 }
 
 /* A subroutine of c_write_global_declarations Emit debug information for each
--- gcc/testsuite/gcc.c-torture/execute/20050929-1.c.jj	2005-09-29 10:18:38.000000000 +0200
+++ gcc/testsuite/gcc.c-torture/execute/20050929-1.c	2005-09-29 10:07:06.000000000 +0200
@@ -0,0 +1,20 @@
+/* PR middle-end/24109 */
+
+extern void abort (void);
+
+struct A { int i; int j; };
+struct B { struct A *a; struct A *b; };
+struct C { struct B *c; struct A *d; };
+struct C e = { &(struct B) { &(struct A) { 1, 2 }, &(struct A) { 3, 4 } }, &(struct A) { 5, 6 } };
+
+int
+main (void)
+{
+  if (e.c->a->i != 1 || e.c->a->j != 2)
+    abort ();
+  if (e.c->b->i != 3 || e.c->b->j != 4)
+    abort ();
+  if (e.d->i != 5 || e.d->j != 6)
+    abort ();
+  return 0;
+}


Index: .cvsignore
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/.cvsignore,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -r1.111 -r1.112
--- .cvsignore	19 Sep 2005 09:39:37 -0000	1.111
+++ .cvsignore	29 Sep 2005 10:58:53 -0000	1.112
@@ -1 +1 @@
-gcc-4.0.1-20050919.tar.bz2
+gcc-4.0.2-20050929.tar.bz2


Index: gcc4.spec
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/gcc4.spec,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -r1.74 -r1.75
--- gcc4.spec	19 Sep 2005 09:39:37 -0000	1.74
+++ gcc4.spec	29 Sep 2005 10:58:53 -0000	1.75
@@ -1,6 +1,6 @@
-%define DATE 20050919
-%define gcc_version 4.0.1
-%define gcc_release 14
+%define DATE 20050929
+%define gcc_version 4.0.2
+%define gcc_release 1
 %define _unpackaged_files_terminate_build 0
 %define multilib_64_archs sparc64 ppc64 s390x x86_64
 %ifarch %{ix86} alpha ia64 x86_64 s390 sparc sparc64
@@ -93,7 +93,7 @@
 Patch11: gcc4-vsb-stack.patch
 Patch12: gcc4-libltdl-multilib.patch
 Patch13: gcc4-java-rh163099.patch
-Patch14: gcc4-libstdc++-pr22309.patch
+Patch14: gcc4-ppc64-libffi.patch
 Patch15: gcc4-libjava-ia64-backtrace.patch
 Patch16: gcc4-stack-protector.patch
 Patch17: gcc4-ia64-stack-protector.patch
@@ -111,6 +111,7 @@
 Patch29: gcc4-pr21983.patch
 Patch30: gcc4-pr23818.patch
 Patch31: gcc4-pr23863.patch
+Patch32: gcc4-pr24109.patch
 
 %define _gnu %{nil}
 %ifarch sparc
@@ -433,7 +434,7 @@
 %patch11 -p0 -b .vsb-stack~
 %patch12 -p0 -b .libltdl-multilib~
 %patch13 -p0 -b .java-rh163099~
-%patch14 -p0 -b .libstdc++-pr22309~
+%patch14 -p0 -b .ppc64-libffi~
 %patch15 -p0 -b .libjava-ia64-backtrace~
 %patch16 -p0 -b .stack-protector~
 %patch17 -p0 -b .ia64-stack-protector~
@@ -451,8 +452,9 @@
 %patch29 -p0 -b .pr21983~
 %patch30 -p0 -b .pr23818~
 %patch31 -p0 -b .pr23863~
+%patch32 -p0 -b .pr24109~
 
-perl -pi -e 's/4\.0\.2/4.0.1/' gcc/version.c
+perl -pi -e 's/4\.0\.3/4.0.2/' gcc/version.c
 perl -pi -e 's/"%{gcc_version}"/"%{gcc_version} \(release\)"/' gcc/version.c
 perl -pi -e 's/\((prerelease|experimental|release|Red Hat[^)]*)\)/\(Red Hat %{version}-%{gcc_release}\)/' gcc/version.c
 
@@ -643,6 +645,7 @@
 (cd libjava; for i in ChangeLog* README*; do
 	cp -p $i ../rpm.doc/libjava/$i.libjava
 done)
+cp -p libjava/LIBGCJ_LICENSE pm.doc/libjava/
 
 rm -f rpm.doc/changelogs/gcc/ChangeLog.[1-9]
 find rpm.doc -name \*ChangeLog\* | xargs bzip2 -9
@@ -1488,6 +1491,16 @@
 %endif
 
 %changelog
+* Thu Sep 29 2005 Jakub Jelinek  <jakub at redhat.com> 4.0.2-1
+- update from CVS
+  - GCC 4.0.2 release
+  - PRs c++/23993, libstdc++/19265, rtl-optimization/23043,
+	rtl-optimization/23941, target/24102
+- fix a bug which caused undefined __compound_literal.* symbols
+  on Linux kernel (PR middle-end/24109)
+- add LIBGCJ_LICENSE file to %%doc (#163922)
+- fix ppc64 libffi (Tom Tromey, #166657)
+
 * Mon Sep 19 2005 Jakub Jelinek  <jakub at redhat.com> 4.0.1-14
 - update from CVS
   - PRs c++/16171, c++/21135, c++/21514, c++/23139, c++/23624, c++/23691,


Index: sources
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/sources,v
retrieving revision 1.113
retrieving revision 1.114
diff -u -r1.113 -r1.114
--- sources	19 Sep 2005 09:39:37 -0000	1.113
+++ sources	29 Sep 2005 10:58:53 -0000	1.114
@@ -1 +1 @@
-344b46c156ac08772d98e9b18e2b454f  gcc-4.0.1-20050919.tar.bz2
+646b81f6d9b9ae6b9233cbcf81c76f1d  gcc-4.0.2-20050929.tar.bz2


--- gcc4-libstdc++-pr22309.patch DELETED ---




More information about the fedora-cvs-commits mailing list