OSDN Git Service

* gcc.gd/struct/wo_prof_global_var.c: Use uninitialized integer
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / pr36998.c
1 /* PR rtl-optimization/36998 */
2 /* { dg-do compile } */
3 /* { dg-options "-Os -fasynchronous-unwind-tables" } */
4 /* { dg-options "-Os -mpreferred-stack-boundary=2 -fasynchronous-unwind-tables" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
5
6 void foo (const char *, ...) __attribute__ ((noreturn));
7 int bar (const char *, ...);
8 extern __SIZE_TYPE__ strlen (const char *);
9 int baz (char *, char *, int, void *);
10
11 void
12 test (char *w, int x, char *y, char *z)
13 {
14   char *p, b[32];
15   for (p = y; *p; p += strlen (p) + 1)
16     {
17       baz (w, p, x, z);
18       foo ("msg1 %s", b);
19     }
20   for (p = y; *p; p += strlen (p) + 1)
21     bar (" %s", p);
22   foo ("msg2 %s", b);
23 }