public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/106242] New: Internal compiler error: Parameterised derived types
@ 2022-07-09 14:06 kidon at posteo dot de
  2023-06-30  9:04 ` [Bug fortran/106242] [PDT] " pault at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: kidon at posteo dot de @ 2022-07-09 14:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106242

            Bug ID: 106242
           Summary: Internal compiler error: Parameterised derived types
           Product: gcc
           Version: 12.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kidon at posteo dot de
  Target Milestone: ---

The following example code implements nested parameterised derived types:

    module test
        type :: foo_type(n)
            integer, len     :: n
            character(len=n) :: s
        end type foo_type

        type :: bar_type(n)
            integer, len        :: n
            type(foo_type(n=n)) :: foo
        end type bar_type
    contains
        subroutine set_bar(bar, s)
            type(bar_type(n=*)), intent(inout) :: bar
            character(len=*),    intent(in)    :: s

            bar%foo%s = s
        end subroutine set_bar
    end module test

    program main
        use :: test
        type(bar_type(n=10)) :: bar

        call set_bar(bar, 'foo')
    end program main

Trying to build the example with GNU Fortran 12.1 on FreeBSD 13.1 results in an
internal compiler error:

$ gfortran -freport-bug -o test test.f90
f951: internal compiler error: Segmentation fault
0x19d832f internal_error(char const*, ...)
        ???:0
0x69e4b5 gfc_traverse_expr(gfc_expr*, gfc_symbol*, bool (*)(gfc_expr*,
gfc_symbol*, int*), int)
        ???:0
0x68b2e2 gfc_get_pdt_instance(gfc_actual_arglist*, gfc_symbol**,
gfc_actual_arglist**)
        ???:0
0x6966dc gfc_match_decl_type_spec(gfc_typespec*, int)
        ???:0
0x74455d gfc_parse_file()
        ???:0
Please submit a full bug report, with preprocessed source.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug fortran/106242] [PDT] Internal compiler error: Parameterised derived types
  2022-07-09 14:06 [Bug fortran/106242] New: Internal compiler error: Parameterised derived types kidon at posteo dot de
@ 2023-06-30  9:04 ` pault at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: pault at gcc dot gnu.org @ 2023-06-30  9:04 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106242

Paul Thomas <pault at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |82173
                 CC|                            |pault at gcc dot gnu.org
            Summary|Internal compiler error:    |[PDT] Internal compiler
                   |Parameterised derived types |error: Parameterised
                   |                            |derived types

--- Comment #1 from Paul Thomas <pault at gcc dot gnu.org> ---
Added to PDT meta-bug

I think that this might block 102241


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] 2+ messages in thread

end of thread, other threads:[~2023-06-30  9:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-09 14:06 [Bug fortran/106242] New: Internal compiler error: Parameterised derived types kidon at posteo dot de
2023-06-30  9:04 ` [Bug fortran/106242] [PDT] " 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).