From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 37B343858C48; Tue, 11 Jun 2024 11:28:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 37B343858C48 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1718105284; bh=3Oy2QJ6+mMbQ2W1KZxvO/iHUvdAPfN3fk6kjD07uBGE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=UR2SvhZpjhMWMFaeF0hrNlWIJpEQOJP+rbfBqKBaRmzrxQtSUuEUfy181vuu7GTOB y5/SqmsesX7vasoaH1t1yR7tR5xblepG8nPaSgBynT8damhLbp3mJq9Fae+EOW5lw5 GrNs81KoYuHxNGYefSTqvSRrhAx5R8ooF9Vxb1cY= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/115432] Building a program with -flto generates wrong code (missing the call to a function) unless -fno-strict-aliasing Date: Tue, 11 Jun 2024 11:28:04 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Version: 14.1.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth 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: 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=3D115432 --- Comment #1 from Richard Biener --- In case output_stream is not the same or derived from file_output_stream or contains a file_output_stream object as first member you invoke undefined behavior when the calls following might read from the object via output_str= eam or another alltogether different type (buffer_output_stream?).=