From 317a9ac39e4be89ef37112202c1bc2a55280299d Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 11 May 2005 00:33:31 -0700 Subject: re PR c/21502 (small data relocation mismatch) PR c/21502 * c-decl.c (finish_decl): Propagate the completed array type of a global variable into the binding. From-SVN: r99563 --- gcc/testsuite/gcc.dg/redecl-16.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/redecl-16.c (limited to 'gcc/testsuite/gcc.dg/redecl-16.c') diff --git a/gcc/testsuite/gcc.dg/redecl-16.c b/gcc/testsuite/gcc.dg/redecl-16.c new file mode 100644 index 0000000..52941cb --- /dev/null +++ b/gcc/testsuite/gcc.dg/redecl-16.c @@ -0,0 +1,18 @@ +/* PR 21502 */ +/* { dg-do compile } */ +/* { dg-options "" } */ + +typedef int IA[]; +typedef int IA5[5]; +typedef int IA10[10]; +typedef IA *IAP; +typedef IA5 *IA5P; +typedef IA10 *IA10P; +extern IAP a[]; +void +f (void) +{ + extern IA5P a[]; +} +IAP a[] = { 0 }; /* { dg-error "previous definition" } */ +extern IA10P a[]; /* { dg-error "conflicting types" } */ -- cgit v1.1