diff options
author | Richard Henderson <rth@redhat.com> | 2005-05-18 10:33:33 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2005-05-18 10:33:33 -0700 |
commit | 3d4ee18234ef5118ff305a8e7026505601a1ce23 (patch) | |
tree | 72f0092c128e950ef8ce8696fac63351fe894d97 /gcc | |
parent | 6aca9695cfe6c56b4aa13957db1d462805edc658 (diff) | |
download | gcc-3d4ee18234ef5118ff305a8e7026505601a1ce23.zip gcc-3d4ee18234ef5118ff305a8e7026505601a1ce23.tar.gz gcc-3d4ee18234ef5118ff305a8e7026505601a1ce23.tar.bz2 |
re PR target/21632 (ICE with small model attribute on ia64)
PR target/21632
* config/ia64/ia64.c (ia64_extra_constraint) <'T'>: Use
small_addr_symbolic_operand.
From-SVN: r99910
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/ia64/ia64.c | 3 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/ia64/small-addr-1.c | 23 |
3 files changed, 30 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index acc2bcb..9edcf43 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2005-05-18 Richard Henderson <rth@redhat.com> + + PR target/21632 + * config/ia64/ia64.c (ia64_extra_constraint) <'T'>: Use + small_addr_symbolic_operand. + 2005-05-18 Jeff Law <law@redhat.com> * tree-ssa-forwprop.c (forward_propagate_addr_expr): Do not diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index da9f55c..d23d355 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -618,8 +618,7 @@ ia64_extra_constraint (rtx value, char c) case 'T': /* Symbol ref to small-address-area. */ - return (GET_CODE (value) == SYMBOL_REF - && SYMBOL_REF_SMALL_ADDR_P (value)); + return small_addr_symbolic_operand (value, VOIDmode); case 'U': /* Vector zero. */ diff --git a/gcc/testsuite/gcc.target/ia64/small-addr-1.c b/gcc/testsuite/gcc.target/ia64/small-addr-1.c new file mode 100644 index 0000000..8462186 --- /dev/null +++ b/gcc/testsuite/gcc.target/ia64/small-addr-1.c @@ -0,0 +1,23 @@ +/* PR target/21632 */ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +struct S +{ + void *s[256]; +}; + +struct T +{ + long t[23]; + struct S *u; +}; + +extern struct T __attribute__((model (small))) v; + +void * +foo (void) +{ + return v.u->s[0]; +} + |