rpms/gcc/devel gcc44-pr39240.patch, NONE, 1.1 .cvsignore, 1.256, 1.257 gcc.spec, 1.21, 1.22 sources, 1.259, 1.260 gcc44-diff.patch, 1.1, NONE

Jakub Jelinek jakub at fedoraproject.org
Thu Feb 19 16:46:14 UTC 2009


Author: jakub

Update of /cvs/pkgs/rpms/gcc/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv8149

Modified Files:
	.cvsignore gcc.spec sources 
Added Files:
	gcc44-pr39240.patch 
Removed Files:
	gcc44-diff.patch 
Log Message:
4.4.0-0.21

gcc44-pr39240.patch:

--- NEW FILE gcc44-pr39240.patch ---
2009-02-19  Jakub Jelinek  <jakub at redhat.com>

	PR target/39240
	* calls.c (expand_call): Clear try_tail_call if caller and callee
	disagree in promotion of function return value.

	* gcc.c-torture/execute/pr39240.c: New test.

--- gcc/calls.c.jj	2009-02-06 11:17:16.000000000 +0100
+++ gcc/calls.c	2009-02-19 13:36:41.000000000 +0100
@@ -2333,6 +2333,37 @@ expand_call (tree exp, rtx target, int i
       || !lang_hooks.decls.ok_for_sibcall (fndecl))
     try_tail_call = 0;
 
+  /* Check if caller and callee disagree in promotion of function
+     return value.  */
+  if (try_tail_call)
+    {
+      enum machine_mode caller_mode, caller_promoted_mode;
+      enum machine_mode callee_mode, callee_promoted_mode;
+      int caller_unsignedp, callee_unsignedp;
+      tree caller_res = DECL_RESULT (current_function_decl);
+
+      caller_unsignedp = TYPE_UNSIGNED (TREE_TYPE (caller_res));
+      caller_mode = caller_promoted_mode = DECL_MODE (caller_res);
+      callee_unsignedp = TYPE_UNSIGNED (TREE_TYPE (funtype));
+      callee_mode = callee_promoted_mode = TYPE_MODE (TREE_TYPE (funtype));
+      if (targetm.calls.promote_function_return (TREE_TYPE (current_function_decl)))
+	caller_promoted_mode
+	  = promote_mode (TREE_TYPE (caller_res), caller_mode,
+			  &caller_unsignedp, 1);
+      if (targetm.calls.promote_function_return (funtype))
+	callee_promoted_mode
+	  = promote_mode (TREE_TYPE (funtype), callee_mode,
+			  &callee_unsignedp, 1);
+      if (caller_mode != VOIDmode
+	  && (caller_promoted_mode != callee_promoted_mode
+	      || ((caller_mode != caller_promoted_mode
+		   || callee_mode != callee_promoted_mode)
+		  && (caller_unsignedp != callee_unsignedp
+		      || GET_MODE_BITSIZE (caller_mode)
+			 < GET_MODE_BITSIZE (callee_mode)))))
+	try_tail_call = 0;
+    }
+
   /* Ensure current function's preferred stack boundary is at least
      what we need.  Stack alignment may also increase preferred stack
      boundary.  */
--- gcc/testsuite/gcc.c-torture/execute/pr39240.c.jj	2009-02-19 13:38:23.000000000 +0100
+++ gcc/testsuite/gcc.c-torture/execute/pr39240.c	2009-02-19 13:39:14.000000000 +0100
@@ -0,0 +1,105 @@
+/* PR target/39240 */
+
+extern void abort (void);
+
+__attribute__ ((noinline))
+static int foo1 (int x)
+{
+  return x;
+}
+
+__attribute__ ((noinline))
+unsigned int bar1 (int x)
+{
+  return foo1 (x + 6);
+}
+
+volatile unsigned long l1 = (unsigned int) -4;
+
+__attribute__ ((noinline))
+static short int foo2 (int x)
+{
+  return x;
+}
+
+__attribute__ ((noinline))
+unsigned short int bar2 (int x)
+{
+  return foo2 (x + 6);
+}
+
+volatile unsigned long l2 = (unsigned short int) -4;
+
+__attribute__ ((noinline))
+static signed char foo3 (int x)
+{
+  return x;
+}
+
+__attribute__ ((noinline))
+unsigned char bar3 (int x)
+{
+  return foo3 (x + 6);
+}
+
+volatile unsigned long l3 = (unsigned char) -4;
+
+__attribute__ ((noinline))
+static unsigned int foo4 (int x)
+{
+  return x;
+}
+
+__attribute__ ((noinline))
+int bar4 (int x)
+{
+  return foo4 (x + 6);
+}
+
+volatile unsigned long l4 = (int) -4;
+
+__attribute__ ((noinline))
+static unsigned short int foo5 (int x)
+{
+  return x;
+}
+
+__attribute__ ((noinline))
+short int bar5 (int x)
+{
+  return foo5 (x + 6);
+}
+
+volatile unsigned long l5 = (short int) -4;
+
+__attribute__ ((noinline))
+static unsigned char foo6 (int x)
+{
+  return x;
+}
+
+__attribute__ ((noinline))
+signed char bar6 (int x)
+{
+  return foo6 (x + 6);
+}
+
+volatile unsigned long l6 = (signed char) -4;
+
+int
+main (void)
+{
+  if (bar1 (-10) != l1)
+    abort ();
+  if (bar2 (-10) != l2)
+    abort ();
+  if (bar3 (-10) != l3)
+    abort ();
+  if (bar4 (-10) != l4)
+    abort ();
+  if (bar5 (-10) != l5)
+    abort ();
+  if (bar6 (-10) != l6)
+    abort ();
+  return 0;
+}


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/gcc/devel/.cvsignore,v
retrieving revision 1.256
retrieving revision 1.257
diff -u -r1.256 -r1.257
--- .cvsignore	16 Feb 2009 22:11:04 -0000	1.256
+++ .cvsignore	19 Feb 2009 16:45:44 -0000	1.257
@@ -1,3 +1,3 @@
 fastjar-0.97.tar.gz
-gcc-4.4.0-20090216.tar.bz2
+gcc-4.4.0-20090219.tar.bz2
 cloog-ppl-0.15.tar.gz


Index: gcc.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gcc/devel/gcc.spec,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- gcc.spec	17 Feb 2009 17:56:57 -0000	1.21
+++ gcc.spec	19 Feb 2009 16:45:44 -0000	1.22
@@ -1,5 +1,5 @@
-%define DATE 20090216
-%define SVNREV 144214
+%define DATE 20090219
+%define SVNREV 144300
 %define gcc_version 4.4.0
 # Note, gcc_release must be integer, if you want to add suffixes to
 # %{release}, append them after %{gcc_release} on Release: line.
@@ -62,6 +62,9 @@
 # Need binutils which support mffgpr and mftgpr >= 2.17.50.0.2-8
 # Need binutils which support --build-id >= 2.17.50.0.17-3
 BuildRequires: binutils >= 2.17.50.0.17-3
+# While gcc doesn't include statically linked binaries, during testing
+# -static is used several times.
+BuildRequires: glibc-static
 BuildRequires: zlib-devel, gettext, dejagnu, bison, flex, texinfo, sharutils
 %if %{build_java}
 BuildRequires: /usr/share/java/eclipse-ecj.jar, zip, unzip
@@ -141,7 +144,7 @@
 Patch21: gcc44-cloog-dl.patch
 Patch22: gcc44-raw-string.patch
 Patch23: gcc44-pr39175.patch
-Patch24: gcc44-diff.patch
+Patch24: gcc44-pr39240.patch
 
 Patch1000: fastjar-0.97-segfault.patch
 
@@ -429,7 +432,7 @@
 %endif
 %patch22 -p0 -b .raw-string~
 %patch23 -p0 -b .pr39175~
-%patch24 -p0 -b .diff~
+%patch24 -p0 -b .pr39240~
 
 # This testcase doesn't compile.
 rm libjava/testsuite/libjava.lang/PR35020*
@@ -1764,11 +1767,20 @@
 %doc rpm.doc/changelogs/libmudflap/ChangeLog*
 
 %changelog
+* Thu Feb 19 2009 Jakub Jelinek <jakub at redhat.com> 4.4.0-0.21
+- update from trunk
+  - PRs c++/39188, c++/39219, c/35447, c/38483, target/34587,
+	target/38891, target/39082, target/39179, target/39224,
+	target/39228, testsuite/38165, testsuite/38166,
+	tree-optimization/36922, tree-optimization/39074,
+  - another bogus aliasing warning fix (#485463, PR tree-optimization/39207)
+- fix tail call optimization on ppc (#485067, PR target/39240)
+
 * Tue Feb 17 2009 Jakub Jelinek <jakub at redhat.com> 4.4.0-0.20
 - update from trunk
   - PRs c/35446, middle-end/39214, tree-optimization/39202
   - fix ICE in compute_attic (#485708, PR tree-optimization/39204)
-  - fix bogus aliasing warning (#485463, tree-optimization/39207)
+  - fix bogus aliasing warning (#485463, PR tree-optimization/39207)
 - update for i386.rpm -> i586.rpm switch
 
 * Mon Feb 16 2009 Jakub Jelinek <jakub at redhat.com> 4.4.0-0.19


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/gcc/devel/sources,v
retrieving revision 1.259
retrieving revision 1.260
diff -u -r1.259 -r1.260
--- sources	16 Feb 2009 22:11:04 -0000	1.259
+++ sources	19 Feb 2009 16:45:44 -0000	1.260
@@ -1,3 +1,3 @@
 2659f09c2e43ef8b7d4406321753f1b2  fastjar-0.97.tar.gz
-0f5cb535b5450a8d61b14f690700a54c  gcc-4.4.0-20090216.tar.bz2
+67b7f59414d468df2d68a8b6dadd0153  gcc-4.4.0-20090219.tar.bz2
 716b7a0823f96c9d02c1703a9c47d387  cloog-ppl-0.15.tar.gz


--- gcc44-diff.patch DELETED ---




More information about the fedora-extras-commits mailing list