mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-16 17:21:07 +08:00
tree.c (unsafe_for_reeval): Consider callee child of CALL_EXPR.
2002-12-05 Dale Johannesen <dalej@apple.com> * tree.c (unsafe_for_reeval): Consider callee child of CALL_EXPR. From-SVN: r59875
This commit is contained in:
parent
1a823ac1fd
commit
1fcfaf375c
@ -1,3 +1,7 @@
|
|||||||
|
2002-12-05 Dale Johannesen <dalej@apple.com>
|
||||||
|
|
||||||
|
* tree.c (unsafe_for_reeval): Consider callee child of CALL_EXPR.
|
||||||
|
|
||||||
2002-12-05 Danny Smith <dannysmith@users.sourceforge.net>
|
2002-12-05 Danny Smith <dannysmith@users.sourceforge.net>
|
||||||
|
|
||||||
* config/i386/cygwin.h (SUBTARGET_PROLOGUE): Replace with
|
* config/i386/cygwin.h (SUBTARGET_PROLOGUE): Replace with
|
||||||
|
10
gcc/testsuite/gcc.dg/20021205-1.c
Normal file
10
gcc/testsuite/gcc.dg/20021205-1.c
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
/* dg-do compile */
|
||||||
|
/* dg-options "-O3" */
|
||||||
|
typedef struct x x;
|
||||||
|
struct x { char * (*bar) (int); };
|
||||||
|
static x **foo() { return ((x**)baz()); }
|
||||||
|
int xyzzy()
|
||||||
|
{
|
||||||
|
baz((*foo())->bar(0));
|
||||||
|
return 3;
|
||||||
|
}
|
@ -1634,7 +1634,7 @@ unsafe_for_reeval (expr)
|
|||||||
{
|
{
|
||||||
int unsafeness = 0;
|
int unsafeness = 0;
|
||||||
enum tree_code code;
|
enum tree_code code;
|
||||||
int i, tmp;
|
int i, tmp, tmp2;
|
||||||
tree exp;
|
tree exp;
|
||||||
int first_rtl;
|
int first_rtl;
|
||||||
|
|
||||||
@ -1660,8 +1660,9 @@ unsafe_for_reeval (expr)
|
|||||||
return unsafeness;
|
return unsafeness;
|
||||||
|
|
||||||
case CALL_EXPR:
|
case CALL_EXPR:
|
||||||
|
tmp2 = unsafe_for_reeval (TREE_OPERAND (expr, 0));
|
||||||
tmp = unsafe_for_reeval (TREE_OPERAND (expr, 1));
|
tmp = unsafe_for_reeval (TREE_OPERAND (expr, 1));
|
||||||
return MAX (tmp, 1);
|
return MAX (MAX (tmp, 1), tmp2);
|
||||||
|
|
||||||
case TARGET_EXPR:
|
case TARGET_EXPR:
|
||||||
unsafeness = 1;
|
unsafeness = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user