[llvm-commits] [llvm-gcc-4.2] r105945 - /llvm-gcc-4.2/trunk/gcc/testsuite/gcc.apple/block-bad-ivar-access.c
Stuart Hastings
stuart at apple.com
Mon Jun 14 11:31:33 PDT 2010
Author: stuart
Date: Mon Jun 14 13:31:33 2010
New Revision: 105945
URL: http://llvm.org/viewvc/llvm-project?rev=105945&view=rev
Log:
Commit a mislaid test case for Radar 7901648.
Added:
llvm-gcc-4.2/trunk/gcc/testsuite/gcc.apple/block-bad-ivar-access.c
Added: llvm-gcc-4.2/trunk/gcc/testsuite/gcc.apple/block-bad-ivar-access.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/testsuite/gcc.apple/block-bad-ivar-access.c?rev=105945&view=auto
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/testsuite/gcc.apple/block-bad-ivar-access.c (added)
+++ llvm-gcc-4.2/trunk/gcc/testsuite/gcc.apple/block-bad-ivar-access.c Mon Jun 14 13:31:33 2010
@@ -0,0 +1,23 @@
+/* APPLE LOCAL file 7901648 */
+/* { dg-do compile } */
+/* { dg-options "-mmacosx-version-min=10.5 -ObjC -fblocks" } */
+
+
+ at interface Foo {
+ int x;
+ int y;
+}
+ at end
+
+void fee(int);
+
+ at implementation Foo
++ (int)method {
+ ^{ x = 1; /* { dg-error "instance variable \\'x\\' accessed in class method" } */
+ x = /* { dg-error "instance variable \\'x\\' accessed in class method" } */
+ y+1; /* { dg-error "instance variable \\'y\\' accessed in class method" } */
+ fee(x); /* { dg-error "instance variable \\'x\\' accessed in class method" } */
+ return x; }; /* { dg-error "instance variable \\'x\\' accessed in class method" } */
+}
+ at end
+
More information about the llvm-commits
mailing list