Debian Codegraph @

gcc/testsuite/c-c++-common/torture/strub-const3.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-fstrub=strict -fdump-ipa-strub" } */
3 /* { dg-require-effective-target strub } */
4
5 /* Check that, along with a strub const wrapping call, we issue an asm statement
6 to make sure the watermark passed to it is held in memory before the call,
7 and another to make sure it is not assumed to be unchanged. */
8
9 extern int __attribute__ ((__strub__ ("callable"),
10 __const__, __nothrow__)) c ();
11
12 int __attribute__ ((__strub__ ("internal"), __const__))
13 f () {
14 return c ();
15 }
16
17 /* { dg-final { scan-ipa-dump-times "__asm__" 2 "strub" } } */