aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/strub-unsupported-2.c
blob: 3586f4f679dfee282b96a88b8ba492b2effb8ca5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* { dg-do compile } */

/* Check that, when strub is not supported (so no dg-required-effective-target
   strub above), we report when pointers to strub functions are called.  This
   cannot be part of strub-unsupported.c because errors in the strub-mode pass
   prevent the main strub pass, where errors at calls are detected, from
   running.  */

void __attribute__ ((__strub__ ("at-calls"))) (*p) (void);

void m () {
  p (); /* { dg-message "unsupported" "" { target { ! strub } } } */
}