1// { dg-do run { xfail sparc64-*-elf arm-*-pe } }
2// { dg-options "-fexceptions" }
3
4extern "C" int printf(const char *, ...);
5
6int i;
7
8int main() {
9  try {
10    try {
11      throw i;
12    } catch (char *) {
13      return 1;
14    }
15    return 1;
16  } catch (int i) {
17    return 0;
18  }
19  return 1;
20}
21