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" { *-*-* } { "*" } { "" } } */
7 /* { dg-prune-output ".*internal compiler error.*" } */
8 /* { dg-options "-fobjc-exceptions -O2" } */
10 #include <objc/Object.h>
14 int gi1 = 9, gi2 = 19;
15 float gf1 = 9.0, gf2 = 19.0;
18 void foo (int arg1, float *arg2)
23 int local1 = 45, local2 = 47;
24 float local3 = 3.0, local4 = 4.0;
25 register int local5 = 15;
26 static float local6 = 16.0;
37 obj2 = obj1 = [Object new];
43 @catch (Object *obj) {
44 if (local1 != 123 || local2 != 345 || local3 != 5.0
45 || local4 != 6.0 || local5 != 17 || local6 != 18.0) {
49 if (pi != &gi2 || pf != &gf2) {
53 if (!obj1 || obj1 != obj2) {
57 if (arg1 != 17 || arg2 != &gf2) {