]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c/9530 (ICE on missing return statement)
authorEric Botcazou <ebotcazou@libertysurf.fr>
Thu, 6 Feb 2003 10:59:21 +0000 (11:59 +0100)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Thu, 6 Feb 2003 10:59:21 +0000 (10:59 +0000)
PR c/9530
* config/i386/i386.h (FUNCTION_OK_FOR_SIBCALL): Forbid sibcalls
from functions that return a float to functions that don't.

Co-Authored-By: Richard Henderson <rth@redhat.com>
From-SVN: r62484

gcc/ChangeLog
gcc/config/i386/i386.h
gcc/testsuite/ChangeLog

index b38e6b7ff955bea87e7084deaaac5a25733a816c..a458046d03b028499731b25dab7a9be30e2626f7 100644 (file)
@@ -1,3 +1,10 @@
+2003-02-06  Eric Botcazou <ebotcazou@libertysurf.fr>
+            Richard Henderson <rth@redhat.com>
+    
+       PR c/9530
+       * config/i386/i386.h (FUNCTION_OK_FOR_SIBCALL): Forbid sibcalls
+       from functions that return a float to functions that don't.
+
 2003-02-03  Bob Wilson  <bob.wilson@acm.org>
 
        * config/xtensa/xtensa.c (order_regs_for_local_alloc): Order the
index 7ab9063b32b2605ba7100d4cec3d2beb12d156a8..9812c6b65a683618ae9265adfdb9640fd0c861b5 100644 (file)
@@ -1723,15 +1723,17 @@ typedef struct ix86_args {
 
 /* If PIC, we cannot make sibling calls to global functions
    because the PLT requires %ebx live.
-   If we are returning floats on the register stack, we cannot make
-   sibling calls to functions that return floats.  (The stack adjust
-   instruction will wind up after the sibcall jump, and not be executed.) */
+   If we are returning floats on the 80387 register stack, we cannot
+   make a sibcall from a function that doesn't return a float to a
+   function that does or, conversely, from a function that does return
+   a float to a function that doesn't; the necessary stack adjustment
+   would not be executed.  */
 #define FUNCTION_OK_FOR_SIBCALL(DECL)                                  \
   ((DECL)                                                              \
    && (! flag_pic || ! TREE_PUBLIC (DECL))                             \
    && (! TARGET_FLOAT_RETURNS_IN_80387                                 \
-       || ! FLOAT_MODE_P (TYPE_MODE (TREE_TYPE (TREE_TYPE (DECL))))    \
-       || FLOAT_MODE_P (TYPE_MODE (TREE_TYPE (TREE_TYPE (cfun->decl))))))
+       || (FLOAT_MODE_P (TYPE_MODE (TREE_TYPE (TREE_TYPE (DECL))))     \
+           == FLOAT_MODE_P (TYPE_MODE (TREE_TYPE (TREE_TYPE (cfun->decl)))))))
 
 /* Perform any needed actions needed for a function that is receiving a
    variable number of arguments.
index 3405d5545ba37be849eceb4f0fca38a944c14781..f5d489df3cc10bc590841c9e3123bc203f06e126 100644 (file)
@@ -1,3 +1,7 @@
+2003-02-06  Eric Botcazou <ebotcazou@libertysurf.fr>
+
+       * gcc.c-torture/compile/20030206-1.c: New test.
+
 2003-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * gcc.c-torture/execute/20020227-1.x: Update specific XFAIL