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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 689 jeremybenn
/* PR middle-end/27945 */
2
/* { dg-do run } */
3
/* { dg-options "" } */
4
 
5
extern int printf (const char *, ...);
6
extern void abort ();
7
 
8
int func(int levels)
9
{
10
  struct bar {
11
    unsigned char       a;
12
    int                 b[levels];
13
  } __attribute__ ((__packed__)) bar;
14
 
15
  struct foo {
16
    unsigned char       a;
17
    int                 b[4];
18
  } __attribute__ ((__packed__)) foo;
19
 
20
  printf("foo %d\n", sizeof(foo));
21
  printf("bar %d\n", sizeof(bar));
22
 
23
  if (sizeof (foo) != sizeof (bar))
24
    abort ();
25
}
26
 
27
int main()
28
{
29
  func(4);
30
  return 0;
31
}

powered by: WebSVN 2.1.0

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