diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/eh/goto2.C')
-rw-r--r-- | gcc/testsuite/g++.dg/eh/goto2.C | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/eh/goto2.C b/gcc/testsuite/g++.dg/eh/goto2.C new file mode 100644 index 00000000000..de06d50b6e3 --- /dev/null +++ b/gcc/testsuite/g++.dg/eh/goto2.C @@ -0,0 +1,12 @@ +// PR c++/32080 + +void f() +try + { + goto l2; // { dg-error "from here" } + l1: ; // { dg-error "jump to label 'l1'" } + } catch (...) + { + l2: ; // { dg-error "jump to label 'l2'|enters catch block" } + goto l1; // { dg-error "from here|enters try block" } + } |