blob: 3594684a194dda0ccd588943c09a3e3c66a9d53b [file] [log] [blame]
Eric Christopher4750cb92010-03-25 01:46:07 +00001// RUN: %llvmgcc %s -m64 -S -o - | FileCheck %s
Stuart Hastingsb0a72ec2010-03-17 17:51:08 +00002// Bitfield references must not touch memory outside of the enclosing
3// struct. Radar 7639995
4typedef signed char BOOL;
5@protocol NSObject
6- (id)init;
7@end
8@interface NSObject <NSObject> {}
9@end
10@interface IMAVChatParticipant : NSObject {
11 int _ardRole;
12 int _state;
13 int _avRelayStatus;
14 int _chatEndedReason;
15 int _chatError;
16 unsigned _sendingAudio:1;
17 unsigned _sendingVideo:1;
18 unsigned _sendingAuxVideo:1;
19 unsigned _audioMuted:1;
20 unsigned _videoPaused:1;
21 unsigned _networkStalled:1;
22 unsigned _isInitiator:1;
23 unsigned _isAOLInterop:1;
24 unsigned _isRecording:1;
25 unsigned _isUsingICE:1;
26}
27@end
28@implementation IMAVChatParticipant
29- (id) init {
30 self = [super init];
31 if ( self ) {
32 BOOL blah = (BOOL)1;
33 // We're expecting these three bitfield assignments will generate i8 stores.
34 _sendingAudio = (BOOL)1;
35 _isUsingICE = (BOOL)1;
36 _isUsingICE = blah;
37 // CHECK: store i8
38 // CHECK: store i8
39 // CHECK: store i8
40 }
41 return self;
42}
43@end