Fixed an ir-gen bug in syntheszing a getter function
with property type which does not match its ivar and
in -fobjc-gc-only mode!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65955 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGenObjC/objc2-retain-codegen.m b/test/CodeGenObjC/objc2-retain-codegen.m
new file mode 100644
index 0000000..b287249
--- /dev/null
+++ b/test/CodeGenObjC/objc2-retain-codegen.m
@@ -0,0 +1,12 @@
+// RUN: clang -triple x86_64-unknown-unknown -fobjc-gc-only -emit-llvm -o %t %s
+
+@interface I0 {
+  I0 *_f0;
+}
+@property (retain) id p0;
+@end 
+
+@implementation I0 
+  @synthesize p0 = _f0;
+@end
+