public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/104555] New: ICE in gfc_compare_derived_types, at fortran/interface.cc:628
@ 2022-02-15 19:40 gscfq@t-online.de
2022-02-15 19:41 ` [Bug fortran/104555] " gscfq@t-online.de
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: gscfq@t-online.de @ 2022-02-15 19:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104555
Bug ID: 104555
Summary: ICE in gfc_compare_derived_types, at
fortran/interface.cc:628
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: ---
Starts with r10, changed between 20190825 and 20190901 :
$ cat z1.f90
program p
type t
character(:), allocatable :: a
end type
contains
subroutine s(x)
class(t) :: x(..)
select rank (x)
rank (1)
select type (y => x)
type is (t)
end select
end select
end
end
$ gfortran-12-20220213 -c z1.f90
f951: internal compiler error: Segmentation fault
0xcc8a9f crash_signal
../../gcc/toplev.cc:322
0x6fbdbc gfc_compare_derived_types(gfc_symbol*, gfc_symbol*)
../../gcc/fortran/interface.cc:628
0x792efe gfc_type_is_extension_of(gfc_symbol*, gfc_symbol*)
../../gcc/fortran/symbol.cc:5116
0x77373c resolve_select_type
../../gcc/fortran/resolve.cc:9451
0x768b23 gfc_resolve_code(gfc_code*, gfc_namespace*)
../../gcc/fortran/resolve.cc:12173
0x76ab87 resolve_codes
../../gcc/fortran/resolve.cc:17536
0x76ac4e gfc_resolve(gfc_namespace*)
../../gcc/fortran/resolve.cc:17571
0x768c99 gfc_resolve(gfc_namespace*)
../../gcc/fortran/resolve.cc:17556
0x768c99 resolve_block_construct
../../gcc/fortran/resolve.cc:10791
0x768c99 gfc_resolve_code(gfc_code*, gfc_namespace*)
../../gcc/fortran/resolve.cc:12181
0x767eef gfc_resolve_blocks(gfc_code*, gfc_namespace*)
../../gcc/fortran/resolve.cc:10943
0x769edf resolve_select_rank
../../gcc/fortran/resolve.cc:9953
0x769edf gfc_resolve_code(gfc_code*, gfc_namespace*)
../../gcc/fortran/resolve.cc:12177
0x76ab87 resolve_codes
../../gcc/fortran/resolve.cc:17536
0x76aabe resolve_codes
../../gcc/fortran/resolve.cc:17519
0x76ac4e gfc_resolve(gfc_namespace*)
../../gcc/fortran/resolve.cc:17571
0x752f74 resolve_all_program_units
../../gcc/fortran/parse.cc:6586
0x752f74 gfc_parse_file()
../../gcc/fortran/parse.cc:6842
0x7a066f gfc_be_parse_file
../../gcc/fortran/f95-lang.cc:216
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/104555] ICE in gfc_compare_derived_types, at fortran/interface.cc:628
2022-02-15 19:40 [Bug fortran/104555] New: ICE in gfc_compare_derived_types, at fortran/interface.cc:628 gscfq@t-online.de
@ 2022-02-15 19:41 ` gscfq@t-online.de
2022-02-24 11:23 ` [Bug fortran/104555] ICE in gfc_compare_derived_types, at fortran/interface.cc:628 since r10-2912-g70570ec192745095 marxin at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: gscfq@t-online.de @ 2022-02-15 19:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104555
G. Steinmetz <gscfq@t-online.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-invalid-code
--- Comment #1 from G. Steinmetz <gscfq@t-online.de> ---
For comparison :
$ cat z2.f90
program p
type t
character(:), allocatable :: a
end type
contains
subroutine s(x)
class(t) :: x(..)
select rank (x)
rank (1)
select type (x)
type is (t)
end select
end select
end
end
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/104555] ICE in gfc_compare_derived_types, at fortran/interface.cc:628 since r10-2912-g70570ec192745095
2022-02-15 19:40 [Bug fortran/104555] New: ICE in gfc_compare_derived_types, at fortran/interface.cc:628 gscfq@t-online.de
2022-02-15 19:41 ` [Bug fortran/104555] " gscfq@t-online.de
@ 2022-02-24 11:23 ` marxin at gcc dot gnu.org
2023-10-27 19:39 ` anlauf at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-02-24 11:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104555
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Summary|ICE in |ICE in
|gfc_compare_derived_types, |gfc_compare_derived_types,
|at fortran/interface.cc:628 |at fortran/interface.cc:628
| |since
| |r10-2912-g70570ec192745095
Last reconfirmed| |2022-02-24
Status|UNCONFIRMED |NEW
CC| |marxin at gcc dot gnu.org,
| |pault at gcc dot gnu.org
--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r10-2912-g70570ec192745095.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/104555] ICE in gfc_compare_derived_types, at fortran/interface.cc:628 since r10-2912-g70570ec192745095
2022-02-15 19:40 [Bug fortran/104555] New: ICE in gfc_compare_derived_types, at fortran/interface.cc:628 gscfq@t-online.de
2022-02-15 19:41 ` [Bug fortran/104555] " gscfq@t-online.de
2022-02-24 11:23 ` [Bug fortran/104555] ICE in gfc_compare_derived_types, at fortran/interface.cc:628 since r10-2912-g70570ec192745095 marxin at gcc dot gnu.org
@ 2023-10-27 19:39 ` anlauf at gcc dot gnu.org
2023-10-30 7:13 ` cvs-commit at gcc dot gnu.org
2023-10-30 8:25 ` pault at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: anlauf at gcc dot gnu.org @ 2023-10-27 19:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104555
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |anlauf at gcc dot gnu.org
--- Comment #3 from anlauf at gcc dot gnu.org ---
In this case the associate-name is essential in the SELECT TYPE,
as well as the surrounding SELECT RANK, and a CHARACTER component
in the derived type.
Replacing
character(:), allocatable :: a
by
character(10) :: a
changes the ICE to a bogus error message with a corrupted variable name.
valgrind gives invalid reads...
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/104555] ICE in gfc_compare_derived_types, at fortran/interface.cc:628 since r10-2912-g70570ec192745095
2022-02-15 19:40 [Bug fortran/104555] New: ICE in gfc_compare_derived_types, at fortran/interface.cc:628 gscfq@t-online.de
` (2 preceding siblings ...)
2023-10-27 19:39 ` anlauf at gcc dot gnu.org
@ 2023-10-30 7:13 ` cvs-commit at gcc dot gnu.org
2023-10-30 8:25 ` pault at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-10-30 7:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104555
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Paul Thomas <pault@gcc.gnu.org>:
https://gcc.gnu.org/g:f3e44d079747daf56307ada8a2e2e56b64934014
commit r14-5003-gf3e44d079747daf56307ada8a2e2e56b64934014
Author: Paul Thomas <pault@gcc.gnu.org>
Date: Mon Oct 30 07:12:40 2023 +0000
Fortran: Fix a problem with SELECT TYPE selectors [PR104555].
2023-10-30 Paul Thomas <pault@gcc.gnu.org>
gcc/fortran
PR fortran/104555
* resolve.cc (resolve_select_type): If the selector expression
has no class component references and the expression is a
derived type, copy the typespec of the symbol to that of the
expression.
gcc/testsuite/
PR fortran/104555
* gfortran.dg/pr104555.f90: New test.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/104555] ICE in gfc_compare_derived_types, at fortran/interface.cc:628 since r10-2912-g70570ec192745095
2022-02-15 19:40 [Bug fortran/104555] New: ICE in gfc_compare_derived_types, at fortran/interface.cc:628 gscfq@t-online.de
` (3 preceding siblings ...)
2023-10-30 7:13 ` cvs-commit at gcc dot gnu.org
@ 2023-10-30 8:25 ` pault at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: pault at gcc dot gnu.org @ 2023-10-30 8:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104555
Paul Thomas <pault at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #5 from Paul Thomas <pault at gcc dot gnu.org> ---
It should be noted that the revision in comment 2 introduced select rank.
Before that, the select rank statement gave an "unclassifiable statement" error
and the resulting error cascade.
Fixed on mainline. Closing for now but I am inclined to backport with the patch
for pr104625 in a few weeks time.
Thanks for the report.
Paul
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-10-30 8:25 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-15 19:40 [Bug fortran/104555] New: ICE in gfc_compare_derived_types, at fortran/interface.cc:628 gscfq@t-online.de
2022-02-15 19:41 ` [Bug fortran/104555] " gscfq@t-online.de
2022-02-24 11:23 ` [Bug fortran/104555] ICE in gfc_compare_derived_types, at fortran/interface.cc:628 since r10-2912-g70570ec192745095 marxin at gcc dot gnu.org
2023-10-27 19:39 ` anlauf at gcc dot gnu.org
2023-10-30 7:13 ` cvs-commit at gcc dot gnu.org
2023-10-30 8:25 ` pault 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).