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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [vla-8.c] - Blame information for rev 455

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

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do compile  } */
2
/* { dg-options "-std=c99 -pedantic-errors" } */
3
/* Radar 4336222 */
4
 
5
int a;
6
struct s { void (*f)(int (*)[a]); };
7
 
8
static int i;
9
static int new_i() { i++; return i; }
10
static int bar1(int a[new_i()][new_i()]);
11
 
12
void foo(int n) {
13
  extern void bar(int i[n][n]);                 /* Since this isn't a VM type ensure we can have linkage.  */
14
  extern int bar1(int a[new_i()][new_i()]);     /* Since this isn't a VM type ensure we can have linkage.  */
15
}
16
 
17
void foo1(int n) {
18
  goto A;
19
  void bar(int i[n][n]);                        /* Not a VM type, as VM arguments don't matter. */
20
  int bar1(int a[new_i()][new_i()]);            /* Not a VM type, as VM arguments don't matter. */
21
 A:
22
  ;
23
}
24
 
25
void foo2(int n) {
26
  goto A;               /* { dg-error "jump into scope of identifier with variably modified type" } */
27
  int (*(*bar2)(void))[n];
28
 A:
29
  ;
30
}

powered by: WebSVN 2.1.0

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