summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/20001108-1.c
blob: a21d5b0f98f292064cf2c69a5486ec1df96e2dd9 (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
/* { dg-do run } */
/* { dg-options "-O2 -fomit-frame-pointer" } */

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);
}