public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/95374] New: ICE: gfc_array_size failed
@ 2020-05-27 19:02 gscfq@t-online.de
2020-06-05 21:38 ` [Bug fortran/95374] " anlauf at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: gscfq@t-online.de @ 2020-05-27 19:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95374
Bug ID: 95374
Summary: ICE: gfc_array_size failed
Product: gcc
Version: 11.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, z2.f90 works :
$ cat z1.f90
program p
integer :: i
integer, parameter :: a(0) = 0
integer, parameter :: b(*) = [(a(i:i), i=0,0)]
end
$ cat z2.f90
program p
integer :: i
integer, parameter :: a(0) = 0
integer, parameter :: b(0) = [(a(i:i), i=0,0)]
end
$ gfortran-11-20200524 -c z1.f90
f951: internal compiler error: gfc_array_size failed
0x6519b9 gfc_report_diagnostic
../../gcc/fortran/error.c:782
0x6530da gfc_internal_error(char const*, ...)
../../gcc/fortran/error.c:1402
0x63b57d add_init_expr_to_sym
../../gcc/fortran/decl.c:2039
0x64503a variable_decl
../../gcc/fortran/decl.c:2990
0x64503a gfc_match_data_decl()
../../gcc/fortran/decl.c:6190
0x6a83d3 match_word
../../gcc/fortran/parse.c:65
0x6a83d3 decode_statement
../../gcc/fortran/parse.c:376
0x6a9e1a next_free
../../gcc/fortran/parse.c:1279
0x6a9e1a next_statement
../../gcc/fortran/parse.c:1511
0x6ab46b parse_spec
../../gcc/fortran/parse.c:3922
0x6ae23c parse_progunit
../../gcc/fortran/parse.c:5851
0x6af919 gfc_parse_file()
../../gcc/fortran/parse.c:6392
0x6fb9af gfc_be_parse_file
../../gcc/fortran/f95-lang.c:210
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/95374] ICE: gfc_array_size failed
2020-05-27 19:02 [Bug fortran/95374] New: ICE: gfc_array_size failed gscfq@t-online.de
@ 2020-06-05 21:38 ` anlauf at gcc dot gnu.org
2023-05-17 18:53 ` anlauf at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: anlauf at gcc dot gnu.org @ 2020-06-05 21:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95374
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|ice-on-valid-code |accepts-invalid,
| |ice-on-invalid-code
Priority|P3 |P4
Ever confirmed|0 |1
Last reconfirmed| |2020-06-05
Status|UNCONFIRMED |NEW
--- Comment #1 from anlauf at gcc dot gnu.org ---
Example z2.f90 is actually invalid code that is not rejected,
since the rhs takes element a(0) which is out-of-bounds, has size 1,
whereas the lhs has size 0.
For the same reason, z1.f90 is invalid code since it accesses a(0).
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/95374] ICE: gfc_array_size failed
2020-05-27 19:02 [Bug fortran/95374] New: ICE: gfc_array_size failed gscfq@t-online.de
2020-06-05 21:38 ` [Bug fortran/95374] " anlauf at gcc dot gnu.org
@ 2023-05-17 18:53 ` anlauf at gcc dot gnu.org
2023-05-17 19:56 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: anlauf at gcc dot gnu.org @ 2023-05-17 18:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95374
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |anlauf at gcc dot gnu.org
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=104352
Assignee|unassigned at gcc dot gnu.org |anlauf at gcc dot gnu.org
Status|NEW |ASSIGNED
--- Comment #2 from anlauf at gcc dot gnu.org ---
Submitted: https://gcc.gnu.org/pipermail/fortran/2023-May/059307.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/95374] ICE: gfc_array_size failed
2020-05-27 19:02 [Bug fortran/95374] New: ICE: gfc_array_size failed gscfq@t-online.de
2020-06-05 21:38 ` [Bug fortran/95374] " anlauf at gcc dot gnu.org
2023-05-17 18:53 ` anlauf at gcc dot gnu.org
@ 2023-05-17 19:56 ` cvs-commit at gcc dot gnu.org
2023-05-17 19:59 ` anlauf at gcc dot gnu.org
2024-04-02 17:07 ` cvs-commit at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-05-17 19:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95374
--- Comment #3 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:7bafe652dba9167b65e7b5ef24e77eceb49709ba
commit r14-950-g7bafe652dba9167b65e7b5ef24e77eceb49709ba
Author: Harald Anlauf <anlauf@gmx.de>
Date: Wed May 17 20:39:18 2023 +0200
Fortran: set shape of initializers of zero-sized arrays [PR95374,PR104352]
gcc/fortran/ChangeLog:
PR fortran/95374
PR fortran/104352
* decl.cc (add_init_expr_to_sym): Set shape of initializer also for
zero-sized arrays, so that bounds violations can be detected later.
gcc/testsuite/ChangeLog:
PR fortran/95374
PR fortran/104352
* gfortran.dg/zero_sized_13.f90: New test.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/95374] ICE: gfc_array_size failed
2020-05-27 19:02 [Bug fortran/95374] New: ICE: gfc_array_size failed gscfq@t-online.de
` (2 preceding siblings ...)
2023-05-17 19:56 ` cvs-commit at gcc dot gnu.org
@ 2023-05-17 19:59 ` anlauf at gcc dot gnu.org
2024-04-02 17:07 ` cvs-commit at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: anlauf at gcc dot gnu.org @ 2023-05-17 19:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95374
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Target Milestone|--- |14.0
Resolution|--- |FIXED
--- Comment #4 from anlauf at gcc dot gnu.org ---
Fixed on mainline for gcc-14. Closing.
Thanks for the report!
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/95374] ICE: gfc_array_size failed
2020-05-27 19:02 [Bug fortran/95374] New: ICE: gfc_array_size failed gscfq@t-online.de
` (3 preceding siblings ...)
2023-05-17 19:59 ` anlauf at gcc dot gnu.org
@ 2024-04-02 17:07 ` cvs-commit at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-04-02 17:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95374
--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Harald Anlauf
<anlauf@gcc.gnu.org>:
https://gcc.gnu.org/g:0dd82c0fba660775ff76ae27077a67f2f1358920
commit r13-8557-g0dd82c0fba660775ff76ae27077a67f2f1358920
Author: Harald Anlauf <anlauf@gmx.de>
Date: Wed May 17 20:39:18 2023 +0200
Fortran: set shape of initializers of zero-sized arrays [PR95374,PR104352]
gcc/fortran/ChangeLog:
PR fortran/95374
PR fortran/104352
* decl.cc (add_init_expr_to_sym): Set shape of initializer also for
zero-sized arrays, so that bounds violations can be detected later.
gcc/testsuite/ChangeLog:
PR fortran/95374
PR fortran/104352
* gfortran.dg/zero_sized_13.f90: New test.
(cherry picked from commit 7bafe652dba9167b65e7b5ef24e77eceb49709ba)
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-04-02 17:07 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-27 19:02 [Bug fortran/95374] New: ICE: gfc_array_size failed gscfq@t-online.de
2020-06-05 21:38 ` [Bug fortran/95374] " anlauf at gcc dot gnu.org
2023-05-17 18:53 ` anlauf at gcc dot gnu.org
2023-05-17 19:56 ` cvs-commit at gcc dot gnu.org
2023-05-17 19:59 ` anlauf at gcc dot gnu.org
2024-04-02 17:07 ` cvs-commit 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).