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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [vla-15.c] - Blame information for rev 706

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

Line No. Rev Author Line
1 689 jeremybenn
/* Test for VLA size evaluation in sizeof typeof.  */
2
/* Origin: Joseph Myers <joseph@codesourcery.com> */
3
/* { dg-do run } */
4
/* { dg-options "-std=gnu99" } */
5
 
6
#include <stdarg.h>
7
 
8
extern void exit (int);
9
extern void abort (void);
10
 
11
char a[1];
12
 
13
void
14
f1 (void)
15
{
16
  int i = 0;
17
  int j = sizeof (typeof (*(++i, (char (*)[i])a)));
18
  if (i != 1 || j != 1)
19
    abort ();
20
}
21
 
22
int
23
main (void)
24
{
25
  f1 ();
26
  exit (0);
27
}

powered by: WebSVN 2.1.0

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