From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2B094385DC00; Sat, 4 Apr 2020 17:33:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2B094385DC00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1586021636; bh=ZDQfO+7sT/AZX2Aj42GLuTWQB2jB18aaYDKwmDGfs48=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ddYYAxC4pQMYwJdygvG837AcKSqEqRRd8YpxjHDhSac995iNAHRQySpKjWTRSsJqU CekTwqTU/eVqjRieOgBcsgX2CAv8WlQOWeTtB7qQPM7oDjbR+nomDykNagu323fzW4 yz7wzgiX37zUh1PeeBVycz6DVT+NZvxMQ5xtTjss= From: "evan@coeus-group.com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/94482] Inserting into vector with optimization enabled on x86 generates incorrect result Date: Sat, 04 Apr 2020 17:33:56 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 9.3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: evan@coeus-group.com X-Bugzilla-Status: WAITING 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: attachments.created 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: Sat, 04 Apr 2020 17:33:56 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94482 --- Comment #2 from Evan Nemerson --- Created attachment 48195 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D48195&action=3Dedit Output from cc -v Sure. It's just -O2, and of course if you're on x86_64 you'll need to pass -m32. For example: cc -m32 -O2 -o 94482 94482.c I've attached the output when adding -v. If you drop either -m32 or -O2 from the flags, the program runs successfull= y.=20 Otherwise, you'll get an assertion failure: 94482: 94482.c:46: main: Assertion `r_.i64[0] =3D=3D 1729' failed. Aborted (core dumped)=