public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/102241] New: ICE when declaring derived type with a parameterized derived type member
@ 2021-09-08 15:21 roland_wirth at web dot de
2022-10-21 10:24 ` [Bug fortran/102241] " massoustephane at gmail dot com
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: roland_wirth at web dot de @ 2021-09-08 15:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102241
Bug ID: 102241
Summary: ICE when declaring derived type with a parameterized
derived type member
Product: gcc
Version: 9.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: roland_wirth at web dot de
Target Milestone: ---
The following code triggers an ICE in gfortran 9.1.0
MODULE mo
TYPE t1(n)
INTEGER, LEN :: n
INTEGER :: a(n)
END TYPE
TYPE t2
TYPE(t1(1)) :: p_t1
END TYPE
END MODULE
f951: internal compiler error: in gfc_get_derived_type, at
fortran/trans-types.c:2519
0x586d70 gfc_get_derived_type(gfc_symbol*, int)
../.././gcc/fortran/trans-types.c:2519
0x715384 gfc_get_derived_type(gfc_symbol*, int)
../.././gcc/fortran/trans-types.c:2670
0x715cd8 gfc_typenode_for_spec(gfc_typespec*, int)
../.././gcc/fortran/trans-types.c:1166
0x71601c gfc_sym_type(gfc_symbol*)
../.././gcc/fortran/trans-types.c:2247
0x71601c gfc_sym_type(gfc_symbol*)
../.././gcc/fortran/trans-types.c:2205
0x6bf0a2 gfc_get_symbol_decl(gfc_symbol*)
../.././gcc/fortran/trans-decl.c:1718
0x6c2178 gfc_create_module_variable
../.././gcc/fortran/trans-decl.c:5140
0x6c2178 gfc_create_module_variable
../.././gcc/fortran/trans-decl.c:5057
0x684912 do_traverse_symtree
../.././gcc/fortran/symbol.c:4166
0x6c2943 gfc_generate_module_vars(gfc_namespace*)
../.././gcc/fortran/trans-decl.c:5639
0x69f589 gfc_generate_module_code(gfc_namespace*)
../.././gcc/fortran/trans.c:2193
0x650285 translate_all_program_units
../.././gcc/fortran/parse.c:6121
0x650285 gfc_parse_file()
../.././gcc/fortran/parse.c:6337
0x6990ef gfc_be_parse_file
../.././gcc/fortran/f95-lang.c:204
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
The error persists when adding the POINTER attribute to p_t1 and when deferring
the type parameter (TYPE(t1(:))). Also for the invalid declaration with
deferred parameter, but without POINTER.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/102241] ICE when declaring derived type with a parameterized derived type member
2021-09-08 15:21 [Bug fortran/102241] New: ICE when declaring derived type with a parameterized derived type member roland_wirth at web dot de
@ 2022-10-21 10:24 ` massoustephane at gmail dot com
2022-10-21 17:07 ` [Bug fortran/102241] [PDT] " anlauf at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: massoustephane at gmail dot com @ 2022-10-21 10:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102241
Stéphane Massou <massoustephane at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |massoustephane at gmail dot com
--- Comment #1 from Stéphane Massou <massoustephane at gmail dot com> ---
Same kind of problems with gfortran 12.2.1 (Details :
https://stackoverflow.com/q/74143289/7462275)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/102241] [PDT] ICE when declaring derived type with a parameterized derived type member
2021-09-08 15:21 [Bug fortran/102241] New: ICE when declaring derived type with a parameterized derived type member roland_wirth at web dot de
2022-10-21 10:24 ` [Bug fortran/102241] " massoustephane at gmail dot com
@ 2022-10-21 17:07 ` anlauf at gcc dot gnu.org
2023-06-30 8:25 ` pault at gcc dot gnu.org
2024-05-10 17:30 ` oliverjahn at proton dot me
3 siblings, 0 replies; 5+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-10-21 17:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102241
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Summary|ICE when declaring derived |[PDT] ICE when declaring
|type with a parameterized |derived type with a
|derived type member |parameterized derived type
| |member
Last reconfirmed| |2022-10-21
--- Comment #2 from anlauf at gcc dot gnu.org ---
Confirmed.
We may need volunteers for fixing the PDT support.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/102241] [PDT] ICE when declaring derived type with a parameterized derived type member
2021-09-08 15:21 [Bug fortran/102241] New: ICE when declaring derived type with a parameterized derived type member roland_wirth at web dot de
2022-10-21 10:24 ` [Bug fortran/102241] " massoustephane at gmail dot com
2022-10-21 17:07 ` [Bug fortran/102241] [PDT] " anlauf at gcc dot gnu.org
@ 2023-06-30 8:25 ` pault at gcc dot gnu.org
2024-05-10 17:30 ` oliverjahn at proton dot me
3 siblings, 0 replies; 5+ messages in thread
From: pault at gcc dot gnu.org @ 2023-06-30 8:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102241
Paul Thomas <pault at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pault at gcc dot gnu.org
Blocks| |82173
--- Comment #3 from Paul Thomas <pault at gcc dot gnu.org> ---
Added to PDT meta-bug
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82173
[Bug 82173] [meta-bug] [PDT] Parameterized derived type errors
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/102241] [PDT] ICE when declaring derived type with a parameterized derived type member
2021-09-08 15:21 [Bug fortran/102241] New: ICE when declaring derived type with a parameterized derived type member roland_wirth at web dot de
` (2 preceding siblings ...)
2023-06-30 8:25 ` pault at gcc dot gnu.org
@ 2024-05-10 17:30 ` oliverjahn at proton dot me
3 siblings, 0 replies; 5+ messages in thread
From: oliverjahn at proton dot me @ 2024-05-10 17:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102241
Oliver Jahn <oliverjahn at proton dot me> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |oliverjahn at proton dot me
--- Comment #4 from Oliver Jahn <oliverjahn at proton dot me> ---
Same error with gfortran 14.1.0 on x86_64-pc-linux-gnu. Not sure it helps, but
I can get an error message instead of ICE if I use the pointer version of the
t2 type in a module subroutine:
MODULE mo
TYPE t1(n)
INTEGER, LEN :: n
INTEGER :: a(n)
END TYPE
TYPE t2
TYPE(t1(1)), POINTER :: p_t1
END TYPE
type(t1(1)), target :: t
type(t2) :: pt
CONTAINS
SUBROUTINE SR
pt%p_t1 => t
END SUBROUTINE
END MODULE
gives
mo.f90:17:8:
17 | pt%p_t1 => t
| 1
Error: Different types in pointer assignment at (1); attempted assignment of
TYPE(Pdtt1) to TYPE(t1)
and the same with deferred type parameter in t2.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-05-10 17:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-08 15:21 [Bug fortran/102241] New: ICE when declaring derived type with a parameterized derived type member roland_wirth at web dot de
2022-10-21 10:24 ` [Bug fortran/102241] " massoustephane at gmail dot com
2022-10-21 17:07 ` [Bug fortran/102241] [PDT] " anlauf at gcc dot gnu.org
2023-06-30 8:25 ` pault at gcc dot gnu.org
2024-05-10 17:30 ` oliverjahn at proton dot me
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).