Debian Codegraph @

gcc/testsuite/c-c++-common/strub-unsupported.c

raw
1 /* { dg-do compile } */
2
3 /* Check that, when strub is not supported (so no dg-required-effective-target
4 strub above), we report when strub functions are defined, and when they're
5 called in ways that would require changes. */
6
7 void __attribute__ ((__strub__))
8 f (void) {} /* { dg-message "not eligible|requested" "" { target { ! strub } } } */
9
10 void __attribute__ ((__strub__ ("internal")))
11 g (void) {} /* { dg-message "not eligible|requested" "" { target { ! strub } } } */
12
13 /* This only gets an error when called, see strub-unsupported-2.c. */
14 void __attribute__ ((__strub__ ("at-calls"))) (*p) (void);
15
16 /* These too, see strub-unsupported-3.c. */
17 extern void __attribute__ ((__strub__))
18 s (void);
19
20 extern void __attribute__ ((__strub__ ("internal")))
21 t (void);