Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGenCXX / 2003-11-29-DuplicatedCleanupTest.cpp
blob45325bc65c613c8d57b2216ace4baaf6e3bd530f
1 // RUN: %clang_cc1 -emit-llvm %s -o -
4 void doesntThrow() throw();
5 struct F {
6 ~F() { doesntThrow(); }
7 };
9 void atest() {
10 F A;
11 lab:
12 F B;
13 goto lab;
16 void test(int val) {
17 label: {
18 F A;
19 F B;
20 if (val == 0) goto label;
21 if (val == 1) goto label;
25 void test3(int val) {
26 label: {
27 F A;
28 F B;
29 if (val == 0) { doesntThrow(); goto label; }
30 if (val == 1) { doesntThrow(); goto label; }
34 void test4(int val) {
35 label: {
36 F A;
37 F B;
38 if (val == 0) { F C; goto label; }
39 if (val == 1) { F D; goto label; }