This patch looks fine to me.
2011/4/6 Hui Shi <kalin....@gmail.com>
> update patch. space the parentheses.
>
>
> Index: osprey/be/com/constraint_graph.cxx
> ===================================================================
> --- osprey/be/com/constraint_graph.cxx (revision 3534)
> +++ osprey/be/com/constraint_graph.cxx (working copy)
> @@ -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);
> }
>
>
> On Wed, Apr 6, 2011 at 9:14 AM, Hui Shi <kalin....@gmail.com> wrote:
>
>> Could a gatekeeper please review this patch?
>> https://bugs.open64.net/show_bug.cgi?id=747
>>
>> 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.
>>
>> Index: osprey/be/com/constraint_graph.cxx
>> ===================================================================
>> --- osprey/be/com/constraint_graph.cxx (revision 3534)
>> +++ osprey/be/com/constraint_graph.cxx (working copy)
>> @@ -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
>
>
--
Regards,
Lai Jian-Xin
------------------------------------------------------------------------------
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