aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/powerpc/pr115713-2.c
blob: 47b39c0fabaff58505400f42e38e94b09d3186f5 (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 } */
/* Force power7 to avoid possible error message on AltiVec ABI change.  */
/* { dg-options "-mdejagnu-cpu=power7" } */

/* Verify there is an error message for -mvsx incompatible with
   -mavoid-indexed-addresses even when they are specified by
   target attributes.  */

int __attribute__ ((target ("avoid-indexed-addresses,vsx")))
test1 (void)
{
  /* { dg-error "'-mvsx' and '-mavoid-indexed-addresses' are incompatible" "" { target *-*-* } .-1 } */
  return 0;
}

int __attribute__ ((target ("vsx,avoid-indexed-addresses")))
test2 (void)
{
  /* { dg-error "'-mvsx' and '-mavoid-indexed-addresses' are incompatible" "" { target *-*-* } .-1 } */
  return 0;
}