<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">You changed the makefile to expect the executable to fail, but it's failing to compile with llvm-gcc (<span class="Apple-style-span" style="font-family: Helvetica, sans-serif; font-size: 12px; "><a href="http://llvm.org/perf/db_default/simple/nts/149/">http://llvm.org/perf/db_default/simple/nts/149/</a>):</span><div><br></div><div><div>/nightly/src/test-suite/SingleSource/UnitTests/ObjC++/property-reference-object.mm: In function ?~@~Xobjc_object* -[TNSObject init](TNSObject*, objc_selector*)?~@~Y:</div><div>/nightly/src/test-suite/SingleSource/UnitTests/ObjC++/property-reference-object.mm:74: error: setting a C++ non-POD object value is not implemented - assign the value to a temporary and use the temporary.</div><div>/nightly/src/test-suite/SingleSource/UnitTests/ObjC++/property-reference-object.mm:75: error: setting a C++ non-POD object value is not implemented - assign the value to a temporary and use the temporary.</div><div>/nightly/src/test-suite/SingleSource/UnitTests/ObjC++/property-reference-object.mm:76: error: setting a C++ non-POD object value is not implemented - assign the value to a temporary and use the temporary.</div><div><br></div><div>Can you change it to skip this test altogether for llvm-gcc?</div><div><br></div><div><div>On Mar 28, 2011, at 4:48 PM, Fariborz Jahanian wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Author: fjahanian<br>Date: Mon Mar 28 18:48:25 2011<br>New Revision: 128436<br><br>URL: <a href="http://llvm.org/viewvc/llvm-project?rev=128436&view=rev">http://llvm.org/viewvc/llvm-project?rev=128436&view=rev</a><br>Log:<br>This is test for clang's // <a href="rdar://9070460.">rdar://9070460.</a><br>I have modified the Makefile so test is skipped <br>for llvm-gcc (which does not fully support this feature).<br><br><br>Added:<br>    test-suite/trunk/SingleSource/UnitTests/ObjC++/property-reference-object.mm<br>    test-suite/trunk/SingleSource/UnitTests/ObjC++/property-reference-object.reference_output<br>Modified:<br>    test-suite/trunk/SingleSource/UnitTests/ObjC++/Makefile<br><br>Modified: test-suite/trunk/SingleSource/UnitTests/ObjC++/Makefile<br>URL: <a href="http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/ObjC%2B%2B/Makefile?rev=128436&r1=128435&r2=128436&view=diff">http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/ObjC%2B%2B/Makefile?rev=128436&r1=128435&r2=128436&view=diff</a><br>==============================================================================<br>--- test-suite/trunk/SingleSource/UnitTests/ObjC++/Makefile (original)<br>+++ test-suite/trunk/SingleSource/UnitTests/ObjC++/Makefile Mon Mar 28 18:48:25 2011<br>@@ -6,4 +6,10 @@<br><br> LDFLAGS += -lstdc++ -lobjc -framework Foundation<br> PROGRAM_REQUIRED_TO_EXIT_OK := 1<br>+<br>+# This is a known gcc / llvm-gcc miscompilation fixed in clang.<br>+ifdef CC_UNDER_TEST_IS_LLVM_GCC<br>+EXEC_XFAILS = property-reference-object<br>+endif<br>+<br> include $(LEVEL)/SingleSource/Makefile.singlesrc<br><br>Added: test-suite/trunk/SingleSource/UnitTests/ObjC++/property-reference-object.mm<br>URL: <a href="http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/ObjC%2B%2B/property-reference-object.mm?rev=128436&view=auto">http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/ObjC%2B%2B/property-reference-object.mm?rev=128436&view=auto</a><br>==============================================================================<br>--- test-suite/trunk/SingleSource/UnitTests/ObjC++/property-reference-object.mm (added)<br>+++ test-suite/trunk/SingleSource/UnitTests/ObjC++/property-reference-object.mm Mon Mar 28 18:48:25 2011<br>@@ -0,0 +1,105 @@<br>+#import <Foundation/Foundation.h><br>+<br>+static int count;<br>+class Foo<br>+{<br>+        static int sNextId;<br>+        int     mId;<br>+        int     mRefId;<br>+public:<br>+<span class="Apple-tab-span" style="white-space:pre">  </span>Foo(const Foo& rhs){ <br>+<span class="Apple-tab-span" style="white-space:pre">        </span>  mId = sNextId++;<br>+          mRefId = rhs.mId;<br>+          printf("Foo(%d,%d)\n", mId, mRefId);<br>+        };<br>+<br>+<span class="Apple-tab-span" style="white-space:pre">    </span>Foo() { <br>+<span class="Apple-tab-span" style="white-space:pre"> </span>  mId = sNextId++;<br>+          mRefId = mId;<br>+          printf("Foo(%d,%d)\n", mId,mRefId);<br>+        }<br>+<span class="Apple-tab-span" style="white-space:pre">     </span>~Foo(){ <br>+<span class="Apple-tab-span" style="white-space:pre"> </span>  printf("~Foo(%d, %d)\n", mId, mRefId);<br>+        };<br>+<span class="Apple-tab-span" style="white-space:pre">  </span><br>+<span class="Apple-tab-span" style="white-space:pre"> </span>Foo& operator=(const Foo& rhs){<br>+<span class="Apple-tab-span" style="white-space:pre">  </span>  mRefId = rhs.mRefId;<br>+          return *this;<br>+        };<br>+<br>+<span class="Apple-tab-span" style="white-space:pre">    </span>int Data() { return fData; };<br>+<span class="Apple-tab-span" style="white-space:pre">    </span><br>+private:<br>+<span class="Apple-tab-span" style="white-space:pre">      </span>int fData;<br>+};<br>+<br>+int Foo::sNextId = 0;<br>+<br>+<br>+#pragma mark -<br>+<br>+<br>+@interface TNSObject : NSObject<br>+{<br>+@private<br>+<span class="Apple-tab-span" style="white-space:pre"> </span>Foo _cppObjectNonAtomic;<br>+<span class="Apple-tab-span" style="white-space:pre"> </span>Foo _cppObjectAtomic;<br>+<span class="Apple-tab-span" style="white-space:pre">    </span>Foo _cppObjectDynamic;<br>+}<br>+<br>+@property (assign, readwrite, nonatomic) const Foo& cppObjectNonAtomic;<br>+@property (assign, readwrite) const Foo& cppObjectAtomic;<br>+@property (assign, readwrite, nonatomic) const Foo& cppObjectDynamic;<br>+@end<br>+<br>+<br>+#pragma mark -<br>+<br>+<br>+@implementation TNSObject<br>+<br>+@synthesize cppObjectNonAtomic = _cppObjectNonAtomic;<br>+@synthesize cppObjectAtomic = _cppObjectAtomic;<br>+@dynamic cppObjectDynamic;<br>+<br>+- (id)init<br>+{<br>+    self = [super init];<br>+    if (self) {<br>+    <br>+        // Add your subclass-specific initialization here.<br>+        // If an error occurs here, send a [self release] message and return nil.<br>+<br>+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span>Foo cppObject;<br>+                self.cppObjectNonAtomic = cppObject;<br>+<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span>self.cppObjectAtomic = cppObject;<br>+                self.cppObjectDynamic = cppObject;<br>+    }<br>+    return self;<br>+}<br>+<br>+- (const Foo&) cppObjectDynamic<br>+{<br>+<span class="Apple-tab-span" style="white-space:pre">      </span>return _cppObjectDynamic;<br>+}<br>+<br>+- (void) setCppObjectDynamic: (const Foo&)cppObject<br>+{<br>+<span class="Apple-tab-span" style="white-space:pre">   </span>_cppObjectDynamic = cppObject;<br>+}<br>+@end<br>+<br>+<br>+#pragma mark -<br>+<br>+<br>+int main (int argc, const char * argv[])<br>+{<br>+    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];<br>+<br>+    [[[TNSObject alloc] init] autorelease];<br>+<br>+    [pool drain];<br>+    return 0;<br>+}<br>+<br><br>Added: test-suite/trunk/SingleSource/UnitTests/ObjC++/property-reference-object.reference_output<br>URL: <a href="http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/ObjC%2B%2B/property-reference-object.reference_output?rev=128436&view=auto">http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/ObjC%2B%2B/property-reference-object.reference_output?rev=128436&view=auto</a><br>==============================================================================<br>--- test-suite/trunk/SingleSource/UnitTests/ObjC++/property-reference-object.reference_output (added)<br>+++ test-suite/trunk/SingleSource/UnitTests/ObjC++/property-reference-object.reference_output Mon Mar 28 18:48:25 2011<br>@@ -0,0 +1,14 @@<br>+Foo(0,0)<br>+Foo(1,1)<br>+Foo(2,2)<br>+Foo(3,3)<br>+Foo(4,3)<br>+~Foo(4, 3)<br>+Foo(5,3)<br>+~Foo(5, 3)<br>+Foo(6,3)<br>+~Foo(6, 3)<br>+~Foo(3, 3)<br>+~Foo(2, 3)<br>+~Foo(1, 3)<br>+~Foo(0, 3)<br><br><br>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits<br></div></blockquote></div><br></div></body></html>