[patch] fix wrong gimple code with ptr to forward vla
Mark Mitchell
mark@codesourcery.com
Fri Sep 1 21:10:00 GMT 2006
Joseph S. Myers wrote:
> On Fri, 1 Sep 2006, Mark Mitchell wrote:
>
>> I think that this is a more fundamental problem. Since we only have one node
>> for a type, the first use of a pointer type may point to a variable-length
>> array whose size isn't known at the point the pointer type is used.
>>
>> On that basis, I thin Jakub's patch is suspect for PR 21536, and that we
>> should not recur on pointer types. Perhaps the middle-end should just ignore
>> the bounds for VLAs, and treat them as unknown, at least in some situations.
>
> I think front ends should be responsible for making sure that VLA sizes
> get evaluated at the right time and replacing them with temporary
> variables, rather than relying on SAVE_EXPRs getting evaluated at a
> sensible time.
I think you've nailed it; that's exactly what we should do.
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713
More information about the Gcc-patches
mailing list