From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 54F2F385516A; Mon, 28 Nov 2022 17:59:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 54F2F385516A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669658391; bh=sKBanpBIRpL/d9Xfz9Lk9eMcWxoPlQ3s3XaigVYhXpo=; h=From:To:Subject:Date:From; b=SthWY68WbQs75jlmOjcDXlG7zQgSBHE+AnXtDbWakTYjZC1GzpkB5g1MJhfDgS+k4 3TgGMyo4tPDUlsl45Q2VkAiUc7UAlDEYMBsfTx3Ri2Pfi0/TxJq62eJTr3RlxKn8sI fSZBVy5X836CkcAbyLmddmeRowCkbmkpbatIX8ow= From: "gscfq@t-online.de" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/107899] New: ICE in resolve_deallocate_expr, at fortran/resolve.cc:7576 Date: Mon, 28 Nov 2022 17:59:51 +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: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gscfq@t-online.de 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=3D107899 Bug ID: 107899 Summary: ICE in resolve_deallocate_expr, at fortran/resolve.cc:7576 Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gscfq@t-online.de Target Milestone: --- Affects versions down to at least r5 : (target instead of allocatable) $ cat z1.f90 program p type t end type class(t), target :: x[:] if (allocated(x)) deallocate (x) end $ cat z2.f90 program p type t end type class(t), target :: x[:] deallocate(x) end $ gfortran-13-20221127 -c z1.f90 -fcoarray=3Dlib z1.f90:4:27: 4 | class(t), target :: x[:] | 1 Error: Coarray variable 'x' at (1) shall not have codimensions with deferred shape z1.f90:5:17: 5 | if (allocated(x)) deallocate (x) | 1 Error: 'array' argument of 'allocated' intrinsic at (1) must be ALLOCATABLE f951: internal compiler error: Segmentation fault 0xf36d0f crash_signal ../../gcc/toplev.cc:314 0x87a956 resolve_deallocate_expr ../../gcc/fortran/resolve.cc:7576 0x87a956 resolve_allocate_deallocate ../../gcc/fortran/resolve.cc:8461 0x87cfac gfc_resolve_code(gfc_code*, gfc_namespace*) ../../gcc/fortran/resolve.cc:12291 0x87b2ff gfc_resolve_blocks(gfc_code*, gfc_namespace*) ../../gcc/fortran/resolve.cc:10979 0x87b658 gfc_resolve_code(gfc_code*, gfc_namespace*) ../../gcc/fortran/resolve.cc:11971 0x87e407 resolve_codes ../../gcc/fortran/resolve.cc:17628 0x87e4ce gfc_resolve(gfc_namespace*) ../../gcc/fortran/resolve.cc:17663 0x866294 resolve_all_program_units ../../gcc/fortran/parse.cc:6631 0x866294 gfc_parse_file() ../../gcc/fortran/parse.cc:6887 0x8b4d3f gfc_be_parse_file ../../gcc/fortran/f95-lang.cc:229=