strub: enable conditional support
[official-gcc.git] / gcc / testsuite / g++.dg / torture / strub-init2.C
blob8f4849c7fde78d2cfbde2f12091c7e45a11e2a97
1 /* { dg-do compile } */
2 /* { dg-options "-fstrub=strict -fdump-ipa-strub" } */
3 // { dg-require-effective-target strub }
5 extern int __attribute__((__strub__)) initializer ();
7 static int x = initializer ();
9 int f() {
10   return x;
13 /* { dg-final { scan-ipa-dump "strub_enter" "strub" } } */
14 /* { dg-final { scan-ipa-dump "strub_leave" "strub" } } */
15 /* { dg-final { scan-ipa-dump-not "strub_update" "strub" } } */