1 /* Functional tests for the "target" attribute and pragma. */
3 /* { dg-do compile } */
4 /* { dg-require-effective-target target_attribute } */
5 /* { dg-options "-mno-warn-dynamicstack" } */
7 #pragma GCC target("warn-dynamicstack")
11 } /* { dg-warning "uses dynamic stack allocation" } */
12 #pragma GCC reset_options
14 #pragma GCC target("no-warn-dynamicstack")
19 #pragma GCC reset_options
21 __attribute__ ((target("warn-dynamicstack")))
25 } /* { dg-warning "uses dynamic stack allocation" } */
27 __attribute__ ((target("no-warn-dynamicstack")))