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