From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AA8D9383543D; Sun, 9 Jan 2022 23:12:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AA8D9383543D From: "ffadrique at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/103957] New: ICE passing return value from elemental type bound procedure Date: Sun, 09 Jan 2022 23:12:09 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 9.3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ffadrique at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jan 2022 23:12:09 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103957 Bug ID: 103957 Summary: ICE passing return value from elemental type bound procedure Product: gcc Version: 9.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: ffadrique at gmail dot com Target Milestone: --- Created attachment 52149 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D52149&action=3Dedit Type used for the type bound procedure The attached code produces an ICE when compiled with 9.3.0 (my reference compiler) Does not occur with 10, 11 and 12. The problem appears on the polymorphic array (elements) but not in the array declared with type and fixed length. If the array is allocatable but not polymorphic the issue does not occur either. Compiler error follows: fran@atlantis:~/tmp/passing_elemental$ gfortran Use.f03 Program.f03 -o Program.bin=20 Program.f03:15:0: 15 | call check_array( elements%get_i() ) |=20 internal compiler error: in gfc_conv_expr_descriptor, at fortran/trans-array.c:7348 Please submit a full bug report, with preprocessed source if appropriate. See for instructions. fran@atlantis:~/tmp/passing_elemental$=