From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9D85B392AC2A; Mon, 12 Sep 2022 17:51:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9D85B392AC2A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663005090; bh=8VxugHc/sA1FFUdwpxowXuPVJ+2pRVru/YGMnNOH1tU=; h=From:To:Subject:Date:From; b=IejknCnllVY7Pc9Z1/wKLsFf9Xd9D6WktWIi4iEK5MuTxItExVMbnRhQTrPTGzD29 aoKP35ndxLUIOLY6tyuZeHl1FC1eRAgfCF6s8hk6o637xeFRhbHAUWkjIL3OcVKIJp 2LL3OBArdcLLaVmykedUm+y/ghotpQobTUBqq1dg= From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/106916] New: ICE/segfault during parsing with modules and invalid code in gfc_free_namespace when using the same symbol twice Date: Mon, 12 Sep 2022 17:51:30 +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: ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus 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 keywords 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=3D106916 Bug ID: 106916 Summary: ICE/segfault during parsing with modules and invalid code in gfc_free_namespace when using the same symbol twice Product: gcc Version: 13.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: burnus at gcc dot gnu.org Target Milestone: --- f951: internal compiler error: in gfc_free_namespace, at fortran/symbol.cc:= 4039 0x686c77 gfc_free_namespace(gfc_namespace*&) ../../repos/gcc/gcc/fortran/symbol.cc:4039 0xa29daf gfc_free_symbol(gfc_symbol*&) ../../repos/gcc/gcc/fortran/symbol.cc:3085 0xa29e85 gfc_release_symbol(gfc_symbol*&) ../../repos/gcc/gcc/fortran/symbol.cc:3127 for the invalid attached testcase. -fopenmp is in theory required. There are two issues: * The same symbol is used twice, once use associated and once newly defin= ed in an interface block. * There is a tailing '::' module omp_lib_target use omp_lib implicit none (type, external) interface logical function omp_target_is_present(ptr, device_num) type(*), dimension(..) ::=20 end function omp_target_is_present end interface end module omp_lib_target=