public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/107577] New: [13 Regression] ICE in find_array_spec, at fortran/resolve.cc:5008
@ 2022-11-08 17:29 gscfq@t-online.de
2022-11-08 17:35 ` [Bug fortran/107577] " rguenth at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: gscfq@t-online.de @ 2022-11-08 17:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107577
Bug ID: 107577
Summary: [13 Regression] ICE in find_array_spec, at
fortran/resolve.cc:5008
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 20220717 and 20220724 :
$ cat z1.f90
program p
implicit none
associate (y => f(4))
if (lbound (y, 1) /= 1) stop 1
if (y(1) /= 1) stop 2
end associate
end
$ gfortran-13-20221106 -c z1.f90
z1.f90:3:19:
3 | associate (y => f(4))
| 1
Error: Function 'f' at (1) has no IMPLICIT type
z1.f90:3:23:
3 | associate (y => f(4))
| 1
Error: Symbol 'y' at (1) has no IMPLICIT type
z1.f90:3:19:
3 | associate (y => f(4))
| 1
Error: Selector at (1) has no type
in gfc_format_decoder, at fortran/error.cc:1071
0x7fab72 gfc_format_decoder
../../gcc/fortran/error.cc:1071
0x1f8bff0 pp_format(pretty_printer*, text_info*)
../../gcc/pretty-print.cc:1475
0x1f6af10 diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*)
../../gcc/diagnostic.cc:1548
0x7fabd9 gfc_report_diagnostic
../../gcc/fortran/error.cc:883
0x7fad68 gfc_error_opt
../../gcc/fortran/error.cc:1453
0x7fc5d0 gfc_error(char const*, ...)
../../gcc/fortran/error.cc:1482
0x880aba find_array_spec
../../gcc/fortran/resolve.cc:5008
0x880aba gfc_resolve_ref(gfc_expr*)
../../gcc/fortran/resolve.cc:5355
0x8708d7 resolve_variable
../../gcc/fortran/resolve.cc:5870
0x8708d7 gfc_resolve_expr(gfc_expr*)
../../gcc/fortran/resolve.cc:7196
0x8747df gfc_resolve_expr(gfc_expr*)
../../gcc/fortran/resolve.cc:2234
0x8747df resolve_actual_arglist
../../gcc/fortran/resolve.cc:2153
0x87048e resolve_function
../../gcc/fortran/resolve.cc:3292
0x87048e gfc_resolve_expr(gfc_expr*)
../../gcc/fortran/resolve.cc:7194
0x8739c9 gfc_resolve_expr(gfc_expr*)
../../gcc/fortran/resolve.cc:7161
0x8739c9 resolve_operator
../../gcc/fortran/resolve.cc:4093
0x86feff gfc_resolve_expr(gfc_expr*)
../../gcc/fortran/resolve.cc:7187
0x877231 gfc_resolve_expr(gfc_expr*)
../../gcc/fortran/resolve.cc:7161
0x877231 gfc_resolve_blocks(gfc_code*, gfc_namespace*)
../../gcc/fortran/resolve.cc:10842
0x8775d8 gfc_resolve_code(gfc_code*, gfc_namespace*)
../../gcc/fortran/resolve.cc:11970
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/107577] [13 Regression] ICE in find_array_spec, at fortran/resolve.cc:5008
2022-11-08 17:29 [Bug fortran/107577] New: [13 Regression] ICE in find_array_spec, at fortran/resolve.cc:5008 gscfq@t-online.de
@ 2022-11-08 17:35 ` rguenth at gcc dot gnu.org
2022-11-08 19:58 ` kargl at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-11-08 17:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107577
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |13.0
Priority|P3 |P4
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/107577] [13 Regression] ICE in find_array_spec, at fortran/resolve.cc:5008
2022-11-08 17:29 [Bug fortran/107577] New: [13 Regression] ICE in find_array_spec, at fortran/resolve.cc:5008 gscfq@t-online.de
2022-11-08 17:35 ` [Bug fortran/107577] " rguenth at gcc dot gnu.org
@ 2022-11-08 19:58 ` kargl at gcc dot gnu.org
2022-11-21 12:02 ` [Bug fortran/107577] [13 Regression] ICE in find_array_spec, at fortran/resolve.cc:5008 since r13-1757-gf838d15641d256e2 marxin at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: kargl at gcc dot gnu.org @ 2022-11-08 19:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107577
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
CC| |kargl at gcc dot gnu.org
Last reconfirmed| |2022-11-08
Status|UNCONFIRMED |NEW
--- Comment #1 from kargl at gcc dot gnu.org ---
gfortran should set -fmax-errors=1, then run-on errors would not trigger ICEs.
Tested against code in PR. Not regression tested.
diff --git a/gcc/fortran/resolve.cc b/gcc/fortran/resolve.cc
index 9202e2f10ad..197670757fb 100644
--- a/gcc/fortran/resolve.cc
+++ b/gcc/fortran/resolve.cc
@@ -5005,8 +5005,9 @@ find_array_spec (gfc_expr *e)
case REF_ARRAY:
if (as == NULL)
{
+ locus loc = ref->u.ar.where.lb ? ref->u.ar.where : e->where;
gfc_error ("Invalid array reference of a non-array entity at %L",
- &ref->u.ar.where);
+ &loc);
return false;
}
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/107577] [13 Regression] ICE in find_array_spec, at fortran/resolve.cc:5008 since r13-1757-gf838d15641d256e2
2022-11-08 17:29 [Bug fortran/107577] New: [13 Regression] ICE in find_array_spec, at fortran/resolve.cc:5008 gscfq@t-online.de
2022-11-08 17:35 ` [Bug fortran/107577] " rguenth at gcc dot gnu.org
2022-11-08 19:58 ` kargl at gcc dot gnu.org
@ 2022-11-21 12:02 ` marxin at gcc dot gnu.org
2022-11-22 21:53 ` anlauf at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-11-21 12:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107577
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |anlauf at gcc dot gnu.org,
| |marxin at gcc dot gnu.org
Summary|[13 Regression] ICE in |[13 Regression] ICE in
|find_array_spec, at |find_array_spec, at
|fortran/resolve.cc:5008 |fortran/resolve.cc:5008
| |since
| |r13-1757-gf838d15641d256e2
--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r13-1757-gf838d15641d256e2.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/107577] [13 Regression] ICE in find_array_spec, at fortran/resolve.cc:5008 since r13-1757-gf838d15641d256e2
2022-11-08 17:29 [Bug fortran/107577] New: [13 Regression] ICE in find_array_spec, at fortran/resolve.cc:5008 gscfq@t-online.de
` (2 preceding siblings ...)
2022-11-21 12:02 ` [Bug fortran/107577] [13 Regression] ICE in find_array_spec, at fortran/resolve.cc:5008 since r13-1757-gf838d15641d256e2 marxin at gcc dot gnu.org
@ 2022-11-22 21:53 ` anlauf at gcc dot gnu.org
2022-11-23 18:29 ` cvs-commit at gcc dot gnu.org
2022-11-24 17:40 ` anlauf at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-11-22 21:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107577
--- Comment #3 from anlauf at gcc dot gnu.org ---
Submitted: https://gcc.gnu.org/pipermail/fortran/2022-November/058549.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/107577] [13 Regression] ICE in find_array_spec, at fortran/resolve.cc:5008 since r13-1757-gf838d15641d256e2
2022-11-08 17:29 [Bug fortran/107577] New: [13 Regression] ICE in find_array_spec, at fortran/resolve.cc:5008 gscfq@t-online.de
` (3 preceding siblings ...)
2022-11-22 21:53 ` anlauf at gcc dot gnu.org
@ 2022-11-23 18:29 ` cvs-commit at gcc dot gnu.org
2022-11-24 17:40 ` anlauf at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-11-23 18:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107577
--- 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:2eaa0cc45e8eae0fc4a440d28c602964bcb1014d
commit r13-4269-g2eaa0cc45e8eae0fc4a440d28c602964bcb1014d
Author: Steve Kargl <kargl@gcc.gnu.org>
Date: Tue Nov 22 22:31:51 2022 +0100
Fortran: error recovery on associate with bad selector [PR107577]
gcc/fortran/ChangeLog:
PR fortran/107577
* resolve.cc (find_array_spec): Choose appropriate locus either of
bad array reference or of non-array entity in error message.
gcc/testsuite/ChangeLog:
PR fortran/107577
* gfortran.dg/pr107577.f90: New test.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/107577] [13 Regression] ICE in find_array_spec, at fortran/resolve.cc:5008 since r13-1757-gf838d15641d256e2
2022-11-08 17:29 [Bug fortran/107577] New: [13 Regression] ICE in find_array_spec, at fortran/resolve.cc:5008 gscfq@t-online.de
` (4 preceding siblings ...)
2022-11-23 18:29 ` cvs-commit at gcc dot gnu.org
@ 2022-11-24 17:40 ` anlauf at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-11-24 17:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107577
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #5 from anlauf at gcc dot gnu.org ---
Fixed.
Thanks for the report, and to Steve for the patch.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-11-24 17:40 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-08 17:29 [Bug fortran/107577] New: [13 Regression] ICE in find_array_spec, at fortran/resolve.cc:5008 gscfq@t-online.de
2022-11-08 17:35 ` [Bug fortran/107577] " rguenth at gcc dot gnu.org
2022-11-08 19:58 ` kargl at gcc dot gnu.org
2022-11-21 12:02 ` [Bug fortran/107577] [13 Regression] ICE in find_array_spec, at fortran/resolve.cc:5008 since r13-1757-gf838d15641d256e2 marxin at gcc dot gnu.org
2022-11-22 21:53 ` anlauf at gcc dot gnu.org
2022-11-23 18:29 ` cvs-commit at gcc dot gnu.org
2022-11-24 17:40 ` anlauf 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).