diff options
author | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-03-08 21:56:36 +0000 |
---|---|---|
committer | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-03-08 21:56:36 +0000 |
commit | 7d282ac0c38edc8fe58e3268eb8afb30fe18e4aa (patch) | |
tree | 93edd15f6d8a3af3c971d1499927e5190c015173 /gcc/testsuite/gcc.dg/pr14289-3.c | |
parent | c57446fa8ede7b0932065614395f80981b004ac9 (diff) | |
download | gcc-7d282ac0c38edc8fe58e3268eb8afb30fe18e4aa.tar.gz |
PR middle-end/14289
* c-typeck.c (c_mark_addressable): A register variable should
be considered global if its not automatic, i.e. TREE_PUBLIC,
TREE_STATIC or DECL_EXTERNAL.
* function.c (put_var_into_stack): Call abort when placing a
hard register into the stack, if x_parm_reg_stack_loc is NULL.
* gcc.dg/pr14289-1.c: New test case.
* gcc.dg/pr14289-2.c: Likewise.
* gcc.dg/pr14289-3.c: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@79127 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr14289-3.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/pr14289-3.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr14289-3.c b/gcc/testsuite/gcc.dg/pr14289-3.c new file mode 100644 index 00000000000..7cfbf78ce05 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr14289-3.c @@ -0,0 +1,12 @@ +/* PR middle-end/14289 */ +/* { dg-do compile { target i?86-*-* } } */ +/* { dg-options "-O0" } */ + +extern register int a[2] asm("ebx"); /* { dg-error "multiple storage" } */ + +void Nase(void) +{ + int i=6; + a[i]=5; /* { dg-error "address of global" } */ +} + |