Debian Codegraph @

gcc/testsuite/gcc.target/s390/target-attribute/tattr-6.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 "-mno-warn-dynamicstack" } */
6
7 #pragma GCC target("warn-dynamicstack")
8 void p1(int s)
9 {
10 char b[s];
11 } /* { dg-warning "uses dynamic stack allocation" } */
12 #pragma GCC reset_options
13
14 #pragma GCC target("no-warn-dynamicstack")
15 void p0(int s)
16 {
17 char b[s];
18 }
19 #pragma GCC reset_options
20
21 __attribute__ ((target("warn-dynamicstack")))
22 void a1(int s)
23 {
24 char b[s];
25 } /* { dg-warning "uses dynamic stack allocation" } */
26
27 __attribute__ ((target("no-warn-dynamicstack")))
28 void a0(int s)
29 {
30 char b[s];
31 }
32
33 void d(int s)
34 {
35 char b[s];
36 }