[llvm-commits] [test-suite] r129821 - in /test-suite/trunk/SingleSource/UnitTests/ObjC: bitfield-access-2.m bitfield-access-2.reference_output
Stuart Hastings
stuart at apple.com
Tue Apr 19 14:42:35 PDT 2011
Author: stuart
Date: Tue Apr 19 16:42:34 2011
New Revision: 129821
URL: http://llvm.org/viewvc/llvm-project?rev=129821&view=rev
Log:
Test case for 129634. <rdar://problem/8933028>
Added:
test-suite/trunk/SingleSource/UnitTests/ObjC/bitfield-access-2.m
test-suite/trunk/SingleSource/UnitTests/ObjC/bitfield-access-2.reference_output
Added: test-suite/trunk/SingleSource/UnitTests/ObjC/bitfield-access-2.m
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/ObjC/bitfield-access-2.m?rev=129821&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/UnitTests/ObjC/bitfield-access-2.m (added)
+++ test-suite/trunk/SingleSource/UnitTests/ObjC/bitfield-access-2.m Tue Apr 19 16:42:34 2011
@@ -0,0 +1,72 @@
+#include <stdlib.h>
+#include <stdio.h>
+#import <Foundation/NSObject.h>
+ at interface class_o_bitfields: NSObject {
+ unsigned _wasSearchActive:1;
+ unsigned _wasSearchBarFirstResponder:1;
+ unsigned _isOutgoingMailbox:1;
+ unsigned _isDraftsMailbox:1;
+ unsigned _isEditableMailbox:1;
+ unsigned _isOutbox:1;
+ unsigned _inEditMode:1;
+ unsigned _messageLayerShouldPurge:1;
+ unsigned _isShowingSwipeDeleteConfirmation:1;
+ unsigned _settingSearchText:1;
+ unsigned _isDismissing:1;
+ unsigned _shouldSelectInitialMessage:1;
+ unsigned _shouldKeepSelectionVisible:2;
+ unsigned _searchResultsTableViewIsLoaded:1;
+ unsigned _currentMessageOutsideSearchResults:1;
+ unsigned _savedContentOffsetIsValid:1;
+ unsigned _userChoseSearchType:1;
+ unsigned _isDeletingMessages:1;
+ unsigned _anySourceSupportsSearch:1;
+ unsigned _isMovingAllMessages:1;
+ unsigned _isMarkingMessages:1;
+ unsigned _isShowingMainLoadMoreButton:1;
+ unsigned _isShowingSearchLoadMoreButton:1;
+ unsigned _isThreadedMCVC:1;
+ unsigned _willPop:1;
+ unsigned _shouldFadeOutSelectionOnDisappear:1;
+ unsigned _didFadeOutSelectionOnDisappear:1;
+ unsigned _preventNextScrollbarFlash:1;
+ unsigned _preventScrollOnNextAppear:1;
+ unsigned _preventMessageSelection:1;
+ unsigned _ignoringUserInteractionForDelete:1;
+ unsigned _ignoringUserInteractionForDraftRefresh:1;
+ unsigned _useSpecialDeleteAnimation:1;
+ at public
+ unsigned _deselectingDeletedRow:1;
+ unsigned _isDismissingActionSheet:1;
+ unsigned _viewIsVisible:1;
+}
+ at end
+int foo_was_called = 0;
+void __attribute__ ((__noinline__)) foo() {
+ foo_was_called = 1;
+}
+ at implementation class_o_bitfields
+- (void)test_a_bitfield {
+ if (_useSpecialDeleteAnimation) // This should always be false.
+ return;
+ @try {
+ foo();
+ }
+ @catch (class_o_bitfields *x) {
+ foo();
+ }
+}
+ at end
+
+
+int
+main() {
+ class_o_bitfields *mcvc = [class_o_bitfields alloc];
+ mcvc->_deselectingDeletedRow = 1;
+ [mcvc test_a_bitfield];
+ if (!foo_was_called) {
+ printf("bitfield read error!\n");
+ abort();
+ }
+ return 0;
+}
Added: test-suite/trunk/SingleSource/UnitTests/ObjC/bitfield-access-2.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/ObjC/bitfield-access-2.reference_output?rev=129821&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/UnitTests/ObjC/bitfield-access-2.reference_output (added)
+++ test-suite/trunk/SingleSource/UnitTests/ObjC/bitfield-access-2.reference_output Tue Apr 19 16:42:34 2011
@@ -0,0 +1 @@
+exit 0
More information about the llvm-commits
mailing list