diff options
author | Jakub Jelinek <jakub@redhat.com> | 2002-10-23 23:20:08 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2002-10-23 23:20:08 +0200 |
commit | 8bfb45f8641711f0ae29c8401d8e7e7fafd08f5f (patch) | |
tree | 8692b846e511047be6b387d13e61dd4e2b0f4f20 /gcc | |
parent | 963f08a97fa92f5f46193758b84a56286dfb1e04 (diff) | |
download | gcc-8bfb45f8641711f0ae29c8401d8e7e7fafd08f5f.zip gcc-8bfb45f8641711f0ae29c8401d8e7e7fafd08f5f.tar.gz gcc-8bfb45f8641711f0ae29c8401d8e7e7fafd08f5f.tar.bz2 |
i386.c (local_symbolic_operand): Move LABEL_REF test after CONST test.
* config/i386/i386.c (local_symbolic_operand): Move LABEL_REF test
after CONST test.
* gcc.dg/20021023-1.c: New test.
From-SVN: r58469
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 6 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/20021023-1.c | 24 |
4 files changed, 36 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 96011b3..0a33a70 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-10-23 Jakub Jelinek <jakub@redhat.com> + + * config/i386/i386.c (local_symbolic_operand): Move LABEL_REF test + after CONST test. + 2002-10-23 Steve Ellcey <sje@cup.hp.com> * config/ia64/ia64.c (hfa_element_mode): Don't allow 128 bit floats diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index f3d5acc..4b13c46 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -3063,9 +3063,6 @@ local_symbolic_operand (op, mode) rtx op; enum machine_mode mode ATTRIBUTE_UNUSED; { - if (GET_CODE (op) == LABEL_REF) - return 1; - if (GET_CODE (op) == CONST && GET_CODE (XEXP (op, 0)) == PLUS && GET_CODE (XEXP (XEXP (op, 0), 1)) == CONST_INT @@ -3074,6 +3071,9 @@ local_symbolic_operand (op, mode) && INTVAL (XEXP (XEXP (op, 0), 1)) < 16*1024*1024))) op = XEXP (XEXP (op, 0), 0); + if (GET_CODE (op) == LABEL_REF) + return 1; + if (GET_CODE (op) != SYMBOL_REF) return 0; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d0c5776..e2fa077 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2002-10-23 Jakub Jelinek <jakub@redhat.com> + + * gcc.dg/20021023-1.c: New test. + 2002-10-23 Mark Mitchell <mark@codesourcery.com> PR c++/7679 diff --git a/gcc/testsuite/gcc.dg/20021023-1.c b/gcc/testsuite/gcc.dg/20021023-1.c new file mode 100644 index 0000000..6fe555a --- /dev/null +++ b/gcc/testsuite/gcc.dg/20021023-1.c @@ -0,0 +1,24 @@ +/* This testcase ICEd on x86-64 because LABEL_REF + small const was not + considered as local_symbolic_operand. */ +/* { dg-do compile } */ +/* { dg-options "-O2 -fpic" } */ + +typedef __builtin_va_list va_list; + +static unsigned int +foo (void *a, float b, const char *c, va_list d, void *e) +{ + return -1; +} + +unsigned int +bar (void *a, float b, const char *c, ...) +{ + va_list args; + unsigned int d; + + __builtin_stdarg_start (args, c); + d = foo (a, b, c, args, a); + __builtin_va_end (args); + return d; +} |