diff options
Diffstat (limited to 'gcc/testsuite/obj-c++.dg/try-catch-17.mm')
-rw-r--r-- | gcc/testsuite/obj-c++.dg/try-catch-17.mm | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/obj-c++.dg/try-catch-17.mm b/gcc/testsuite/obj-c++.dg/try-catch-17.mm new file mode 100644 index 000000000..7c642aca0 --- /dev/null +++ b/gcc/testsuite/obj-c++.dg/try-catch-17.mm @@ -0,0 +1,18 @@ +/* Test if addition of 'volatile' to object causes bogus error in presence of try-catch. */ +/* { dg-options "-fobjc-exceptions" } */ +/* { dg-do compile } */ + +struct Point { + short v; + short h; +}; + +void foo () +{ + Point eventLocation; + @try { + } @catch (id iiii) { + } + + Point p = eventLocation; +} |