[llvm-commits] [llvm] r98744 - /llvm/trunk/test/FrontendObjC/2010-03-17-StructRef.m
Stuart Hastings
stuart at apple.com
Wed Mar 17 10:51:08 PDT 2010
Author: stuart
Date: Wed Mar 17 12:51:08 2010
New Revision: 98744
URL: http://llvm.org/viewvc/llvm-project?rev=98744&view=rev
Log:
Testcase for r98728.
Added:
llvm/trunk/test/FrontendObjC/2010-03-17-StructRef.m
Added: llvm/trunk/test/FrontendObjC/2010-03-17-StructRef.m
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendObjC/2010-03-17-StructRef.m?rev=98744&view=auto
==============================================================================
--- llvm/trunk/test/FrontendObjC/2010-03-17-StructRef.m (added)
+++ llvm/trunk/test/FrontendObjC/2010-03-17-StructRef.m Wed Mar 17 12:51:08 2010
@@ -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;
+ at protocol NSObject
+- (id)init;
+ at end
+ at interface NSObject <NSObject> {}
+ at end
+ at 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;
+}
+ at end
+ at 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;
+}
+ at end
More information about the llvm-commits
mailing list