summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.mike/eh52.C
blob: 18b477c098b955d568dbaff0aadeba2744e9f4c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// { dg-do run  }
// { dg-options "-fexceptions -O9" }

int promote_mode (int mode, int *punsignedp)
{
  int unsignedp = *punsignedp;
  *punsignedp = unsignedp;
  return mode;
}

int main() {
  int i;
  i = promote_mode (42, &i);
  return i != 42;
}