This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, Fortran] PR 55978: [4.8 Regression] class_optional_2.f90 -Os fails
- From: Tobias Burnus <burnus at net-b dot de>
- To: Janus Weil <janus at gcc dot gnu dot org>
- Cc: gfortran <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 06 Feb 2013 18:36:39 +0100
- Subject: Re: [Patch, Fortran] PR 55978: [4.8 Regression] class_optional_2.f90 -Os fails
- References: <CAKwh3qistP417Btc+0y44h5UC7pbN2tmoZuY+DMQ+d97fOGjpg@mail.gmail.com>
Janus Weil wrote:
here is a close-to-obvious patch which should fix the occasional
failures of class_optional_2.f90 in the testsuite.
Thanks!
On second thought, I decided to move this check inside of
internal_pack. While this can potentially decrease performance (due to
the additional function call, which I hope is negligible), it ensures
that this check is really done in all possible situations, which makes
internal_pack somewhat safer.
I think the performance degradation is low - especially as the code-gen
version has also a performance penalty, unless the compiler is able to
deduce at compile time that the flag can be optimized away.
The patch was regtested on x86_64-unknown-linux-gnu. Ok for trunk?
Okay.
Btw, should I include the additional test case when committing, or is
it sufficient to have class_optional_2.f90?
I haven't really followed when the failure occurs. If the new test makes
failures more likely than with class_optional_2.f90, I'd include it.
Otherwise, I'd guess it is not necessary. Similarly for my test case in
PR fortran/55978 comment 19 - I don't know whether it is covered
anywhere. If not, you could put Thomas' and my test case into one file
and include it.
Tobias
2013-02-06 Janus Weil <janus@gcc.gnu.org>
PR fortran/55978
* runtime/in_pack_generic.c (internal_pack): Return if base_addr is
NULL.
2013-02-06 Janus Weil <janus@gcc.gnu.org>
PR fortran/55978
* gfortran.dg/optional_absent_3.f90: New.