public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/108528] New: [13 Regression] ICE in gfc_compare_array_spec(): Array spec clobbered
@ 2023-01-24 17:52 gscfq@t-online.de
2023-01-24 19:08 ` [Bug fortran/108528] " kargl at gcc dot gnu.org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: gscfq@t-online.de @ 2023-01-24 17:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108528
Bug ID: 108528
Summary: [13 Regression] ICE in gfc_compare_array_spec(): Array
spec clobbered
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 20221218 and 20230108 :
$ cat z1.f90
function f()
integer :: f((2.))
integer :: g((2))
entry g()
end
$ cat z2.f90
function f()
integer :: f(real(2))
integer :: g((2))
entry g()
end
$ gfortran-13-20230122 -c z1.f90
f951: internal compiler error: gfc_compare_array_spec(): Array spec clobbered
0x7c17e9 gfc_report_diagnostic
../../gcc/fortran/error.cc:883
0x7c3387 gfc_internal_error(char const*, ...)
../../gcc/fortran/error.cc:1503
0x78dda4 compare_bounds
../../gcc/fortran/array.cc:982
0x78f73c gfc_compare_array_spec(gfc_array_spec*, gfc_array_spec*)
../../gcc/fortran/array.cc:1026
0x8333ff resolve_entries
../../gcc/fortran/resolve.cc:799
0x8461ef resolve_types
../../gcc/fortran/resolve.cc:17531
0x84175c gfc_resolve(gfc_namespace*)
../../gcc/fortran/resolve.cc:17662
0x8294d4 resolve_all_program_units
../../gcc/fortran/parse.cc:6656
0x8294d4 gfc_parse_file()
../../gcc/fortran/parse.cc:6912
0x8774bf gfc_be_parse_file
../../gcc/fortran/f95-lang.cc:229
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/108528] [13 Regression] ICE in gfc_compare_array_spec(): Array spec clobbered
2023-01-24 17:52 [Bug fortran/108528] New: [13 Regression] ICE in gfc_compare_array_spec(): Array spec clobbered gscfq@t-online.de
@ 2023-01-24 19:08 ` kargl at gcc dot gnu.org
2023-01-24 19:08 ` kargl at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: kargl at gcc dot gnu.org @ 2023-01-24 19:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108528
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
CC| |kargl at gcc dot gnu.org
--- Comment #1 from kargl at gcc dot gnu.org ---
The help function causes an ICE when it can simply return false.
This then lets gfortran send forth a few error messages.
diff --git a/gcc/fortran/array.cc b/gcc/fortran/array.cc
index e8a2c32a627..be5eb8b6a0f 100644
--- a/gcc/fortran/array.cc
+++ b/gcc/fortran/array.cc
@@ -967,7 +967,7 @@ gfc_copy_array_spec (gfc_array_spec *src)
/* Returns nonzero if the two expressions are equal.
- We should not need to support more than constant values, as thatâs what
is
+ We should not need to support more than constant values, as that's what is
allowed in derived type component array spec. However, we may create types
with non-constant array spec for dummy variable class container types, for
which the _data component holds the array spec of the variable declaration.
@@ -979,7 +979,7 @@ compare_bounds (gfc_expr *bound1, gfc_expr *bound2)
if (bound1 == NULL || bound2 == NULL
|| bound1->ts.type != BT_INTEGER
|| bound2->ts.type != BT_INTEGER)
- gfc_internal_error ("gfc_compare_array_spec(): Array spec clobbered");
+ return false;
/* What qualifies as identical bounds? We could probably just check that
the
expressions are exact clones. We avoid rewriting a specific comparison
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/108528] [13 Regression] ICE in gfc_compare_array_spec(): Array spec clobbered
2023-01-24 17:52 [Bug fortran/108528] New: [13 Regression] ICE in gfc_compare_array_spec(): Array spec clobbered gscfq@t-online.de
2023-01-24 19:08 ` [Bug fortran/108528] " kargl at gcc dot gnu.org
@ 2023-01-24 19:08 ` kargl at gcc dot gnu.org
2023-01-24 20:25 ` anlauf at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: kargl at gcc dot gnu.org @ 2023-01-24 19:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108528
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2023-01-24
Ever confirmed|0 |1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/108528] [13 Regression] ICE in gfc_compare_array_spec(): Array spec clobbered
2023-01-24 17:52 [Bug fortran/108528] New: [13 Regression] ICE in gfc_compare_array_spec(): Array spec clobbered gscfq@t-online.de
2023-01-24 19:08 ` [Bug fortran/108528] " kargl at gcc dot gnu.org
2023-01-24 19:08 ` kargl at gcc dot gnu.org
@ 2023-01-24 20:25 ` anlauf at gcc dot gnu.org
2023-01-25 7:36 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: anlauf at gcc dot gnu.org @ 2023-01-24 20:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108528
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 ---
(In reply to kargl from comment #1)
> The help function causes an ICE when it can simply return false.
> This then lets gfortran send forth a few error messages.
This is indeed better. One internal error less...
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/108528] [13 Regression] ICE in gfc_compare_array_spec(): Array spec clobbered
2023-01-24 17:52 [Bug fortran/108528] New: [13 Regression] ICE in gfc_compare_array_spec(): Array spec clobbered gscfq@t-online.de
` (2 preceding siblings ...)
2023-01-24 20:25 ` anlauf at gcc dot gnu.org
@ 2023-01-25 7:36 ` rguenth at gcc dot gnu.org
2023-01-25 19:44 ` anlauf at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-01-25 7:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108528
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |13.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/108528] [13 Regression] ICE in gfc_compare_array_spec(): Array spec clobbered
2023-01-24 17:52 [Bug fortran/108528] New: [13 Regression] ICE in gfc_compare_array_spec(): Array spec clobbered gscfq@t-online.de
` (3 preceding siblings ...)
2023-01-25 7:36 ` rguenth at gcc dot gnu.org
@ 2023-01-25 19:44 ` anlauf at gcc dot gnu.org
2023-01-25 19:47 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: anlauf at gcc dot gnu.org @ 2023-01-25 19:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108528
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |anlauf at gcc dot gnu.org
Status|NEW |ASSIGNED
--- Comment #3 from anlauf at gcc dot gnu.org ---
Steve, I'm going to commit your patch.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/108528] [13 Regression] ICE in gfc_compare_array_spec(): Array spec clobbered
2023-01-24 17:52 [Bug fortran/108528] New: [13 Regression] ICE in gfc_compare_array_spec(): Array spec clobbered gscfq@t-online.de
` (4 preceding siblings ...)
2023-01-25 19:44 ` anlauf at gcc dot gnu.org
@ 2023-01-25 19:47 ` cvs-commit at gcc dot gnu.org
2023-01-25 19:52 ` sgk at troutmask dot apl.washington.edu
2023-01-25 19:54 ` anlauf at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-01-25 19:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108528
--- 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:9fb9da3d38513d320bfea72050f7a59688595e0b
commit r13-5374-g9fb9da3d38513d320bfea72050f7a59688595e0b
Author: Steve Kargl <kargl@gcc.gnu.org>
Date: Wed Jan 25 20:38:43 2023 +0100
Fortran: ICE in gfc_compare_array_spec [PR108528]
gcc/fortran/ChangeLog:
PR fortran/108528
* array.cc (compare_bounds): Return false instead of generating an
internal error on an invalid argument type.
gcc/testsuite/ChangeLog:
PR fortran/108528
* gfortran.dg/pr108528.f90: New test.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/108528] [13 Regression] ICE in gfc_compare_array_spec(): Array spec clobbered
2023-01-24 17:52 [Bug fortran/108528] New: [13 Regression] ICE in gfc_compare_array_spec(): Array spec clobbered gscfq@t-online.de
` (5 preceding siblings ...)
2023-01-25 19:47 ` cvs-commit at gcc dot gnu.org
@ 2023-01-25 19:52 ` sgk at troutmask dot apl.washington.edu
2023-01-25 19:54 ` anlauf at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: sgk at troutmask dot apl.washington.edu @ 2023-01-25 19:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108528
--- Comment #5 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Wed, Jan 25, 2023 at 07:44:05PM +0000, anlauf at gcc dot gnu.org wrote:
>
> --- Comment #3 from anlauf at gcc dot gnu.org ---
> Steve, I'm going to commit your patch.
>
Thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/108528] [13 Regression] ICE in gfc_compare_array_spec(): Array spec clobbered
2023-01-24 17:52 [Bug fortran/108528] New: [13 Regression] ICE in gfc_compare_array_spec(): Array spec clobbered gscfq@t-online.de
` (6 preceding siblings ...)
2023-01-25 19:52 ` sgk at troutmask dot apl.washington.edu
@ 2023-01-25 19:54 ` anlauf at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: anlauf at gcc dot gnu.org @ 2023-01-25 19:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108528
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #6 from anlauf at gcc dot gnu.org ---
Fixed on mainline for gcc-13.
Thanks for the report, and to Steve for the patch.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2023-01-25 19:54 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-24 17:52 [Bug fortran/108528] New: [13 Regression] ICE in gfc_compare_array_spec(): Array spec clobbered gscfq@t-online.de
2023-01-24 19:08 ` [Bug fortran/108528] " kargl at gcc dot gnu.org
2023-01-24 19:08 ` kargl at gcc dot gnu.org
2023-01-24 20:25 ` anlauf at gcc dot gnu.org
2023-01-25 7:36 ` rguenth at gcc dot gnu.org
2023-01-25 19:44 ` anlauf at gcc dot gnu.org
2023-01-25 19:47 ` cvs-commit at gcc dot gnu.org
2023-01-25 19:52 ` sgk at troutmask dot apl.washington.edu
2023-01-25 19:54 ` 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).