summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/20001108-1.c
blob: 682257fdb0951c90096aa9db32939b032f7f1168 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* { dg-do run } */
/* { dg-options "-O2 -fomit-frame-pointer" } */

extern void abort (void);
extern void exit (int);

void die (long) __attribute__ ((noreturn));

void die (long e)
{
  abort ();
  for (;;);
}

long foo (double i)
{
  if (i != 2.0)
    abort ();
  return 26;
}

long bar (long i, double x)
{
  if (x < 0) die (1);
  return foo (x);
}

main()
{
  if (bar (0, 2.0) != 26)
    abort ();
  exit (0);
}