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

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).