From: Eric Botcazou Date: Thu, 6 Feb 2003 10:59:21 +0000 (+0100) Subject: re PR c/9530 (ICE on missing return statement) X-Git-Tag: releases/gcc-3.2.3~227 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=123e6bf7374c4fc229949067a5fa4c31f96698af;p=thirdparty%2Fgcc.git re PR c/9530 (ICE on missing return statement) 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 From-SVN: r62484 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b38e6b7ff955..a458046d03b0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2003-02-06 Eric Botcazou + Richard Henderson + + 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 * config/xtensa/xtensa.c (order_regs_for_local_alloc): Order the diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index 7ab9063b32b2..9812c6b65a68 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -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. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3405d5545ba3..f5d489df3cc1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2003-02-06 Eric Botcazou + + * gcc.c-torture/compile/20030206-1.c: New test. + 2003-02-05 Kaveh R. Ghazi * gcc.c-torture/execute/20020227-1.x: Update specific XFAIL