strub: enable conditional support
[official-gcc.git] / gcc / testsuite / c-c++-common / strub-unsupported-3.c
blobd6fb4c525c4a6ae6fb676d04e490d37f46b2cfd2
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 that are not defined are
5 called. This cannot be part of strub-unsupported-2.c because errors in the
6 strub-mode pass prevent the main strub pass, where errors at calls are
7 detected, from running. */
9 extern void __attribute__ ((__strub__))
10 s (void); /* { dg-message "not eligible|requested" "" { target { ! strub } } } */
12 extern void __attribute__ ((__strub__ ("internal")))
13 t (void); /* { dg-message "not eligible|requested" "" { target { ! strub } } } */
15 void m () {
16 s ();
17 t ();