Home | History | Annotate | Download | only in FrontendObjC
      1 // RUN: %llvmgcc %s -m64 -S -o - | FileCheck %s
      2 // Bitfield references must not touch memory outside of the enclosing
      3 // struct.   Radar 7639995
      4 typedef 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
     44