Merged trunk at revision 161680 into branch.
[official-gcc.git] / gcc / testsuite / g++.dg / torture / pr44492.C
blob41669241e7e6edb898eb8e6d370b8cf7aba939d1
1 // PR middle-end/44492
2 // { dg-do run }
4 struct T { unsigned long p; };
5 struct S { T a, b, c; unsigned d; };
7 __attribute__((noinline))
8 void
9 bar (const T &x, const T &y)
11   if (x.p != 0x2348 || y.p != 0x2346)
12     __builtin_abort ();
15 __attribute__((noinline))
16 void
17 foo (S &s, T e)
19   unsigned long a = e.p;
20   unsigned long b = s.b.p;
21   __asm__ volatile ("" : : "rm" (a), "rm" (b));
22   bar (e, s.b);
25 int
26 main ()
28   S s = { { 0x2345 }, { 0x2346 }, { 0x2347 }, 6 };
29   T t = { 0x2348 };
30   foo (s, t);