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: [gfortran,patch] Fix type for LOC function return


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?


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