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>. */
5 /* { dg-options "-fobjc-exceptions -O2" } */
6 /* { dg-xfail-if "PR23616" { "*-*-*" } { "*" } { "" } } */
9 #include <objc/Object.h>
13 int gi1 = 9, gi2 = 19;
14 float gf1 = 9.0, gf2 = 19.0;
17 void foo (int arg1, float *arg2)
22 int local1 = 45, local2 = 47;
23 float local3 = 3.0, local4 = 4.0;
24 register int local5 = 15;
25 static float local6 = 16.0;
36 obj2 = obj1 = [Object new];
42 @catch (Object *obj) {
43 if (local1 != 123 || local2 != 345 || local3 != 5.0
44 || local4 != 6.0 || local5 != 17 || local6 != 18.0) {
48 if (pi != &gi2 || pf != &gf2) {
52 if (!obj1 || obj1 != obj2) {
56 if (arg1 != 17 || arg2 != &gf2) {