aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/strub-apply4.c
blob: e82504728b2c6b0c2071055262383580bda85200 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* { dg-do compile } */
/* { dg-options "-O2 -fstrub=strict -fdump-ipa-strubm" } */
/* { dg-require-effective-target strub } */

/* Check that implicit enabling of strub mode selects internal strub when the
   function uses __builtin_apply_args, that prevents the optimization to
   at-calls mode.  */

int __attribute__ ((__strub__)) var;

static inline void
apply_args (int i, int j, double d)
{
  var++;
  __builtin_apply_args ();
}

void f() {
  apply_args (1, 2, 3);
}

/* { dg-final { scan-ipa-dump-times "strub \[(\]internal\[)\]" 1 "strubm" } } */