public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/103411] New: ICE in gfc_conv_array_initializer, at fortran/trans-array.c:6377
@ 2021-11-24 17:42 gscfq@t-online.de
2021-11-24 17:43 ` [Bug fortran/103411] " gscfq@t-online.de
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: gscfq@t-online.de @ 2021-11-24 17:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103411
Bug ID: 103411
Summary: ICE in gfc_conv_array_initializer, at
fortran/trans-array.c:6377
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: gscfq@t-online.de
Target Milestone: ---
Affects versions down to at least r5 :
$ cat z1.f90
program p
integer, parameter :: a(2) = [2,2]
integer, parameter :: b(2,2) = reshape([1,2,3], a)
print *, b
end
$ gfortran-12-20211121 -c z1.f90
z1.f90:4:13:
4 | print *, b
| 1
internal compiler error: in gfc_conv_array_initializer, at
fortran/trans-array.c:6377
0x865e1a gfc_conv_array_initializer(tree_node*, gfc_expr*)
../../gcc/fortran/trans-array.c:6377
0x893b60 gfc_conv_initializer(gfc_expr*, gfc_typespec*, tree_node*, bool, bool,
bool)
../../gcc/fortran/trans-expr.c:8375
0x874f2b gfc_get_symbol_decl(gfc_symbol*)
../../gcc/fortran/trans-decl.c:1941
0x8843b8 gfc_conv_variable
../../gcc/fortran/trans-expr.c:2997
0x88063a gfc_conv_expr(gfc_se*, gfc_expr*)
../../gcc/fortran/trans-expr.c:9402
0x8833d0 gfc_conv_expr_lhs(gfc_se*, gfc_expr*)
../../gcc/fortran/trans-expr.c:9432
0x853e98 gfc_conv_ss_descriptor
../../gcc/fortran/trans-array.c:3219
0x85e8db gfc_conv_expr_descriptor(gfc_se*, gfc_expr*)
../../gcc/fortran/trans-array.c:7494
0x8b2a57 gfc_trans_transfer(gfc_code*)
../../gcc/fortran/trans-io.c:2630
0x84fa17 trans_code
../../gcc/fortran/trans.c:2136
0x8b02ce build_dt
../../gcc/fortran/trans-io.c:2026
0x84f9f7 trans_code
../../gcc/fortran/trans.c:2108
0x8789fe gfc_generate_function_code(gfc_namespace*)
../../gcc/fortran/trans-decl.c:7644
0x7fbd3e translate_all_program_units
../../gcc/fortran/parse.c:6638
0x7fbd3e gfc_parse_file()
../../gcc/fortran/parse.c:6925
0x848a6f gfc_be_parse_file
../../gcc/fortran/f95-lang.c:216
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/103411] ICE in gfc_conv_array_initializer, at fortran/trans-array.c:6377
2021-11-24 17:42 [Bug fortran/103411] New: ICE in gfc_conv_array_initializer, at fortran/trans-array.c:6377 gscfq@t-online.de
@ 2021-11-24 17:43 ` gscfq@t-online.de
2021-11-24 20:50 ` anlauf at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: gscfq@t-online.de @ 2021-11-24 17:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103411
G. Steinmetz <gscfq@t-online.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-invalid-code
--- Comment #1 from G. Steinmetz <gscfq@t-online.de> ---
Detected :
$ cat z2.f90
program p
integer, parameter :: b(2,2) = reshape([1,2,3], [2,2])
print *, b
end
$ gfortran-12-20211121 -c z2.f90
z2.f90:2:42:
2 | integer, parameter :: b(2,2) = reshape([1,2,3], [2,2])
| 1
Error: Without padding, there are not enough elements in the intrinsic RESHAPE
source at (1) to match the shape
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/103411] ICE in gfc_conv_array_initializer, at fortran/trans-array.c:6377
2021-11-24 17:42 [Bug fortran/103411] New: ICE in gfc_conv_array_initializer, at fortran/trans-array.c:6377 gscfq@t-online.de
2021-11-24 17:43 ` [Bug fortran/103411] " gscfq@t-online.de
@ 2021-11-24 20:50 ` anlauf at gcc dot gnu.org
2021-11-24 21:34 ` anlauf at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: anlauf at gcc dot gnu.org @ 2021-11-24 20:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103411
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |anlauf at gcc dot gnu.org
--- Comment #2 from anlauf at gcc dot gnu.org ---
Created attachment 51869
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51869&action=edit
Untested patch
The check is already there. It just did not trigger for the testcase...
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/103411] ICE in gfc_conv_array_initializer, at fortran/trans-array.c:6377
2021-11-24 17:42 [Bug fortran/103411] New: ICE in gfc_conv_array_initializer, at fortran/trans-array.c:6377 gscfq@t-online.de
2021-11-24 17:43 ` [Bug fortran/103411] " gscfq@t-online.de
2021-11-24 20:50 ` anlauf at gcc dot gnu.org
@ 2021-11-24 21:34 ` anlauf at gcc dot gnu.org
2021-11-26 21:57 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: anlauf at gcc dot gnu.org @ 2021-11-24 21:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103411
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2021-11-24
Status|UNCONFIRMED |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |anlauf at gcc dot gnu.org
--- Comment #3 from anlauf at gcc dot gnu.org ---
Submitted: https://gcc.gnu.org/pipermail/fortran/2021-November/057057.html
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/103411] ICE in gfc_conv_array_initializer, at fortran/trans-array.c:6377
2021-11-24 17:42 [Bug fortran/103411] New: ICE in gfc_conv_array_initializer, at fortran/trans-array.c:6377 gscfq@t-online.de
` (2 preceding siblings ...)
2021-11-24 21:34 ` anlauf at gcc dot gnu.org
@ 2021-11-26 21:57 ` cvs-commit at gcc dot gnu.org
2021-12-04 21:47 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-11-26 21:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103411
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Harald Anlauf <anlauf@gcc.gnu.org>:
https://gcc.gnu.org/g:4d540c7a4a7fb87b04d06e1ee7f9b004116279a4
commit r12-5550-g4d540c7a4a7fb87b04d06e1ee7f9b004116279a4
Author: Harald Anlauf <anlauf@gmx.de>
Date: Fri Nov 26 21:00:35 2021 +0100
Fortran: improve check of arguments to the RESHAPE intrinsic
gcc/fortran/ChangeLog:
PR fortran/103411
* check.c (gfc_check_reshape): Improve check of size of source
array for the RESHAPE intrinsic against the given shape when pad
is not given, and shape is a parameter. Try other simplifications
of shape.
gcc/testsuite/ChangeLog:
PR fortran/103411
* gfortran.dg/pr68153.f90: Adjust test to improved check.
* gfortran.dg/reshape_7.f90: Likewise.
* gfortran.dg/reshape_9.f90: New test.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/103411] ICE in gfc_conv_array_initializer, at fortran/trans-array.c:6377
2021-11-24 17:42 [Bug fortran/103411] New: ICE in gfc_conv_array_initializer, at fortran/trans-array.c:6377 gscfq@t-online.de
` (3 preceding siblings ...)
2021-11-26 21:57 ` cvs-commit at gcc dot gnu.org
@ 2021-12-04 21:47 ` cvs-commit at gcc dot gnu.org
2021-12-11 21:57 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-12-04 21:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103411
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Harald Anlauf
<anlauf@gcc.gnu.org>:
https://gcc.gnu.org/g:9d7add04d97cf7ac8e20cc8645c3c4173697d4ca
commit r11-9357-g9d7add04d97cf7ac8e20cc8645c3c4173697d4ca
Author: Harald Anlauf <anlauf@gmx.de>
Date: Fri Nov 26 21:00:35 2021 +0100
Fortran: improve check of arguments to the RESHAPE intrinsic
gcc/fortran/ChangeLog:
PR fortran/103411
* check.c (gfc_check_reshape): Improve check of size of source
array for the RESHAPE intrinsic against the given shape when pad
is not given, and shape is a parameter. Try other simplifications
of shape.
gcc/testsuite/ChangeLog:
PR fortran/103411
* gfortran.dg/pr68153.f90: Adjust test to improved check.
* gfortran.dg/reshape_7.f90: Likewise.
* gfortran.dg/reshape_9.f90: New test.
(cherry picked from commit 4d540c7a4a7fb87b04d06e1ee7f9b004116279a4)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/103411] ICE in gfc_conv_array_initializer, at fortran/trans-array.c:6377
2021-11-24 17:42 [Bug fortran/103411] New: ICE in gfc_conv_array_initializer, at fortran/trans-array.c:6377 gscfq@t-online.de
` (4 preceding siblings ...)
2021-12-04 21:47 ` cvs-commit at gcc dot gnu.org
@ 2021-12-11 21:57 ` cvs-commit at gcc dot gnu.org
2021-12-11 21:59 ` anlauf at gcc dot gnu.org
2022-01-09 23:26 ` pinskia at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-12-11 21:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103411
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Harald Anlauf
<anlauf@gcc.gnu.org>:
https://gcc.gnu.org/g:263826d6f52d1cc3611554ba0e131347e874aebf
commit r10-10332-g263826d6f52d1cc3611554ba0e131347e874aebf
Author: Harald Anlauf <anlauf@gmx.de>
Date: Fri Nov 26 21:00:35 2021 +0100
Fortran: improve check of arguments to the RESHAPE intrinsic
gcc/fortran/ChangeLog:
PR fortran/103411
* check.c (gfc_check_reshape): Improve check of size of source
array for the RESHAPE intrinsic against the given shape when pad
is not given, and shape is a parameter. Try other simplifications
of shape.
gcc/testsuite/ChangeLog:
PR fortran/103411
* gfortran.dg/pr68153.f90: Adjust test to improved check.
* gfortran.dg/reshape_7.f90: Likewise.
* gfortran.dg/reshape_9.f90: New test.
(cherry picked from commit 4d540c7a4a7fb87b04d06e1ee7f9b004116279a4)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/103411] ICE in gfc_conv_array_initializer, at fortran/trans-array.c:6377
2021-11-24 17:42 [Bug fortran/103411] New: ICE in gfc_conv_array_initializer, at fortran/trans-array.c:6377 gscfq@t-online.de
` (5 preceding siblings ...)
2021-12-11 21:57 ` cvs-commit at gcc dot gnu.org
@ 2021-12-11 21:59 ` anlauf at gcc dot gnu.org
2022-01-09 23:26 ` pinskia at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: anlauf at gcc dot gnu.org @ 2021-12-11 21:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103411
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #7 from anlauf at gcc dot gnu.org ---
Fixed on mainline for gcc-12, and on 11- and 10-branch. Closing.
Thanks for the report!
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/103411] ICE in gfc_conv_array_initializer, at fortran/trans-array.c:6377
2021-11-24 17:42 [Bug fortran/103411] New: ICE in gfc_conv_array_initializer, at fortran/trans-array.c:6377 gscfq@t-online.de
` (6 preceding siblings ...)
2021-12-11 21:59 ` anlauf at gcc dot gnu.org
@ 2022-01-09 23:26 ` pinskia at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-09 23:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103411
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |10.4
Known to fail| |10.3.0, 11.2.0
Known to work| |10.3.1, 11.2.1, 12.0
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2022-01-09 23:26 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-24 17:42 [Bug fortran/103411] New: ICE in gfc_conv_array_initializer, at fortran/trans-array.c:6377 gscfq@t-online.de
2021-11-24 17:43 ` [Bug fortran/103411] " gscfq@t-online.de
2021-11-24 20:50 ` anlauf at gcc dot gnu.org
2021-11-24 21:34 ` anlauf at gcc dot gnu.org
2021-11-26 21:57 ` cvs-commit at gcc dot gnu.org
2021-12-04 21:47 ` cvs-commit at gcc dot gnu.org
2021-12-11 21:57 ` cvs-commit at gcc dot gnu.org
2021-12-11 21:59 ` anlauf at gcc dot gnu.org
2022-01-09 23:26 ` 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).