This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, Fortran] PR fortran/36214: Wrong simplification of BOZ constants
- From: Daniel Kraft <d at domob dot eu>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Wed, 10 Sep 2008 22:48:25 +0200
- Subject: Re: [Patch, Fortran] PR fortran/36214: Wrong simplification of BOZ constants
- References: <20080910202127.GA6765@net-b.de>
Hi Tobias,
thanks for your reply!
Tobias Burnus wrote:
Regression testing on GNU/Linux-x86-32 at the moment.
Ok to commit if no failures?
All boz-tests are now passed, however; the rest is still running.
OK when all tests have passed.
They have. Thanks for the review! I'm waiting with the commit, see below.
Should we test this on some other systems, too?
With REAL(KIND=10) vs. REAL(KIND=16)?
I think a test for
{ dg-require-effective-target fortran_large_real }
which works with both kind=10 and kind=16 cannot harm. I don't think
gfortrab will ever regress, but following Murphy's law and given
that fortran_large_real is not so well tested ...
I was thinking about regression testing my patch on systems with
REAL(KIND=16) instead of KIND=10, just in case some other tests might be
affected there.
Do you mean adding a test for BOZ constants with KIND=10 / KIND=16? If
so, we should discriminate those two, shouldn't we, as the BOZ constants
are surely quite different... Can you explain in more detail what you
had in mind for this? Then I will try to add additional tests.
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).
Ok, then I'll try it out with 4.3 and backport in a few days.
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).)
Wow, that sounds like something nice :D A bit like fixed-format where
one need not insert spaces at certain places...
Daniel
--
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