summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/eh/080514-1.C
blob: dafa32503c55981daacfd2ec496b9e7d03cb19ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// This used to fail on s390 due to cse removing an insn with a
// REG_EH_REGION without deleting the EH edge.
// { dg-do compile }
// { dg-options "-O2 -fnon-call-exceptions" }

void
run (int m, double d)
{
  int stack[m];
  int *sp = stack;

  if (d == 1.0)
    *(sp++) = (0);
  else if (d < 1.0)
    *(sp++) = (-1);
}