Debian Codegraph @

gcc/testsuite/g++.dg/asan/pr78651.C

raw
1 // PR sanitizer/78651
2 // { dg-do run }
3 // { dg-additional-options "-fpic" { target fpic } }
4
5 struct A { };
6
7 namespace {
8
9 void thisThrows () {
10 throw A();
11 }
12
13 struct SomeRandomType {};
14 }
15
16 int main() {
17 try {
18 thisThrows();
19 }
20 catch (SomeRandomType) {
21 throw;
22 }
23 catch (A) {
24 }
25 return 0;
26 }