summaryrefslogtreecommitdiffstats
path: root/llvm/test/FrontendObjC
diff options
context:
space:
mode:
authorStuart Hastings <stuart@apple.com>2010-03-17 17:51:08 +0000
committerStuart Hastings <stuart@apple.com>2010-03-17 17:51:08 +0000
commit6981c258f70884df8c980caf6a0fd7d7fa940225 (patch)
treeb5fcd64eca49e279745a6e1164065e8950003e8d /llvm/test/FrontendObjC
parent852a04e7ce40f523daf5b6b3f1d4af01953e5796 (diff)
downloadbcm5719-llvm-6981c258f70884df8c980caf6a0fd7d7fa940225.tar.gz
bcm5719-llvm-6981c258f70884df8c980caf6a0fd7d7fa940225.zip
Testcase for r98728.
llvm-svn: 98744
Diffstat (limited to 'llvm/test/FrontendObjC')
-rw-r--r--llvm/test/FrontendObjC/2010-03-17-StructRef.m43
1 files changed, 43 insertions, 0 deletions
diff --git a/llvm/test/FrontendObjC/2010-03-17-StructRef.m b/llvm/test/FrontendObjC/2010-03-17-StructRef.m
new file mode 100644
index 00000000000..a8a509c2e98
--- /dev/null
+++ b/llvm/test/FrontendObjC/2010-03-17-StructRef.m
@@ -0,0 +1,43 @@
+// RUN: %llvmgcc %s -S -o - | FileCheck %s
+// Bitfield references must not touch memory outside of the enclosing
+// struct. Radar 7639995
+typedef signed char BOOL;
+@protocol NSObject
+- (id)init;
+@end
+@interface NSObject <NSObject> {}
+@end
+@interface IMAVChatParticipant : NSObject {
+ int _ardRole;
+ int _state;
+ int _avRelayStatus;
+ int _chatEndedReason;
+ int _chatError;
+ unsigned _sendingAudio:1;
+ unsigned _sendingVideo:1;
+ unsigned _sendingAuxVideo:1;
+ unsigned _audioMuted:1;
+ unsigned _videoPaused:1;
+ unsigned _networkStalled:1;
+ unsigned _isInitiator:1;
+ unsigned _isAOLInterop:1;
+ unsigned _isRecording:1;
+ unsigned _isUsingICE:1;
+}
+@end
+@implementation IMAVChatParticipant
+- (id) init {
+ self = [super init];
+ if ( self ) {
+ BOOL blah = (BOOL)1;
+ // We're expecting these three bitfield assignments will generate i8 stores.
+ _sendingAudio = (BOOL)1;
+ _isUsingICE = (BOOL)1;
+ _isUsingICE = blah;
+ // CHECK: store i8
+ // CHECK: store i8
+ // CHECK: store i8
+ }
+ return self;
+}
+@end
OpenPOWER on IntegriCloud