aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/obj-c++.dg/try-catch-17.mm
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/obj-c++.dg/try-catch-17.mm')
-rw-r--r--gcc-4.9/gcc/testsuite/obj-c++.dg/try-catch-17.mm18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/obj-c++.dg/try-catch-17.mm b/gcc-4.9/gcc/testsuite/obj-c++.dg/try-catch-17.mm
new file mode 100644
index 000000000..7c642aca0
--- /dev/null
+++ b/gcc-4.9/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;
+}