aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/powerpc/pr102059-1.c
blob: b969c4c4750a6b8632899397c204ea1da1a4e8fb (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 } */
/* -Wno-attributes suppresses always_inline warnings.  */
/* { dg-options "-O2 -mdejagnu-cpu=power8 -Wno-attributes" } */

/* Verify the reduced case from PR102059 won't fail.  */

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

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