From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 731C93858CDB; Sun, 2 Apr 2023 18:59:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 731C93858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1680461951; bh=eU2c5isGlMGvE6kpdLfiCj/U0oD+tZVHSHBS+YC6++g=; h=From:To:Subject:Date:In-Reply-To:References:From; b=WcLQ8sAfpFeZBIv6W4peGUkFyUiFRXytZwuckulPpoDI8wB1EuYK7+Sy+SLFC5PyA DkKbjmf1LffqhATJq65peoA2wYdduV9ZgWChIJx67h5fyN/s1XDFVIuFbNT3Pl33b8 IRnPLYmKN82wZpdUF1R80obez1uNMdimSdJlYR7U= 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: Sun, 02 Apr 2023 18:59:09 +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 #12 from anlauf at gcc dot gnu.org --- (In reply to Bernhard Reutner-Fischer from comment #11) > Both the original testcase as well as the reduced testcase from comment #2 > compile fine for me with trunk from earlier today at r13-6974-g802ab7d0db= 5b5a The behavior of gfortran is very fragile. Consider the original testcase. Module CModule has no public symbols. Technically, the "use CModule" in module DModule should not have any effect. (Confirmed by other brands). However, commenting the "use CModule" reprodu= ces the original error message. This PR may be a duplicate of others that describe gfortran's confusion when using (intrinsic) modules along a module chain like here. Just try running gfortran under valgrind.=