From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6507 invoked by alias); 5 Feb 2014 19:22:56 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 6483 invoked by uid 48); 5 Feb 2014 19:22:53 -0000 From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/60084] GCC 4.8.3 miscompiles code on ARM at -Os optimization level Date: Wed, 05 Feb 2014 19:22:00 -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: 4.8.3 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: RESOLVED 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: bug_status resolution 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-SW-Source: 2014-02/txt/msg00498.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D60084 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #7 from Andrew Pinski --- I get the following warning: ./startup/ROMCopy.c:15:9: warning: array =E2=80=98__S_romp=E2=80=99 assumed= to have one element [enabled by default] So the code is invalid and undefined. Writing past the bounds of an array= is undefined. If I add extern to the definition of RomInfo, I get the correct behavior. >>From gcc-bugs-return-442742-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Feb 05 19:33:47 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 14194 invoked by alias); 5 Feb 2014 19:33:46 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 14164 invoked by uid 48); 5 Feb 2014 19:33:42 -0000 From: "florin.iucha@hill-rom.com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/60084] GCC 4.8.3 miscompiles code on ARM at -Os optimization level Date: Wed, 05 Feb 2014 19:33:00 -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: 4.8.3 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: florin.iucha@hill-rom.com X-Bugzilla-Status: RESOLVED 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: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-02/txt/msg00499.txt.bz2 Content-length: 240 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60084 --- Comment #8 from Florin Iucha --- Andrew, You are correct! Sorry, I have missed the lack of 'extern'. I noticed the warning, but did not heed it ;( florin