aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/cpp/embed-29.c
blob: 0c524ef7abc4769e1d2f8202f2e977eabd10d1cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* PR tree-optimization/118207 */
/* { dg-do compile } */
/* { dg-options "-O2" } */

struct A { unsigned char a; };
struct B { struct A b; };
static const unsigned char c[] = {
#embed __FILE__
};
struct B d;

void
foo ()
{
  const struct B *t = (const struct B *) &c;
  d.b = t->b;
}