public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/106208] New: [12/13 Regression] ICE in branch_prob, at profile.cc:1459
@ 2022-07-05 18:48 gscfq@t-online.de
2022-07-07 8:08 ` [Bug fortran/106208] " rguenth at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: gscfq@t-online.de @ 2022-07-05 18:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106208
Bug ID: 106208
Summary: [12/13 Regression] ICE in branch_prob, at
profile.cc:1459
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: gscfq@t-online.de
Target Milestone: ---
Started between 20211114 and 20211121,
with file gfortran.dg/coarray/registering_1.f90 :
(gcc configured with --enable-checking=yes)
$ gfortran-13-20220703 -c registering_1.f90 -ftest-coverage -fcoarray=lib
during IPA pass: profile
registering_1.f90:11:4:
11 | use m
| ^
internal compiler error: in branch_prob, at profile.cc:1459
0xdca3c3 branch_prob(bool)
../../gcc/profile.cc:1459
0xf8f060 tree_profiling
../../gcc/tree-profile.cc:782
0xf8f060 execute
../../gcc/tree-profile.cc:888
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/106208] [12/13 Regression] ICE in branch_prob, at profile.cc:1459
2022-07-05 18:48 [Bug fortran/106208] New: [12/13 Regression] ICE in branch_prob, at profile.cc:1459 gscfq@t-online.de
@ 2022-07-07 8:08 ` rguenth at gcc dot gnu.org
2022-07-07 12:55 ` [Bug fortran/106208] [12/13 Regression] ICE in branch_prob, at profile.cc:1459 since r12-5275-gbcebd05720540e25 marxin at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-07-07 8:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106208
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |12.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/106208] [12/13 Regression] ICE in branch_prob, at profile.cc:1459 since r12-5275-gbcebd05720540e25
2022-07-05 18:48 [Bug fortran/106208] New: [12/13 Regression] ICE in branch_prob, at profile.cc:1459 gscfq@t-online.de
2022-07-07 8:08 ` [Bug fortran/106208] " rguenth at gcc dot gnu.org
@ 2022-07-07 12:55 ` marxin at gcc dot gnu.org
2022-07-25 15:13 ` [Bug middle-end/106208] " rguenth at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-07-07 12:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106208
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |marxin at gcc dot gnu.org,
| |tschwinge at gcc dot gnu.org
Last reconfirmed| |2022-07-07
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Summary|[12/13 Regression] ICE in |[12/13 Regression] ICE in
|branch_prob, at |branch_prob, at
|profile.cc:1459 |profile.cc:1459 since
| |r12-5275-gbcebd05720540e25
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Reduced test-case:
$ cat reg.f90
module m
integer a0[*]
end
$ gcc reg.f90 -c -fcoarray=lib -ftest-coverage
during IPA pass: profile
f951: internal compiler error: in branch_prob, at profile.cc:1459
0x770d2d branch_prob(bool)
/home/marxin/Programming/gcc/gcc/profile.cc:1459
0x10cde00 tree_profiling
/home/marxin/Programming/gcc/gcc/tree-profile.cc:782
0x10cde00 execute
/home/marxin/Programming/gcc/gcc/tree-profile.cc:888
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
Started with r12-5275-gbcebd05720540e25.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/106208] [12/13 Regression] ICE in branch_prob, at profile.cc:1459 since r12-5275-gbcebd05720540e25
2022-07-05 18:48 [Bug fortran/106208] New: [12/13 Regression] ICE in branch_prob, at profile.cc:1459 gscfq@t-online.de
2022-07-07 8:08 ` [Bug fortran/106208] " rguenth at gcc dot gnu.org
2022-07-07 12:55 ` [Bug fortran/106208] [12/13 Regression] ICE in branch_prob, at profile.cc:1459 since r12-5275-gbcebd05720540e25 marxin at gcc dot gnu.org
@ 2022-07-25 15:13 ` rguenth at gcc dot gnu.org
2022-07-25 15:42 ` tschwinge at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-07-25 15:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106208
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|fortran |middle-end
Priority|P3 |P2
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
#1 0x0000000001423960 in branch_prob (thunk=false)
at /home/rguenther/src/trunk/gcc/profile.cc:1459
1459 gcc_checking_assert (!RESERVED_LOCATION_P (loc));
(gdb) l
1454 gcov_position_t offset = 0;
1455
1456 if (bb == ENTRY_BLOCK_PTR_FOR_FN (cfun)->next_bb)
1457 {
1458 location_t loc = DECL_SOURCE_LOCATION
(current_function_decl);
1459 gcc_checking_assert (!RESERVED_LOCATION_P (loc));
1460 seen_locations.add (loc);
1461 expanded_location curr_location = expand_location (loc);
1462 output_location (&streamed_locations, curr_location.file,
1463 MAX (1, curr_location.line), &offset,
bb);
(gdb) p loc
$1 = 0
(gdb) p current_function_decl
$2 = <function_decl 0x7ffff6317d00 _caf_init.0>
(gdb) p $2->decl_common.artificial_flag
$3 = 0
I was to say that for artificial functions a reserved location could be
expected. But _caf_init.0 isn't even artificial (which is probably a bug).
In the non-entry block case we do
if (!RESERVED_LOCATION_P (loc))
{
seen_locations.add (loc);
which seems an obvious thing to do here as well. But it's really Thomas who
should comment since he put in the assert (uncovering a previous issue).
Not really a frontend bug (if it were DECL_ARTIFICIAL the ICE would occur
anyway).
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/106208] [12/13 Regression] ICE in branch_prob, at profile.cc:1459 since r12-5275-gbcebd05720540e25
2022-07-05 18:48 [Bug fortran/106208] New: [12/13 Regression] ICE in branch_prob, at profile.cc:1459 gscfq@t-online.de
` (2 preceding siblings ...)
2022-07-25 15:13 ` [Bug middle-end/106208] " rguenth at gcc dot gnu.org
@ 2022-07-25 15:42 ` tschwinge at gcc dot gnu.org
2022-10-25 10:52 ` tschwinge at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2022-07-25 15:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106208
Thomas Schwinge <tschwinge at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |tschwinge at gcc dot gnu.org
--- Comment #3 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
Indeed I had added the 'assert' to prevent bogus behavior further down the line
-- and we've now found another offender. I'm planning to look into that, but
it'll take a while (summer vacations/parental leave).
(In reply to Martin Liška from comment #1)
> Reduced test-case: [...]
Thanks!
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/106208] [12/13 Regression] ICE in branch_prob, at profile.cc:1459 since r12-5275-gbcebd05720540e25
2022-07-05 18:48 [Bug fortran/106208] New: [12/13 Regression] ICE in branch_prob, at profile.cc:1459 gscfq@t-online.de
` (3 preceding siblings ...)
2022-07-25 15:42 ` tschwinge at gcc dot gnu.org
@ 2022-10-25 10:52 ` tschwinge at gcc dot gnu.org
2023-05-08 12:25 ` [Bug middle-end/106208] [12/13/14 " rguenth at gcc dot gnu.org
2024-03-11 4:41 ` [Bug middle-end/106208] [12 " pinskia at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2022-10-25 10:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106208
Thomas Schwinge <tschwinge at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=101598
CC| |ebotcazou at gcc dot gnu.org,
| |edlinger at gcc dot gnu.org
--- Comment #5 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
This ICE (when compiling with '-ftest-coverage -fcoarray=lib') reported here
originally: 'gfortran.dg/coarray/registering_1.f90' as well as Martin's reduced
test case 'reg.f90' disappears via Eric's PR101598-related commit
r13-3485-gcb21297f9259ceedd5f5dd7c3973535f14124d6d "Relax assertion in
profiler".
Should we still add these Fortran test cases -- or is in fact 'gfortran' still
generating "undesirable" location information? Stated by Eric: "This assertion
in branch_prob [...] had been correct until the fix for PR debug/101598 was
installed", but that clearly doesn't apply to the Fortran case discussed in
this PR, as Bernd's commit r12-2846-ga45918f8a7444a40eb397a037683ba5900a2db74
"Ada: Remove debug line number for DECL_IGNORED_P functions" was relevant for
Ada only; 'gcc/ada/gcc-interface/trans.c'.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/106208] [12/13/14 Regression] ICE in branch_prob, at profile.cc:1459 since r12-5275-gbcebd05720540e25
2022-07-05 18:48 [Bug fortran/106208] New: [12/13 Regression] ICE in branch_prob, at profile.cc:1459 gscfq@t-online.de
` (4 preceding siblings ...)
2022-10-25 10:52 ` tschwinge at gcc dot gnu.org
@ 2023-05-08 12:25 ` rguenth at gcc dot gnu.org
2024-03-11 4:41 ` [Bug middle-end/106208] [12 " pinskia at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-05-08 12:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106208
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|12.3 |12.4
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 12.3 is being released, retargeting bugs to GCC 12.4.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/106208] [12 Regression] ICE in branch_prob, at profile.cc:1459 since r12-5275-gbcebd05720540e25
2022-07-05 18:48 [Bug fortran/106208] New: [12/13 Regression] ICE in branch_prob, at profile.cc:1459 gscfq@t-online.de
` (5 preceding siblings ...)
2023-05-08 12:25 ` [Bug middle-end/106208] [12/13/14 " rguenth at gcc dot gnu.org
@ 2024-03-11 4:41 ` pinskia at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-03-11 4:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106208
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[12/13/14 Regression] ICE |[12 Regression] ICE in
|in branch_prob, at |branch_prob, at
|profile.cc:1459 since |profile.cc:1459 since
|r12-5275-gbcebd05720540e25 |r12-5275-gbcebd05720540e25
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
>Should we still add these Fortran test cases -- or is in fact 'gfortran' still generating "undesirable" location information?
The function (_caf_init.0) is a machine generated function and does not really
have any location information associated with it. it is an artifact of
fcoarray=lib registering the coarray at initialization time.
So I am going to say this just needs a testcase, removing the 13/14 regression
marker otherwise.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-03-11 4:41 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-05 18:48 [Bug fortran/106208] New: [12/13 Regression] ICE in branch_prob, at profile.cc:1459 gscfq@t-online.de
2022-07-07 8:08 ` [Bug fortran/106208] " rguenth at gcc dot gnu.org
2022-07-07 12:55 ` [Bug fortran/106208] [12/13 Regression] ICE in branch_prob, at profile.cc:1459 since r12-5275-gbcebd05720540e25 marxin at gcc dot gnu.org
2022-07-25 15:13 ` [Bug middle-end/106208] " rguenth at gcc dot gnu.org
2022-07-25 15:42 ` tschwinge at gcc dot gnu.org
2022-10-25 10:52 ` tschwinge at gcc dot gnu.org
2023-05-08 12:25 ` [Bug middle-end/106208] [12/13/14 " rguenth at gcc dot gnu.org
2024-03-11 4:41 ` [Bug middle-end/106208] [12 " pinskia at gcc dot gnu.org
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).