]>
git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/c-c++-common/strub-unsupported.c
1 /* { dg-do compile } */
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. */
7 void __attribute__ ((__strub__
))
8 f (void) {} /* { dg-message "not eligible|requested" "" { target { ! strub } } } */
10 void __attribute__ ((__strub__ ("internal")))
11 g (void) {} /* { dg-message "not eligible|requested" "" { target { ! strub } } } */
13 /* This only gets an error when called, see strub-unsupported-2.c. */
14 void __attribute__ ((__strub__ ("at-calls"))) (*p
) (void);
16 /* These too, see strub-unsupported-3.c. */
17 extern void __attribute__ ((__strub__
))
20 extern void __attribute__ ((__strub__ ("internal")))