summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/debug/redecl-2.c
blob: 2bf661fdcf0f479600e70604ab6e61a98471e2a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* Test for multiple declarations and composite types.  As in bug
   13801.  Illustrates how bug causes correct code to be wrongly
   diagnosed.  Debug test: avoid ICE.  */
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */
/* { dg-do compile } */
/* { dg-options "" } */

typedef int IA[];
typedef int A5[5];
typedef int A10[10];

A10 array10;

A5 *ap;
void
f (void)
{
  int ap;
  {
    extern IA *ap;
    /* This assignment is valid.  */
    ap = &array10;
  }
}