OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [redecl-10.c] - Blame information for rev 313

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* Test for multiple declarations and composite types.  Check we don't
2
   ICE with nested initializers.  */
3
 
4
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */
5
/* { dg-do compile } */
6
/* { dg-options "-g" } */
7
 
8
static int w[];
9
void
10
f (void)
11
{
12
  extern int w[] = { 1, 2 }; /* { dg-error "has both" } */
13
}
14
 
15
int x[]; /* { dg-warning "array 'x' assumed to have one element" } */
16
void
17
g (void)
18
{
19
  extern int x[] = { 3, 4, 5 }; /* { dg-error "has both" } */
20
}
21
 
22
static int y[];
23
void
24
h (void)
25
{
26
  extern int y[] = { 6 }; /* { dg-error "has both" } */
27
}
28
 
29
int z[]; /* { dg-warning "array 'z' assumed to have one element" } */
30
void
31
i (void)
32
{
33
  extern int z[] = { 7 }; /* { dg-error "has both" } */
34
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.