From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C1CCD3858CDB; Thu, 2 Mar 2023 20:42:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C1CCD3858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677789768; bh=0dh2LwXKswazu/YBMJuCnZU2XdtwAMfp9HVcwzcCjJA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=lAImXF9b9QMccnG+nXKvCvN+vaqvomuAUwMYOAbwsMlY3iz1mVV0JycbOm5Uo6xck Ozk+RK52cMWlGLM+zlfQpAtZvs1nOLKbPwdC6XwKeSZGvWKridJ3kWBO3o/9R1lKf/ vid/3vBrkGGS5lyV0HbCSMfXoDNMwIuZIe6vlgH0= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/108993] Value initialization does not occur for derived class , for gcc versions > 5 Date: Thu, 02 Mar 2023 20:42:48 +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: unknown X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia 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: keywords 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=3D108993 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |wrong-code --- Comment #1 from Andrew Pinski --- Hmm, I noticed that since GCC 7 with -std=3Dc++17, the b.x is not initialized a= t all. So the question I have is there a difference between C++ standards here? Note the issue is we call Base's constructor after doing the zero initialization and the Base's constructor has a clobber in it which I think= is correct. This is all front-end generation and not exactly related to the optimizatio= ns directly.=