[gfortran,patch] Fix type for LOC function return

Jerry DeLisle jvdelisle@verizon.net
Thu Oct 19 23:50:00 GMT 2006


FX Coudert wrote:
> ping**2
> 
> Asher, everybody, please comment.
> 
> FX
> 
>> [http://gcc.gnu.org/ml/gcc-patches/2006-10/msg00097.html]
>>> Asher, everyone,
>>>
>>> A series of patches by Andrew Pinski allow the middle-end to spot 
>>> type mismatches emitted by the front-end (see PR 22368 for details). 
>>> Among the problems revealed by this patch is the following code: 
>>> "loc(c) == 0", because the code returned by LOC is unsigned, which is 
>>> not what we should do. Indeed, the documentation states that:
>>>
>>> The return value is of type @code{INTEGER(n)}, where @code{n} is the
>>> size (in bytes) of a memory address on the target machine.
>>>
>>> So, I propose to change the gfc_trans_intrinsic_loc function to that 
>>> its result is fold_convert'ed to the right integer type. I plan to 
>>> commit the following patch on mainline next week-end unless someone 
>>> objects.
>>>
>>> Regtested (with Andrew's patches) on i686-linux.
>>>
>>> FX
> 
> 
Are Andrews patches committed?



More information about the Fortran mailing list