From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8F1483858D32; Mon, 5 Sep 2022 08:01:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8F1483858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662364881; bh=25LPyNAE2ifibtWBtPUmwDGlS8/1NLXYdiL1dl9qU8Y=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ZdJiocEnN9L6HsEQc0Vzm7/+xb7rmU0+Db1yqC8AGqhDN6+xVcdoOcforXPr1zhSj z1P/pG103mAL2xteBfhH/IiKdfR1EHR5A56yXDpvD4hWNn9ZBTt/CsdfqIZT2K0Uy0 o6jb2hfOTTicB8tAsAlowJT2tQMWxS6FanWBWWS0= From: "markmigm at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/106820] internal compiler error: in function_and_variable_visibility [for std::shared_ptr{b,??} use via module] Date: Mon, 05 Sep 2022 08:01:20 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 12.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: markmigm at gmail dot com 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: short_desc 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=3D106820 Mark Millard changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|internal compiler error: in |internal compiler error: in |function_and_variable_visib |function_and_variable_visib |ility [for |ility [for |std::dynamic_pointer_cast |std::shared_ptr{b,??} |use via module] |use via module] --- Comment #2 from Mark Millard --- I've produced a more reduced example source: import ; struct data { virtual ~data() =3D default; }; auto test(std::shared_ptr b) { return std::shared_ptr{b,nullptr}; } nullptr is not special here: other alternative raw pointers also get the "internal compiler error: in function_and_variable_visibility" notice. nullptr is just the simplest example. Using a #include instead also gets the error (as expected) --unless the -fmodules-ts command line option is then omitted. -fmodules-ts is important to getting the message in the FreeBSD lang/gcc12 context.=