aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/nvptx/trailing-init.c
blob: 470ac0059d3c56a3861b5db582dd54cca6dff4e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* { dg-do compile } */
/* { dg-additional-options "-Wno-pedantic" } */

struct trailing 
{
  unsigned m;
  short ary[];
} trailing = 
  {.ary = {1}};

struct packed 
{
  unsigned m;
  short ary[];
} __attribute__ ((packed)) packed = 
  {.ary = {2}};

/*  { dg-final { scan-assembler ".align 1 .u32 packed\\\[2\\\] = { 0, 2 };" } } */
/*  { dg-final { scan-assembler ".align 4 .u32 trailing\\\[2\\\] = { 0, 1 };" } } */