[Patch, Fortran] PR fortran/36214: Wrong simplification of BOZ constants

Daniel Kraft d@domob.eu
Sun Sep 14 14:06:00 GMT 2008


Tobias Burnus wrote:
>>> Should I backport this to 4.3, too?
>>> (If the problem exists there, too, I've not yet tried.) 
> 
> I think the
> +  gfc_set_model_kind (kind);
> is simple enough for GCC 4.3; it probably also affects
> TRANSFER(..., 0.0_kind).

Committed to 4.3 branch as revision 140358.  Closing PR now.

Daniel

> Non-integer BOZ (common vendor extension + Fortran 2003 compatible
> ones) were introduced rather late in the 4.3 development
> (actually: stage3). Thus 4.3 should also be affected.
> By the way, a bigger BOZ bug in 4.3 is
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36186
> (fixed in 4.4; I think it might be too large for a backport).
> 
> The vendor extension to allow BOZ everywhere is by the way quite
> surprising: Whether a boz is interpreted as int(BOZ) or real(BOZ)
> depends on the context - esp. on the type of variable on the LHS.
>   i = 4.4 + BOZ
>   r = 4 + BOZ
> Is the BOZ now a real or an integer bit pattern? (In gfortran:
> integer, cf.
> http://gcc.gnu.org/onlinedocs/gfortran/BOZ-literal-constants.html
> (Before the 4.3 patch  "i = BOZ" was also interpreted as integer,
> now it is a real(BOZ).)
> 
> Tobias
> 


-- 
Done:     Arc-Bar-Cav-Sam-Val-Wiz, Dwa-Elf-Gno-Hum-Orc, Law-Neu-Cha, Fem-Mal
To go:    Hea-Kni-Mon-Pri-Ran-Rog-Tou



More information about the Gcc-patches mailing list