summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/opt/pr23714.C
blob: bf1b4ac5c969b4bf7e2b85bfe7dfea99fb2ed445 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// { dg-do compile }
// { dg-options "-O2 -fnon-call-exceptions" }

void run (void) {
  float stack[1];
  float *sp = stack;
  try
  {
    float value2 = ((float) *(--sp));
    float value1 = ((float) *(--sp));
    *(sp++) = (value1 - value2);
  }
  catch (int *ex)
  {
  }
}