OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gcc.dg/] [redecl-10.c] - Diff between revs 298 and 384

Only display areas with differences | Details | Blame | View Log

Rev 298 Rev 384
/* Test for multiple declarations and composite types.  Check we don't
/* Test for multiple declarations and composite types.  Check we don't
   ICE with nested initializers.  */
   ICE with nested initializers.  */
 
 
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */
/* { dg-do compile } */
/* { dg-do compile } */
/* { dg-options "-g" } */
/* { dg-options "-g" } */
 
 
static int w[];
static int w[];
void
void
f (void)
f (void)
{
{
  extern int w[] = { 1, 2 }; /* { dg-error "has both" } */
  extern int w[] = { 1, 2 }; /* { dg-error "has both" } */
}
}
 
 
int x[]; /* { dg-warning "array 'x' assumed to have one element" } */
int x[]; /* { dg-warning "array 'x' assumed to have one element" } */
void
void
g (void)
g (void)
{
{
  extern int x[] = { 3, 4, 5 }; /* { dg-error "has both" } */
  extern int x[] = { 3, 4, 5 }; /* { dg-error "has both" } */
}
}
 
 
static int y[];
static int y[];
void
void
h (void)
h (void)
{
{
  extern int y[] = { 6 }; /* { dg-error "has both" } */
  extern int y[] = { 6 }; /* { dg-error "has both" } */
}
}
 
 
int z[]; /* { dg-warning "array 'z' assumed to have one element" } */
int z[]; /* { dg-warning "array 'z' assumed to have one element" } */
void
void
i (void)
i (void)
{
{
  extern int z[] = { 7 }; /* { dg-error "has both" } */
  extern int z[] = { 7 }; /* { dg-error "has both" } */
}
}
 
 

powered by: WebSVN 2.1.0

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