testsuite: Add -Wno-psabi to pr104505.c
[official-gcc.git] / gcc / testsuite / c-c++-common / modref-dse.c
blob5f64e8f4b59427369c2c5bc76fbbd22b24228ab7
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-dse2-details" } */
3 /* { dg-final { scan-tree-dump-not "Deleted dead store" "dse2" } } */
5 struct foo { unsigned long bar; };
7 unsigned y;
9 static int __attribute__ ((__noinline__, __noclone__))
10 wrapped (struct foo *p, int i);
12 static int wrapper (struct foo *p);
14 static int __attribute__ ((__noclone__))
15 wrapper (struct foo *p) {
16 return wrapped (p, 1);
19 static int __attribute__ ((__noinline__, __noclone__))
20 dind (struct foo **pp);
22 int __attribute__ ((__noclone__, __no_reorder__))
23 xfn () {
24 struct foo x = { 0xBADC0FFE };
25 struct foo *p = &x;
26 return dind (&p);
29 static int __attribute__ ((__noinline__, __no_reorder__))
30 wrapped (struct foo *p, int i) {
31 return p->bar + i == y++;
34 static int __attribute__ ((__noinline__, __noclone__, __no_reorder__))
35 dind (struct foo **pp) {
36 wrapper (*pp);
37 return 0;