public inbox for gcc-regression@sourceware.org
help / color / mirror / Atom feed
From: Jan Hubicka <hubicka@kam.mff.cuni.cz>
To: "sunil.k.pandey" <skpandey@sc.intel.com>
Cc: gcc-patches@gcc.gnu.org, gcc-regression@gcc.gnu.org,
tobias@codesourcery.com
Subject: Re: [r12-4457 Regression] FAIL: gfortran.dg/deferred_type_param_6.f90 -Os execution test on Linux/x86_64
Date: Sat, 16 Oct 2021 20:23:54 +0200 [thread overview]
Message-ID: <20211016182354.GE64164@kam.mff.cuni.cz> (raw)
In-Reply-To: <20211016161130.731AF286470F@gskx-2.sc.intel.com>
Hi,
>
> FAIL: gfortran.dg/deferred_type_param_6.f90 -O1 execution test
> FAIL: gfortran.dg/deferred_type_param_6.f90 -Os execution test
Sorry for the breakage. This time it seems like bug in Fortran FE
which was previously latent:
__attribute__((fn spec (". . R ")))
void subfunc (character(kind=1)[1:..__result] * & __result, integer(kind=8) * .__result)
{
# PT = nonlocal
character(kind=1)[1:..__result] * & __result_3(D) = __result;
# PT = nonlocal null
integer(kind=8) * .__result_5(D) = .__result;
integer(kind=4) _1;
<bb 2> [local count: 1073741824]:
*__result_3(D) = &fifec;
# USE = nonlocal escaped { D.4230 } (nonlocal, escaped)
_1 = _gfortran_compare_string (5, &fifec, 5, &"FIVEC"[1]{lb: 1 sz: 1});
if (_1 != 0)
goto <bb 3>; [0.04%]
else
goto <bb 4>; [99.96%]
<bb 3> [local count: 429496]:
# USE = nonlocal escaped null
# CLB = nonlocal escaped null
_gfortran_stop_numeric (10, 0);
<bb 4> [local count: 1073312329]:
*.__result_5(D) = 5;
return;
}
The fnspec ". . R " specifies that .__result is readonly however we
have:
*.__result_5(D) = 5;
I am not sure I understand fortran FE well enough to figure out why
it is set so. The function is declared as:
function subfunc() result(res)
character(len=:), pointer :: res
res => fifec
if (len(res) /= 5) STOP 9
if (res /= "FIVEC") STOP 10
end function subfunc
and we indeed optimize load of the result:
- # USE = nonlocal escaped { D.4252 D.4254 } (nonlocal, escaped)
- # CLB = nonlocal escaped { D.4254 } (escaped)
+ # USE = nonlocal escaped
+ # CLB = { D.4254 }
subfunc (&pstr.5, &slen.4);
- .s2_34 = slen.4;
- # PT = nonlocal escaped null { D.4254 } (escaped)
- s2_35 = pstr.5;
pstr.5 ={v} {CLOBBER};
and I think tat is what breaks the testcase (I also verified that
ignoring the fnspec 'R' fixes it).
Honza
>
> with GCC configured with
>
> ../../gcc/configure --prefix=/local/skpandey/gccwork/toolwork/gcc-bisect-master/master/r12-4457/usr --enable-clocale=gnu --with-system-zlib --with-demangler-in-ld --with-fpmath=sse --enable-languages=c,c++,fortran --enable-cet --without-isl --enable-libmpx x86_64-linux --disable-bootstrap
>
> To reproduce:
>
> $ cd {build_dir}/gcc && make check RUNTESTFLAGS="dg.exp=gfortran.dg/deferred_type_param_6.f90 --target_board='unix{-m32}'"
> $ cd {build_dir}/gcc && make check RUNTESTFLAGS="dg.exp=gfortran.dg/deferred_type_param_6.f90 --target_board='unix{-m32\ -march=cascadelake}'"
> $ cd {build_dir}/gcc && make check RUNTESTFLAGS="dg.exp=gfortran.dg/deferred_type_param_6.f90 --target_board='unix{-m64}'"
> $ cd {build_dir}/gcc && make check RUNTESTFLAGS="dg.exp=gfortran.dg/deferred_type_param_6.f90 --target_board='unix{-m64\ -march=cascadelake}'"
>
> (Please do not reply to this email, for question about this report, contact me at skpgkp2 at gmail dot com)
next prev parent reply other threads:[~2021-10-16 18:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-16 16:11 sunil.k.pandey
2021-10-16 18:23 ` Jan Hubicka [this message]
2021-10-16 18:48 ` [Patch] (was: Re: [r12-4457 Regression] FAIL: gfortran.dg/deferred_type_param_6.f90 -Os execution test on Linux/x86_64) Tobias Burnus
2021-10-16 18:54 ` Jan Hubicka
2021-10-19 14:49 ` [Patch, committed] Fortran: Fix 'fn spec' for deferred character length " Tobias Burnus
2021-10-18 9:51 ` [r12-4457 Regression] FAIL: gfortran.dg/deferred_type_param_6.f90 -Os execution test on Linux/x86_64 Richard Biener
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211016182354.GE64164@kam.mff.cuni.cz \
--to=hubicka@kam.mff.cuni.cz \
--cc=gcc-patches@gcc.gnu.org \
--cc=gcc-regression@gcc.gnu.org \
--cc=skpandey@sc.intel.com \
--cc=tobias@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).