/* { dg-do run } */ /* { dg-options "-O -fno-tree-fre" } */ extern void abort (void); typedef __UINTPTR_TYPE__ uintptr_t; struct S { uintptr_t a; int i; }; static void __attribute__((noclone, noinline)) foo (struct S s) { if (!s.a) abort (); } int i; static void f1 (void) { struct S s1 = { (uintptr_t) &i, 1 }; foo (s1); } static void f2 (void) { struct S s2 = { (uintptr_t) &i, 1 }; foo (s2); } int main (void) { f1 (); f2 (); return 0; }