1 // PR middle-end/44492
2 // { dg-do run }
3
4 struct T { unsigned long p; };
5 struct S { T a, b, c; unsigned d; };
6
7 __attribute__((noinline))
8 void
bar(const T & x,const T & y)9 bar (const T &x, const T &y)
10 {
11 if (x.p != 0x2348 || y.p != 0x2346)
12 __builtin_abort ();
13 }
14
15 __attribute__((noinline))
16 void
foo(S & s,T e)17 foo (S &s, T e)
18 {
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);
23 }
24
25 int
main()26 main ()
27 {
28 S s = { { 0x2345 }, { 0x2346 }, { 0x2347 }, 6 };
29 T t = { 0x2348 };
30 foo (s, t);
31 }
32