1 /* Check that local variables that get modified inside the @try
2 block survive until the @catch block is reached. */
3 /* Developed by Ziemowit Laski <zlaski@apple.com>. */
6 /* { dg-xfail-if "PR23616" { *-*-* } { "-fgnu-runtime" } { "-fnext-runtime" } } */
7 /* { dg-xfail-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" "-fgnu-runtime" } { "" } }
8 /* { dg-prune-output ".*internal compiler error.*" } */
9 /* { dg-options "-fobjc-exceptions -O2" } */
11 #include "../objc-obj-c++-shared/Object1.h"
15 int gi1 = 9, gi2 = 19;
16 float gf1 = 9.0, gf2 = 19.0;
19 void foo (int arg1, float *arg2)
24 int local1 = 45, local2 = 47;
25 float local3 = 3.0, local4 = 4.0;
26 register int local5 = 15;
27 static float local6 = 16.0;
38 obj2 = obj1 = [Object new];
44 @catch (Object *obj) {
45 if (local1 != 123 || local2 != 345 || local3 != 5.0
46 || local4 != 6.0 || local5 != 17 || local6 != 18.0) {
50 if (pi != &gi2 || pf != &gf2) {
54 if (!obj1 || obj1 != obj2) {
58 if (arg1 != 17 || arg2 != &gf2) {
69 #include "../objc-obj-c++-shared/Object1-implementation.h"