Author: shihui Date: 2011-04-07 22:01:04 -0400 (Thu, 07 Apr 2011) New Revision: 3542
Modified: trunk/osprey/be/com/constraint_graph.cxx Log: Fix bug747: Signal Floating point exception in phase Data Layout Exception happens in StInfo::applyModulus(UINT32 offset, UINT32 &start), modulus value is zero. In test case struct M's size is 0. Then when setup the child modulus range for strut S, the modulus value is 0. This is not supposing happen, in StInfo::init if array element is zero length, change the modulus value to 1. Fix is in ModulusRange::build if structure's array element size is 0, change modulus value to 1. Code Review: Jian-Xin Modified: trunk/osprey/be/com/constraint_graph.cxx =================================================================== --- trunk/osprey/be/com/constraint_graph.cxx 2011-04-08 01:51:30 UTC (rev 3541) +++ trunk/osprey/be/com/constraint_graph.cxx 2011-04-08 02:01:04 UTC (rev 3542) @@ -269,6 +269,9 @@ while (TY_kind(Ty_Table[etyIdx]) == KIND_ARRAY) etyIdx = TY_etype(Ty_Table[etyIdx]); UINT32 elmtSize = TY_size(Ty_Table[etyIdx]); + // same handling as StInfo::init + if (elmtSize == 0) + elmtSize = 1; newRange = CXX_NEW(ModulusRange(start,end,elmtSize,FLD_type(fld)),memPool); } ------------------------------------------------------------------------------ Xperia(TM) PLAY It's a major breakthrough. An authentic gaming smartphone on the nation's most reliable network. And it wants your games. http://p.sf.net/sfu/verizon-sfdev _______________________________________________ Open64-devel mailing list Open64-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open64-devel