Debian Codegraph @

gcc/testsuite/gcc.dg/torture/stackalign/alloca-6.c

raw
1 /* PR middle-end/45234 */
2 /* { dg-do run { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
3 /* { dg-additional-options "-mincoming-stack-boundary=2 -mpreferred-stack-boundary=2" } */
4
5 #include "check.h"
6
7 void
8 __attribute__ ((noinline))
9 bar (__float128 f)
10 {
11 check (&f, __alignof__(f));
12 }
13
14 volatile int z = 6;
15
16 int
17 main (void)
18 {
19 char *p = __builtin_alloca (z);
20
21 bar (0);
22
23 __builtin_strncpy (p, "good", 5);
24 if (__builtin_strncmp (p, "good", 5) != 0)
25 {
26 #ifdef DEBUG
27 p[z - 1] = '\0';
28 printf ("Failed: %s != good\n", p);
29 #endif
30 abort ();
31 }
32
33 return 0;
34 }