From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6DDDA3858D28; Sun, 31 Mar 2024 06:59:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6DDDA3858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1711868341; bh=KhWR6aZhvGNqJuGmXtmd7G7e0VudG+k/PtsPRd1beQY=; h=From:To:Subject:Date:From; b=FxZmdgYzxlpd8pUDzE5Ia7iYhGDvFceeQQ0q21VaryLyrGVsMqrDPTOw25qHGRD7C C6j+eFbAVhBUAK1gtkQfDwNqRzWJg5vo83ejwWPqC1WVzzd5dtRIpxYVlqREz/E74p VRbopigDEeQEBmzUJBgT+aEFw3SrakpU1R8JMN6M= From: "abensonca at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/114535] New: ICE with elemental finalizer Date: Sun, 31 Mar 2024 06:59:00 +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: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: abensonca at gcc dot gnu.org 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 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D114535 Bug ID: 114535 Summary: ICE with elemental finalizer Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: abensonca at gcc dot gnu.org Target Milestone: --- The following code (which must be in two files to trigger the error) causes= an ICE using the latest gfortran. $ cat ice1.F90 module iv type, public :: vs contains final :: destructor end type vs contains elemental subroutine destructor(s) type(vs), intent(inout) :: s end subroutine destructor end module iv $ cat ice2.F90 module d contains function en() result(dd) use :: iv type(vs) :: dd return end function en end module d module ni contains subroutine iss() use :: d return end subroutine iss end module ni $ gfortran -v Using built-in specs. COLLECT_GCC=3Dgfortran COLLECT_LTO_WRAPPER=3D/data001/abenson/Galacticus/Tools_Devel/bin/../libexe= c/gcc/x86_64-pc-linux-gnu/14.0.1/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc-git/configure --prefix=3D/home/abenson/Galacticus/Tools_Devel --enable-languages=3Dc,c++,= fortran --disable-multilib Thread model: posix Supported LTO compression algorithms: zlib gcc version 14.0.1 20240330 (experimental) (GCC) $ gfortran -c ice1.F90 -o ice1.o=20=20=20 $ gfortran -c ice2.F90 -o ice2.o=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 ice2.F90:16:13:=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 16 | end module ni | = 1 internal compiler error: in gfc_trans_call, at fortran/trans-stmt.cc:400=20= =20=20=20=20=20=20 0x78ddb6 gfc_trans_call(gfc_code*, bool, tree_node*, tree_node*, bool) ../../gcc-git/gcc/fortran/trans-stmt.cc:400 0xaa8a1b trans_code= =20=20=20=20 ../../gcc-git/gcc/fortran/trans.cc:= 2431 0xb47c14 gfc_trans_simple_do ../../gcc-git/gcc/fortran/trans-stmt.cc:2521 0xb47c14 gfc_trans_do(gfc_code*, tree_node*) ../../gcc-git/gcc/fortran/trans-stmt.cc:2653 0xaa898a trans_code=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20 ../../gcc-git/gcc/fortran/trans.cc:2463 0xb485e9 gfc_trans_integer_select=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 ../../gcc-git/gcc/fortran/trans-stmt.cc:3199 0xb485e9 gfc_trans_select(gfc_code*) ../../gcc-git/gcc/fortran/trans-stmt.cc:3692 0xaa8957 trans_code ../../gcc-git/gcc/fortran/trans.cc:2475 0xadd6fb gfc_generate_function_code(gfc_namespace*) ../../gcc-git/gcc/fortran/trans-decl.cc:7879 0xaadbf1 gfc_generate_module_code(gfc_namespace*) ../../gcc-git/gcc/fortran/trans.cc:2785 0xa5113d translate_all_program_units ../../gcc-git/gcc/fortran/parse.cc:7086 0xa5113d gfc_parse_file() ../../gcc-git/gcc/fortran/parse.cc:7413 0xaa546f gfc_be_parse_file ../../gcc-git/gcc/fortran/f95-lang.cc:241 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See for instructions. This only occurs if the FINAL subroutine is ELEMENTAL.=