From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0D12A3858D33; Tue, 25 Apr 2023 19:03:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0D12A3858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1682449422; bh=4nQcRFNdjzfpLfZ7jNauFP/k66aX66e/dOraN2LO7sA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=N89+++BHftABleGgJsO+NIcZz/uDY82BvKcKeyRc0uAo1Jcbmq90Cl0yHUbX/yA0s Hvkyb0i0/wYYdjGBZNN+SmbNXFDBc0+4+Ky/qnCZj+P6Y4scjAvogQ6hfJ7pfn6LI3 FVjcR0mrzEm1wDCQE3th2aixI1oO9iXwBB1rm2Ks= From: "anlauf at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/103931] Type name "c_ptr" is ambiguous when iso_c_binding is imported both directly and indirectly Date: Tue, 25 Apr 2023 19:03:41 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 10.2.1 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: anlauf at gcc dot gnu.org X-Bugzilla-Status: NEW 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: Message-ID: In-Reply-To: References: 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=3D103931 --- Comment #22 from anlauf at gcc dot gnu.org --- Here another invalid example which ICEs because the clash is not detected: module AModule implicit none type, bind(C) :: c_ptr private integer(8) :: c_address end type c_ptr end module module GModule use AModule, only: C_PTR use, intrinsic :: ISO_C_BINDING, only: C_PTR implicit none type(c_ptr) :: ptr end module This hits an assert a few lines above the place you looked at... (Interchanging the use statements helps here.)=