1aeac10e7b074d87522ccc5fad919417092971c57Eric Christopher// RUN: %clang_cc1 -emit-llvm %s -o - 2aeac10e7b074d87522ccc5fad919417092971c57Eric Christopher 3aeac10e7b074d87522ccc5fad919417092971c57Eric Christopher 4aeac10e7b074d87522ccc5fad919417092971c57Eric Christophervoid doesntThrow() throw(); 5aeac10e7b074d87522ccc5fad919417092971c57Eric Christopherstruct F { 6aeac10e7b074d87522ccc5fad919417092971c57Eric Christopher ~F() { doesntThrow(); } 7aeac10e7b074d87522ccc5fad919417092971c57Eric Christopher}; 8aeac10e7b074d87522ccc5fad919417092971c57Eric Christopher 9aeac10e7b074d87522ccc5fad919417092971c57Eric Christophervoid atest() { 10aeac10e7b074d87522ccc5fad919417092971c57Eric Christopher F A; 11aeac10e7b074d87522ccc5fad919417092971c57Eric Christopherlab: 12aeac10e7b074d87522ccc5fad919417092971c57Eric Christopher F B; 13aeac10e7b074d87522ccc5fad919417092971c57Eric Christopher goto lab; 14aeac10e7b074d87522ccc5fad919417092971c57Eric Christopher} 15aeac10e7b074d87522ccc5fad919417092971c57Eric Christopher 16aeac10e7b074d87522ccc5fad919417092971c57Eric Christophervoid test(int val) { 17aeac10e7b074d87522ccc5fad919417092971c57Eric Christopherlabel: { 18aeac10e7b074d87522ccc5fad919417092971c57Eric Christopher F A; 19aeac10e7b074d87522ccc5fad919417092971c57Eric Christopher F B; 20aeac10e7b074d87522ccc5fad919417092971c57Eric Christopher if (val == 0) goto label; 21aeac10e7b074d87522ccc5fad919417092971c57Eric Christopher if (val == 1) goto label; 22aeac10e7b074d87522ccc5fad919417092971c57Eric Christopher} 23aeac10e7b074d87522ccc5fad919417092971c57Eric Christopher} 24aeac10e7b074d87522ccc5fad919417092971c57Eric Christopher 25aeac10e7b074d87522ccc5fad919417092971c57Eric Christophervoid test3(int val) { 26aeac10e7b074d87522ccc5fad919417092971c57Eric Christopherlabel: { 27aeac10e7b074d87522ccc5fad919417092971c57Eric Christopher F A; 28aeac10e7b074d87522ccc5fad919417092971c57Eric Christopher F B; 29aeac10e7b074d87522ccc5fad919417092971c57Eric Christopher if (val == 0) { doesntThrow(); goto label; } 30aeac10e7b074d87522ccc5fad919417092971c57Eric Christopher if (val == 1) { doesntThrow(); goto label; } 31aeac10e7b074d87522ccc5fad919417092971c57Eric Christopher} 32aeac10e7b074d87522ccc5fad919417092971c57Eric Christopher} 33aeac10e7b074d87522ccc5fad919417092971c57Eric Christopher 34aeac10e7b074d87522ccc5fad919417092971c57Eric Christophervoid test4(int val) { 35aeac10e7b074d87522ccc5fad919417092971c57Eric Christopherlabel: { 36aeac10e7b074d87522ccc5fad919417092971c57Eric Christopher F A; 37aeac10e7b074d87522ccc5fad919417092971c57Eric Christopher F B; 38aeac10e7b074d87522ccc5fad919417092971c57Eric Christopher if (val == 0) { F C; goto label; } 39aeac10e7b074d87522ccc5fad919417092971c57Eric Christopher if (val == 1) { F D; goto label; } 40aeac10e7b074d87522ccc5fad919417092971c57Eric Christopher} 41aeac10e7b074d87522ccc5fad919417092971c57Eric Christopher} 42