aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/torture/strub-data5.c
blob: 0a5edac414df1a63d6e58c4fee5babf8fa41f950 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* { dg-do compile } */
/* { dg-options "-fstrub=strict" } */
/* { dg-require-effective-target strub } */

/* It would be desirable to issue at least warnings for these.  */

typedef int __attribute__ ((__strub__)) strub_int;
strub_int *ptr;

int *f () {
  return ptr; /* { dg-message "incompatible|invalid conversion" } */
}

strub_int *g () {
  return f (); /* { dg-message "incompatible|invalid conversion" } */
}