gcc/testsuite/gcc.target/s390/target-attribute/tattr-1.c
raw| 1 | /* Functional tests for the "target" attribute and pragma. */ |
| 2 | |
| 3 | /* { dg-do compile } */ |
| 4 | /* { dg-require-effective-target target_attribute } */ |
| 5 | /* { dg-options "-O3 -march=zEC12 -mzarch" } */ |
| 6 | |
| 7 | __attribute__ ((target("arch=zEC12"))) |
| 8 | void htm1(void) |
| 9 | { |
| 10 | __builtin_tend(); |
| 11 | } |
| 12 | |
| 13 | __attribute__ ((target("arch=z10"))) |
| 14 | void htm0(void) |
| 15 | { |
| 16 | __builtin_tend(); /* { dg-error "is not supported without '-mhtm'" } */ |
| 17 | } |
| 18 | |
| 19 | void htmd(void) |
| 20 | { |
| 21 | __builtin_tend(); |
| 22 | } |