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

/* At -O0, none of the strub builtins are expanded inline.  */

int __attribute__ ((__strub__)) var;

int f() {
  return var;
}

/* { dg-final { scan-rtl-dump "strub_enter" "expand" } } */
/* { dg-final { scan-rtl-dump "strub_update" "expand" } } */
/* { dg-final { scan-rtl-dump "strub_leave" "expand" } } */