summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr81900.c
blob: 9e4e8f4a7cad6e7e6ea1cf78e366e043a398fb18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* PR/81900 */
/* { dg-do compile } */
/* { dg-skip-if "" { *-*-* } { "-flto" } { "" } } */
/* { dg-options "-fdump-tree-optimized" } */

void Perl_croak() __attribute__((noreturn));
char *Perl_sv_gets();
void __attribute__((returns_twice)) __sigsetjmp ();
void a() {
    __sigsetjmp();
    char *b;
    if ((b = Perl_sv_gets()) == 0)
      Perl_croak("No Perl script found in input\n");
    if (*b == '#')
      __asm__("" : : ""("badbad"));
}

/* Do not elide the test against zero.  */
/* { dg-final { scan-tree-dump " == 0B" "optimized" } } */