Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / gcc.dg / pr49243.c
blob78ac226aa2492815b197c073ea27ecc3800c7f5f
1 /* PR tree-optimization/49243 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -Winline" } */
5 extern unsigned long jb[];
6 extern int my_setjmp(unsigned long jb[]) __attribute__((returns_twice));
7 extern int decode(const char*);
9 static inline int wrapper(const char **s_ptr) /* { dg-warning "(inlining failed|function 'wrapper' can never be inlined because it uses setjmp)" } */
11 if (my_setjmp(jb) == 0) {
12 const char *s = *s_ptr;
13 while (decode(s) != 0)
14 *s_ptr = ++s;
15 return 0;
16 } else
17 return -1;
20 void parse(const char *data)
22 const char *s = data;
23 if (!(wrapper(&s) == -1 && (s - data) == 1)) /* { dg-message "called from here" } */
24 __builtin_abort();