6988779: c1_LIRAssembler_x86.cpp crashes VS2010 compiler
authoriveresov
Thu, 30 Sep 2010 16:00:40 -0700
changeset 6478 75ef8813e3e2
parent 6477 5a4b9e39ce51
child 6479 7f96f194b139
6988779: c1_LIRAssembler_x86.cpp crashes VS2010 compiler Summary: The workaround changes the scope of the variable Reviewed-by: phh, ysr, kvn
hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp
--- a/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp	Fri Sep 24 00:52:04 2010 -0700
+++ b/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp	Thu Sep 30 16:00:40 2010 -0700
@@ -1616,8 +1616,7 @@
 void LIR_Assembler::type_profile_helper(Register mdo,
                                         ciMethodData *md, ciProfileData *data,
                                         Register recv, Label* update_done) {
-  uint i;
-  for (i = 0; i < ReceiverTypeData::row_limit(); i++) {
+  for (uint i = 0; i < ReceiverTypeData::row_limit(); i++) {
     Label next_test;
     // See if the receiver is receiver[n].
     __ cmpptr(recv, Address(mdo, md->byte_offset_of_slot(data, ReceiverTypeData::receiver_offset(i))));
@@ -1629,7 +1628,7 @@
   }
 
   // Didn't find receiver; find next empty slot and fill it in
-  for (i = 0; i < ReceiverTypeData::row_limit(); i++) {
+  for (uint i = 0; i < ReceiverTypeData::row_limit(); i++) {
     Label next_test;
     Address recv_addr(mdo, md->byte_offset_of_slot(data, ReceiverTypeData::receiver_offset(i)));
     __ cmpptr(recv_addr, (intptr_t)NULL_WORD);