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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[PDT] f951: internal        |[PDT] Defult initialization
                   |compiler error: Aborted     |of PDT's does not work
                   |(free(): double free        |
                   |detected in tcache 2) when  |
                   |giving diagnostics on type  |
                   |of a parameter expression   |
                   |since                       |
                   |r8-3056-g5bab4c9631c478b7   |

--- Comment #6 from Paul Thomas <pault at gcc dot gnu.org> ---
The attachment to comment #5 fixes the problem in the title. However,
initialization such as:

    type(t2(KIND (1))) :: z = t2(KIND (1))(t(kind(1))(16))

does not. I have yet to find out why.

Interestingly, the other brands give:

pault@fedora:~/prs/pdt$ flang pr103371.f90
LLVM ERROR:
/builddir/build/BUILD/flang-21.1.4-build/llvm-project-21.1.4.src/flang/lib/Lower/Mangler.cpp:235:
not yet implemented: parameterized derived types

***This weird because this build of flang deals with all the other pdt tests
without LEN parameters. ***

pault@fedora:~/prs/pdt$ ifx pr103371.f90
pr103371.f90(39): error #6238: An integer constant expression is required in
this context.   [TM]
    type(t2(KIND (1))) :: z = t2(KIND (1))(t(kind(1))(16))
^
pr103371.f90(39): error #8746: The type and kind type parameters in a structure
constructor must be the same type and kind type parameters as the object.   [T]
    type(t2(KIND (1))) :: z = t2(KIND (1))(t(kind(1))(16))
^
pr103371.f90(39): error #6197: An assignment of different structure types is
invalid.   [X]
    type(t2(KIND (1))) :: z = t2(KIND (1))(t(kind(1))(16))
^
compilation aborted for pr103371.f90 (code 1)

***Since ifx does compile everything that I throw at it, I wonder if the
declaration is standard defying.? ***

Paul

Reply via email to