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

/* The pointer itself is a strub variable, enabling internal strubbing when
   its value is used.  */
int __attribute__ ((__strub__)) *ptr;

int *f() {
  return ptr;
}

/* { dg-final { scan-ipa-dump "strub_enter" "strub" } } */
/* { dg-final { scan-ipa-dump "strub_leave" "strub" } } */
/* { dg-final { scan-ipa-dump "strub_update" "strub" } } */