Forbid arrays of function-type and structures with function-typed fields.
[llvm/avr.git] / test / FrontendC++ / 2003-11-29-DuplicatedCleanupTest.cpp
blob8df95cb1ee60756f459a2b05cc5549ff2f4167b3
1 // RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
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; }