public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/103898] New: [12 Regression] ICE: gimplification failed
@ 2022-01-03 18:41 antony at cosmologist dot info
2022-01-03 18:49 ` [Bug fortran/103898] " pinskia at gcc dot gnu.org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: antony at cosmologist dot info @ 2022-01-03 18:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103898
Bug ID: 103898
Summary: [12 Regression] ICE: gimplification failed
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: antony at cosmologist dot info
Target Milestone: ---
For full log see
https://app.travis-ci.com/github/cmbant/CosmoMC/jobs/552809686.
The relevant stack trace is
[ 94/125] Processing src/bflike/long_intrinsic_smw.f90
gimplification failed:
MAX_EXPR <_21, 0> <max_expr 0x7f1b5ff58f00
type <integer_type 0x7f1b60196738 integer(kind=8) public DI
size <integer_cst 0x7f1b6017fc00 constant 64>
unit-size <integer_cst 0x7f1b6017fc18 constant 8>
align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f1b60196738 precision:64 min <integer_cst 0x7f1b6017fe88
-9223372036854775808> max <integer_cst 0x7f1b6017fea0 9223372036854775807>
pointer_to_this <pointer_type 0x7f1b601cb738>>
arg:0 <ssa_name 0x7f1b5ff87d80 type <integer_type 0x7f1b60196738
integer(kind=8)>
def_stmt _21 = _20 + 1;
version:21>
arg:1 <integer_cst 0x7f1b6019d2d0 type <integer_type 0x7f1b60196738
integer(kind=8)> constant 0>
/cosmomc/code/plc_3.0/plc-3.01/src/bflike/long_intrinsic_smw.f90:155:36
start: /cosmomc/code/plc_3.0/plc-3.01/src/bflike/long_intrinsic_smw.f90:155:36
finish:
/cosmomc/code/plc_3.0/plc-3.01/src/bflike/long_intrinsic_smw.f90:155:36>
/cosmomc/code/plc_3.0/plc-3.01/src/bflike/long_intrinsic_smw.f90:155:36:
155 | mysize = size(array, dim=dim)
| ^
internal compiler error: gimplification failed
0x1daeb37 internal_error(char const*, ...)
???:0
0xc4a9b6 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
???:0
0xc4713f gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
???:0
0xc4aa16 gimplify_stmt(tree_node**, gimple**)
???:0
0xc474e2 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
???:0
0xc4aa16 gimplify_stmt(tree_node**, gimple**)
???:0
0xc4848b gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
???:0
0xc4aa16 gimplify_stmt(tree_node**, gimple**)
???:0
0xc479e2 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
???:0
0xc4aa16 gimplify_stmt(tree_node**, gimple**)
???:0
0xc474e2 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
???:0
0xc4aa16 gimplify_stmt(tree_node**, gimple**)
???:0
0xc4848b gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
???:0
0xc4aa16 gimplify_stmt(tree_node**, gimple**)
???:0
0xc479e2 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
???:0
0xc58d19 gimplify_body(tree_node*, bool)
???:0
0xc5915d gimplify_function_tree(tree_node*)
???:0
0xa94487 cgraph_node::analyze()
???:0
0xa97c6d symbol_table::finalize_compilation_unit()
???:0
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
The relevant source code is in
https://pla.esac.esa.int/pla/aio/product-action?COSMOLOGY.FILE_ID=COM_Likelihood_Code-v3.0_R3.01.tar.gz
This broke in trunk relatively recently, though at least a month ago.
I don't have a reduced test case (this is not my code).
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/103898] [12 Regression] ICE: gimplification failed
2022-01-03 18:41 [Bug fortran/103898] New: [12 Regression] ICE: gimplification failed antony at cosmologist dot info
@ 2022-01-03 18:49 ` pinskia at gcc dot gnu.org
2022-01-03 19:04 ` pinskia at gcc dot gnu.org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-03 18:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103898
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |12.0
Keywords| |ice-on-valid-code
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
>From 005t.original:
MAX_EXPR <(parm.24.dim[0].ubound - parm.24.dim[0].lbound) + 1, 0> =
MAX_EXPR <(parm.24.dim[(integer(kind=8)) *dim + -1].ubound -
parm.24.dim[(integer(kind=8)) *dim + -1].lbound) + 1, 0>;
yes that is definitely wrong.
Let me try to reduce it.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/103898] [12 Regression] ICE: gimplification failed
2022-01-03 18:41 [Bug fortran/103898] New: [12 Regression] ICE: gimplification failed antony at cosmologist dot info
2022-01-03 18:49 ` [Bug fortran/103898] " pinskia at gcc dot gnu.org
@ 2022-01-03 19:04 ` pinskia at gcc dot gnu.org
2022-01-03 19:11 ` pinskia at gcc dot gnu.org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-03 19:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103898
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2022-01-03
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Reduced testcase:
Module g
Integer, Parameter, Public :: i4b = Selected_int_kind(9)
contains
function size_i_1(array, dim) result (mysize)
integer(i4b), dimension(:), intent(in) :: array
integer(i4b), optional, intent(in) :: dim
if (present(dim)) then
mysize = size(array, dim=dim)
endif
end function size_i_1
end module
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/103898] [12 Regression] ICE: gimplification failed
2022-01-03 18:41 [Bug fortran/103898] New: [12 Regression] ICE: gimplification failed antony at cosmologist dot info
2022-01-03 18:49 ` [Bug fortran/103898] " pinskia at gcc dot gnu.org
2022-01-03 19:04 ` pinskia at gcc dot gnu.org
@ 2022-01-03 19:11 ` pinskia at gcc dot gnu.org
2022-01-03 19:40 ` sandra at gcc dot gnu.org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-03 19:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103898
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
In GCC 11.2.0, we had:
D.3972 = dim != 0B;
mysize = D.3972 ? (integer(kind=4)) _gfortran_size1 (D.3971,
(integer(kind=8)) *dim) : (integer(kind=4)) _gfortran_size0 (D.3971);
While on the trunk we have:
D.4255 = dim != 0B;
if (D.4255)
{
MAX_EXPR <(parm.4.dim[0].ubound - parm.4.dim[0].lbound) + 1, 0> =
MAX_EXPR <(parm.4.dim[(integer(kind=8)) *dim + -1].ubound -
parm.4.dim[(integer(kind=8)) *dim + -1].lbound) + 1, 0>;
}
mysize = (integer(kind=4)) MAX_EXPR <(parm.4.dim[0].ubound -
parm.4.dim[0].lbound) + 1, 0>;
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/103898] [12 Regression] ICE: gimplification failed
2022-01-03 18:41 [Bug fortran/103898] New: [12 Regression] ICE: gimplification failed antony at cosmologist dot info
` (2 preceding siblings ...)
2022-01-03 19:11 ` pinskia at gcc dot gnu.org
@ 2022-01-03 19:40 ` sandra at gcc dot gnu.org
2022-01-03 20:18 ` anlauf at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: sandra at gcc dot gnu.org @ 2022-01-03 19:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103898
--- Comment #4 from sandra at gcc dot gnu.org ---
This is probably related to my rewrite of the size/shape/ubound/lbound
intrinsics back in mid-November. I can add this one to my queue, but I've
already got 3 or 4 other issues already waiting for me to do something, so if
anybody else wants to take this one meanwhile go ahead.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/103898] [12 Regression] ICE: gimplification failed
2022-01-03 18:41 [Bug fortran/103898] New: [12 Regression] ICE: gimplification failed antony at cosmologist dot info
` (3 preceding siblings ...)
2022-01-03 19:40 ` sandra at gcc dot gnu.org
@ 2022-01-03 20:18 ` anlauf at gcc dot gnu.org
2022-01-04 8:37 ` marxin at gcc dot gnu.org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-01-03 20:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103898
--- Comment #5 from anlauf at gcc dot gnu.org ---
Started most likely with commit r12-3897 by Tobias.
Interestingly, the ICE occurs only for a rank-1 array, but not for rank-2 or
for assumed-rank.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/103898] [12 Regression] ICE: gimplification failed
2022-01-03 18:41 [Bug fortran/103898] New: [12 Regression] ICE: gimplification failed antony at cosmologist dot info
` (4 preceding siblings ...)
2022-01-03 20:18 ` anlauf at gcc dot gnu.org
@ 2022-01-04 8:37 ` marxin at gcc dot gnu.org
2022-01-06 2:29 ` sandra at gcc dot gnu.org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-01-04 8:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103898
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |marxin at gcc dot gnu.org
--- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to anlauf from comment #5)
> Started most likely with commit r12-3897 by Tobias.
Confirmed it started with r12-3897-g00f6de9c69119594.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/103898] [12 Regression] ICE: gimplification failed
2022-01-03 18:41 [Bug fortran/103898] New: [12 Regression] ICE: gimplification failed antony at cosmologist dot info
` (5 preceding siblings ...)
2022-01-04 8:37 ` marxin at gcc dot gnu.org
@ 2022-01-06 2:29 ` sandra at gcc dot gnu.org
2022-01-06 20:13 ` sandra at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: sandra at gcc dot gnu.org @ 2022-01-06 2:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103898
sandra at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |sandra at gcc dot gnu.org
--- Comment #7 from sandra at gcc dot gnu.org ---
Yeah, the implementation of the SIZE intrinsic is pretty borked. I'm working
on it.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/103898] [12 Regression] ICE: gimplification failed
2022-01-03 18:41 [Bug fortran/103898] New: [12 Regression] ICE: gimplification failed antony at cosmologist dot info
` (6 preceding siblings ...)
2022-01-06 2:29 ` sandra at gcc dot gnu.org
@ 2022-01-06 20:13 ` sandra at gcc dot gnu.org
2022-01-07 1:35 ` cvs-commit at gcc dot gnu.org
2022-01-07 1:36 ` sandra at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: sandra at gcc dot gnu.org @ 2022-01-06 20:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103898
--- Comment #8 from sandra at gcc dot gnu.org ---
Patch posted:
https://gcc.gnu.org/pipermail/fortran/2022-January/057293.html
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/103898] [12 Regression] ICE: gimplification failed
2022-01-03 18:41 [Bug fortran/103898] New: [12 Regression] ICE: gimplification failed antony at cosmologist dot info
` (7 preceding siblings ...)
2022-01-06 20:13 ` sandra at gcc dot gnu.org
@ 2022-01-07 1:35 ` cvs-commit at gcc dot gnu.org
2022-01-07 1:36 ` sandra at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-01-07 1:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103898
--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Sandra Loosemore <sandra@gcc.gnu.org>:
https://gcc.gnu.org/g:55385f12f604fe242030f0a8fb057598c0f187a6
commit r12-6336-g55385f12f604fe242030f0a8fb057598c0f187a6
Author: Sandra Loosemore <sandra@codesourcery.com>
Date: Thu Jan 6 11:23:18 2022 -0800
Fortran: Fix handling of optional argument to SIZE intrinsic [PR103898]
This patch fixes a think-o in the code that triggered an ICE
in the test case.
2021-01-06 Sandra Loosemore <sandra@codesourcery.com>
PR fortran/103898
gcc/fortran/
* trans-intrinsic.c (gfc_conv_intrinsic_size): Make size_var
actually be a variable and fix surrounding code.
gcc/testsuite/
* gfortran.dg/pr103898.f90: New test.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/103898] [12 Regression] ICE: gimplification failed
2022-01-03 18:41 [Bug fortran/103898] New: [12 Regression] ICE: gimplification failed antony at cosmologist dot info
` (8 preceding siblings ...)
2022-01-07 1:35 ` cvs-commit at gcc dot gnu.org
@ 2022-01-07 1:36 ` sandra at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: sandra at gcc dot gnu.org @ 2022-01-07 1:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103898
sandra at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #10 from sandra at gcc dot gnu.org ---
Fixed.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2022-01-07 1:36 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-03 18:41 [Bug fortran/103898] New: [12 Regression] ICE: gimplification failed antony at cosmologist dot info
2022-01-03 18:49 ` [Bug fortran/103898] " pinskia at gcc dot gnu.org
2022-01-03 19:04 ` pinskia at gcc dot gnu.org
2022-01-03 19:11 ` pinskia at gcc dot gnu.org
2022-01-03 19:40 ` sandra at gcc dot gnu.org
2022-01-03 20:18 ` anlauf at gcc dot gnu.org
2022-01-04 8:37 ` marxin at gcc dot gnu.org
2022-01-06 2:29 ` sandra at gcc dot gnu.org
2022-01-06 20:13 ` sandra at gcc dot gnu.org
2022-01-07 1:35 ` cvs-commit at gcc dot gnu.org
2022-01-07 1:36 ` sandra 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).