This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, fortran] PR28105 Overflow check for memory allocation


On Tue, Dec 14, 2010 at 08:41, Steve Kargl
<sgk@troutmask.apl.washington.edu> wrote:
> On Mon, Dec 13, 2010 at 11:06:08PM +0200, Janne Blomqvist wrote:
>> Hi,
>>
>> as a result of a recent commit, size_t in the gfortran frontend is now
>> properly an unsigned type. As a side-effect of this, testing whether a
>> value of type size_t is negative just generates dead code which is
>> optimized away. This kind of test was previously used as a crude kind
>> of overflow check for memory allocation (for the ALLOCATE statement
>> there is now a proper implementation).
>>
>> The attached patch removes the generation of this dead code in the first place.
>>
>> Regtested on x86_64-unknown-linux-gnu, Ok for trunk?
>>
>
> OK.

Sending        fortran/ChangeLog
Sending        fortran/trans.c
Transmitting file data ..
Committed revision 167860.

> Just out of curiousity, your error message is now "Out of memory".

FWIW, the above commit was the original patch, I'll fix the error
messages in a separate commit.

-- 
Janne Blomqvist


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]