view gcc/testsuite/gcc.dg/redecl-6.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* Test for multiple declarations and composite types.  As in bug
   13801.  Illustrates how bug causes correct code to be wrongly
   diagnosed.  */
/* 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;
  }
}