llvm.org GIT mirror llvm / b0a72ec
Testcase for r98728. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98744 91177308-0d34-0410-b5e6-96231b3b80d8 Stuart Hastings 10 years ago
1 changed file(s) with 43 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 // RUN: %llvmgcc %s -S -o - | FileCheck %s
1 // Bitfield references must not touch memory outside of the enclosing
2 // struct. Radar 7639995
3 typedef signed char BOOL;
4 @protocol NSObject
5 - (id)init;
6 @end
7 @interface NSObject {}
8 @end
9 @interface IMAVChatParticipant : NSObject {
10 int _ardRole;
11 int _state;
12 int _avRelayStatus;
13 int _chatEndedReason;
14 int _chatError;
15 unsigned _sendingAudio:1;
16 unsigned _sendingVideo:1;
17 unsigned _sendingAuxVideo:1;
18 unsigned _audioMuted:1;
19 unsigned _videoPaused:1;
20 unsigned _networkStalled:1;
21 unsigned _isInitiator:1;
22 unsigned _isAOLInterop:1;
23 unsigned _isRecording:1;
24 unsigned _isUsingICE:1;
25 }
26 @end
27 @implementation IMAVChatParticipant
28 - (id) init {
29 self = [super init];
30 if ( self ) {
31 BOOL blah = (BOOL)1;
32 // We're expecting these three bitfield assignments will generate i8 stores.
33 _sendingAudio = (BOOL)1;
34 _isUsingICE = (BOOL)1;
35 _isUsingICE = blah;
36 // CHECK: store i8
37 // CHECK: store i8
38 // CHECK: store i8
39 }
40 return self;
41 }
42 @end