aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/powerpc/pr102059-2.c
blob: 52e009289f7179ec161694464b01af6a118e5d2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* { dg-do compile } */
/* { dg-options "-O2 -mdejagnu-cpu=power8 -mno-htm" } */

/* Verify target info for inlining still works even if callee
   disables HTM explicitly while caller enables it.  */

static inline int __attribute__ ((always_inline))
foo (int *b)
{
  *b += 10;
  return *b;
}

#pragma GCC target "htm"
int
bar (int *a)
{
  *a = foo (a);
  return 0;
}