aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/s390/target-attribute/tattr-7.c
blob: 906979e9868421a91226806d9f8dbdf5b0e2c6a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/* Functional tests for the "target" attribute and pragma.  */

/* { dg-do compile } */
/* { dg-require-effective-target target_attribute } */
/* { dg-options "-mwarn-framesize=0" } */

#pragma GCC target("warn-framesize=1024")
void p1(void)
{
  char b[1025];
} /* { dg-warning "frame size" } */
#pragma GCC reset_options

#pragma GCC target("warn-framesize=0")
void p0(void)
{
  char b[1025];
}
#pragma GCC reset_options

__attribute__ ((target("warn-framesize=1024")))
void a1(void)
{
  char b[1025];
} /* { dg-warning "frame size" } */

__attribute__ ((target("warn-framesize=0")))
void a0(void)
{
  char b[1025];
}

void d(void)
{
  char b[1025];
}