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/] [declspec-7.c] - Diff between revs 298 and 384

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 298 Rev 384
/* Test declaration specifiers.  Test checks on storage class
/* Test declaration specifiers.  Test checks on storage class
   specifiers that can be made at parse time rather than for each
   specifiers that can be made at parse time rather than for each
   declarator.  Note that __thread is tested in
   declarator.  Note that __thread is tested in
   gcc.dg/tls/diag-*.c.  */
   gcc.dg/tls/diag-*.c.  */
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */
/* { dg-do compile } */
/* { dg-do compile } */
/* { dg-options "" } */
/* { dg-options "" } */
 
 
/* Duplicate specifiers.  */
/* Duplicate specifiers.  */
 
 
inline inline void f0 (void),
inline inline void f0 (void),
  f1 (void);
  f1 (void);
 
 
static static int a, /* { dg-error "duplicate 'static'" } */
static static int a, /* { dg-error "duplicate 'static'" } */
  b;
  b;
 
 
extern extern int c, /* { dg-error "duplicate 'extern'" } */
extern extern int c, /* { dg-error "duplicate 'extern'" } */
  d;
  d;
 
 
typedef typedef int e, /* { dg-error "duplicate 'typedef'" } */
typedef typedef int e, /* { dg-error "duplicate 'typedef'" } */
  f;
  f;
 
 
void
void
h (void)
h (void)
{
{
  auto auto int p, /* { dg-error "duplicate 'auto'" } */
  auto auto int p, /* { dg-error "duplicate 'auto'" } */
    q;
    q;
 
 
  register register int r, /* { dg-error "duplicate 'register'" } */
  register register int r, /* { dg-error "duplicate 'register'" } */
    s;
    s;
}
}
 
 
/* Multiple specifiers.  */
/* Multiple specifiers.  */
 
 
static extern int x, /* { dg-error "multiple storage classes in declaration specifiers" } */
static extern int x, /* { dg-error "multiple storage classes in declaration specifiers" } */
  y;
  y;
 
 
extern typedef long z, /* { dg-error "multiple storage classes in declaration specifiers" } */
extern typedef long z, /* { dg-error "multiple storage classes in declaration specifiers" } */
  w;
  w;
 
 

powered by: WebSVN 2.1.0

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