libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / pr94516.c
blobb1b68ce57741ba2d7277e784d5ee6e7849c97f70
1 /* PR rtl-optimization/94516 */
2 /* { dg-do run } */
3 /* { dg-additional-options "-fpie" { target pie } } */
5 struct S { unsigned char *a; unsigned int b; };
6 typedef int V __attribute__((vector_size (sizeof (int) * 4)));
8 __attribute__((noipa)) void
9 foo (const char *a, const char *b, const char *c, const struct S *d, int e, int f, int g, int h, int i)
11 V v = { 1, 2, 3, 4 };
12 asm volatile ("" : : "g" (&v) : "memory");
13 v += (V) { 5, 6, 7, 8 };
14 asm volatile ("" : : "g" (&v) : "memory");
17 __attribute__((noipa)) void
18 bar (void)
20 const struct S s = { "foobarbaz", 9 };
21 foo ("foo", (const char *) 0, "corge", &s, 0, 1, 0, -12, -31);
22 foo ("bar", "quux", "qux", &s, 0, 0, 9, 0, 0);
23 foo ("baz", (const char *) 0, "qux", &s, 1, 0, 0, -12, -32);
26 int
27 main ()
29 bar ();
30 return 0;