From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A8F8F385841E; Mon, 17 Jan 2022 15:24:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A8F8F385841E From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/53932] [9/10/11/12 Regression] C++ reference variable to member of anonymous union in global is error Date: Mon, 17 Jan 2022 15:24:51 +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: 4.3.4 X-Bugzilla-Keywords: assemble-failure, ice-on-valid-code, link-failure X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth 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: 9.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jan 2022 15:24:51 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D53932 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hubicka at gcc dot gnu.org --- Comment #3 from Richard Biener --- with > ./cc1plus -quiet t.ii -flto during IPA pass: modref t.ii:3:24: internal compiler error: in get_partitioning_class, at symtab.c:= 2095 3 | int main() { return r; } | ^ 0x1111438 symtab_node::get_partitioning_class() /home/rguenther/src/gcc3/gcc/symtab.c:2095 0x159f81c lto_output_varpool_node /home/rguenther/src/gcc3/gcc/lto-cgraph.c:622 0x15a079e output_symtab() /home/rguenther/src/gcc3/gcc/lto-cgraph.c:989 0x15bd1bd lto_output() /home/rguenther/src/gcc3/gcc/lto-streamer-out.c:2813 0x16a3a79 write_lto /home/rguenther/src/gcc3/gcc/passes.c:2761 (gdb) p node->debug() i/3 (i) @0x7ffff66c1100 Type: variable Body removed by symtab_remove_unreachable_nodes Visibility: semantic_interposition artificial References:=20 Referring: r/1 (addr)=20 Availability: not_available Varpool flags: $2 =3D void so we somehow remove the variable because either the DECL_INITIAL walks do = not work or because the C++ FE screws up in setting things up.=