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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [vla-6.c] - Blame information for rev 149

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

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-options "-std=c99 -pedantic-errors" } */
2
 
3
int a[*];                       /* { dg-error "not allowed in other than function prototype scope" } */
4
void foo1() { int a[*]; }       /* { dg-error "not allowed in other than function prototype scope" } */
5
void foo2() { int a[*]; }       /* { dg-error "not allowed in other than function prototype scope" } */
6
int foo3(int i)[*];             /* { dg-error "not allowed in other than function prototype scope" } */
7
void foo4(int o[*][4]) { }      /* { dg-error "not allowed in other than function prototype scope" } */
8
void foo5(int o[4][*]) { }      /* { dg-error "not allowed in other than function prototype scope" } */
9
 
10
/* [*] can't be used in a type that's not a declaration */
11
void foo11(int x[sizeof(int (*)[*])]);  /* { dg-error "not allowed in other than a declaration" } */
12
void foo12(int [*]);            /* { dg-error "not allowed in other than a declaration" } */
13
 
14
extern int n;
15
int B[100];
16
void foo10(int m) {
17
  typedef int (*vla)[m];
18
  struct tag {
19
    vla x;                      /* { dg-error "a member of a structure or union cannot have a variably modified type" } */
20
    /* PR c/7948 */
21
    int (*y)[n];                /* { dg-error "a member of a structure or union cannot have a variably modified type" } */
22
    int z[n];                   /* { dg-error "a member of a structure or union cannot have a variably modified type" } */
23
  };
24
  /* PR c/25802 */
25
  extern int (*r)[m];           /* { dg-error "variably modified type must have no linkage" } */
26
}

powered by: WebSVN 2.1.0

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