[Bug fortran/99549] New: Segfault when scalar argument of elemental function is both derived type with allocatable component and a function result
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99549 Bug ID: 99549 Summary: Segfault when scalar argument of elemental function is both derived type with allocatable component and a function result Product: gcc Version: 10.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: here.is.a.gcc.bug at gmail dot com Target Milestone: --- Created attachment 50363 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50363&action=edit A self-contained fortran program which causes the bug. An elemental function is called where one argument is an array and another argument is a scalar. If the scalar argument is both: - A derived type with an allocatable component - The result of a function call (an rvalue in c++ speak) Then a segfault happens.
[Bug fortran/100602] New: Erroneous "pointer argument is not associated" runtime error.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100602 Bug ID: 100602 Summary: Erroneous "pointer argument is not associated" runtime error. Product: gcc Version: 11.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: here.is.a.gcc.bug at gmail dot com Target Milestone: --- Created attachment 50813 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50813&action=edit A minimal broken example. (14 lines) Compiling with -check=all gives a runtime error "Pointer argument `this` is not associated" This only happens using gfortran-11.1. I'm unsure if this is this bug [1] [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99602
[Bug fortran/100650] New: Passing a derived-type array constructor to the reshape intrinsic gives incorrect results
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100650 Bug ID: 100650 Summary: Passing a derived-type array constructor to the reshape intrinsic gives incorrect results Product: gcc Version: 11.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: here.is.a.gcc.bug at gmail dot com Target Milestone: --- Created attachment 50836 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50836&action=edit A minimum broken example. Needs no special compiler flags. A type `String` has a `character(:), allocatable` component. When an array constructor of type `String` is passed to the reshape intrinsic, the components of the resulting array are incorrect. The bug does not trigger if the array constructor is used to create a named array and this named array is passed to the reshape intrinsic. This affects at least versions 7.4.0, 10.1.0 and 11.1.1 of gfortran.