aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp/embed-17.C
blob: a3338d433bb633f92161267b7874ff4e2e3f7ca4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// PR c++/118214
// { dg-do run { target c++11 } }
// { dg-options "" }

struct A { int a[256]; };
unsigned char b[] = {
#embed __FILE__ limit (160)
};

void
foo (A a)
{
  for (int i = 0; i < 256; ++i)
    if (a.a[i] != (i < sizeof (b) ? b[i] : 0))
      __builtin_abort ();
}

int
main ()
{
  foo ({
#embed __FILE__ limit (160)
       });
}