https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104393
Bug ID: 104393 Summary: incorrect results with elemental functions of scalar derived types with allocatable components Product: gcc Version: og11 (devel/omp/gcc-11) Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: a.shahmoradi at gmail dot com Target Milestone: --- Created attachment 52354 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52354&action=edit main program to reproduce the bug The elemental attribute for functions that take derived-type scalar containers with allocatable components does not yield the correct result. The following is the output of the test program supplied, compiled with gfortran-11 elementalBugGfortran10.f90 on Microsoft Subsystem for Linux (WSL-2). ! This result is incorrect ismore([Container('A'), Container('B'), Container('C')], Container('B')) F T T ! This result is the expected answer and is correct ['A', 'B', 'C'] > 'B' F F T