[gfortran] Fix PR 19543: Type mismatch when building logical constants

Roger Sayle roger@eyesopen.com
Sat Jan 22 03:18:00 GMT 2005


On Fri, 21 Jan 2005, [ISO-8859-1] Tobias Schlüter wrote:
> Supposing this is indeed a middle-end bug, would it be a good idea to
> submit my patch anyway, so that the hypothetical middle-end hacker will
> not have to patch his Fortran compiler to get a clear view of this
> issue?

My initial guess is that somewhere in the middle-end is assuming
that the front-end creates only a single type for BOOLEAN_TYPE and
that this is the same as the front-end's (default) boolean_type_node.
I believe gfortran is unique in being the only GCC front-end to
have multiple precision variants of BOOLEAN_TYPE.

But I'm also confused by the strange self-referencing "loop" in
gfortran/trans-types.c, where gfc_build_logical_type can return
boolean_type_node, but boolean_type_node is (indirectly) initialized
by calling gfc_build_logical_type!?  Could someone check that I'm
not missing something in gfc_init_types.

Roger
--



More information about the Fortran mailing list