[llvm-commits] [llvm-gcc-4.2] r53701 - /llvm-gcc-4.2/trunk/gcc/objc/objc-act.c
Dale Johannesen
dalej at apple.com
Wed Jul 16 13:54:36 PDT 2008
Author: johannes
Date: Wed Jul 16 15:54:35 2008
New Revision: 53701
URL: http://llvm.org/viewvc/llvm-project?rev=53701&view=rev
Log:
ObjC V2 was allocating 32-bit objects for some of
the magic variables it constructs for "foreach",
but the call that stores into one of them has a
64-bit result. Oops. Fixes
objc.dg/objc-foreach-11.m
objc.dg/objc-foreach-8.m
objc.dg/objc-foreach-9.m
obj-c++.dg/objc-foreach-10.mm
obj-c++.dg/objc-foreach-11.mm
obj-c++.dg/objc-foreach-4.mm
obj-c++.dg/objc-foreach-9.mm
in 64-bit mode.
Modified:
llvm-gcc-4.2/trunk/gcc/objc/objc-act.c
Modified: llvm-gcc-4.2/trunk/gcc/objc/objc-act.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/objc/objc-act.c?rev=53701&r1=53700&r2=53701&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/objc/objc-act.c (original)
+++ llvm-gcc-4.2/trunk/gcc/objc/objc-act.c Wed Jul 16 15:54:35 2008
@@ -18878,9 +18878,9 @@
__objcFastEnumerationState enumState = { 0 };
id items[16];
- unsigned int limit;
+ unsigned long limit;
unsigned long startMutations;
- unsigned int counter;
+ unsigned long counter;
[collection countByEnumeratingWithState:&enumState objects:items count:16];
it returns expression for:
@@ -18924,14 +18924,14 @@
build_index_type (build_int_cst (NULL_TREE, 16 - 1)));
*items_decl = objc_create_named_tmp_var (type, "cstar");
- /* unsigned int limit */
- *limit_decl = objc_create_named_tmp_var (unsigned_type_node, "cstar");
+ /* unsigned long limit */
+ *limit_decl = objc_create_named_tmp_var (long_unsigned_type_node, "cstar");
/* unsigned long startMutations */
*startMutations_decl = objc_create_named_tmp_var (long_unsigned_type_node, "cstar");
- /* unsigned int counter */
- *counter_decl = objc_create_named_tmp_var (unsigned_type_node, "cstar");
+ /* unsigned long counter */
+ *counter_decl = objc_create_named_tmp_var (long_unsigned_type_node, "cstar");
/* [collection countByEnumeratingWithState:&enumState objects:items count:16] */
sel_name = get_identifier ("countByEnumeratingWithState:objects:count:");
@@ -19094,7 +19094,7 @@
/* do { */
outer_do_body = c_begin_compound_stmt (true);
- /* unsigned int counter = 0; */
+ /* unsigned long counter = 0; */
exp = build2 (MODIFY_EXPR, void_type_node, counter_decl,
fold_convert (TREE_TYPE (counter_decl), integer_zero_node));
bind = build3 (BIND_EXPR, void_type_node, counter_decl, exp, NULL);
More information about the llvm-commits
mailing list