Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / gcc.dg / pr103961.c
blob2cd52884e3bfdb81bd41da5e33f94073cfcef0ce
1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
4 extern void abort ();
6 extern inline __attribute__ ((__gnu_inline__)) int
7 sprintf (char *restrict s, const char *restrict fmt, ...)
9 return __builtin___sprintf_chk (s, 1, __builtin_object_size (s, 1),
10 fmt, __builtin_va_arg_pack ());
13 void
14 cap_to_text (int c)
16 char buf[1572];
17 char *p;
18 int n, t;
19 p = 20 + buf;
20 for (t = 8; t--; )
22 for (n = 0; n < c; n++)
23 p += sprintf (p, "a,");
24 p--;
25 if (__builtin_object_size (p, 1) == 0)
26 abort ();
30 /* { dg-final { scan-assembler-not "abort" } } */