From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17413 invoked by alias); 2 Jun 2015 04:33:59 -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 17390 invoked by uid 48); 2 Jun 2015 04:33:55 -0000 From: "juanslayton at dslextreme dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/66373] New: gcc downloaded from Fedora 21 repository produces defective executable. Same source code with gcc from Fedora 19 and Fedora 20 works fine Date: Tue, 02 Jun 2015 04:33:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: juanslayton at dslextreme dot com 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: 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: 2015-06/txt/msg00107.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D66373 Bug ID: 66373 Summary: gcc downloaded from Fedora 21 repository produces defective executable. Same source code with gcc from Fedora 19 and Fedora 20 works fine Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: juanslayton at dslextreme dot com Target Milestone: --- Created attachment 35675 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D35675&action=3Dedit source code and 3 compilations from different gcc versions In the attached files, xs.c is the source file for a program that polls 40 = USB keyboards (the =E2=80=9Cstudent keyboards=E2=80=9D) and does various things= with any input that it finds. Files a, b, and c are executable files produced by 3 different editions of gcc downloaded from Fedora repositories. Each was compiled with =E2=80=9Cgcc -Wall -Wextra -lSDL2 -lrt -lSDL2_ttf -O3 xs.c=E2=80=9D. Each = compilation was clean, with no errors or warnings. Files a and b work beautifully. File c misbehaves in such a way as to rend= er the program unusable. Under the circumstances, suspicion falls on the late= st edition of gcc as downloaded from the Fedora 21 repository. Here are the specifics. File a was compiled with Fedora 19, gcc version 4.8.2 20131212 (Red Hat 4.8.2-7) File b was compiled with Fedora 20, gcc version 4.8.3 20140911 (Red Hat 4.8.3-7) File c was compiled with Fedora 21, gcc version 4.9.2 20150212 (Red Hat 4.9.2-6) The failure seems to be on a return from subroutine get_event, lines 2919f= f, of xp.c This subroutine is called to read keystrokes from student boards a= nd return them to the calling routines. There are 7 such routines; four prese= nt math facts drills, one gives keyboarding practice, one gives advice on writ= ten work from a textbook, and one is a rudimentary word processor. They process returns from get_event in various ways, but the run time error is the same = for each of them, which points to get_event as the error location. This is not= a sure thing, and it could be that whatever the error is, it could be duplica= ted in each of the 7 calling routines.=20=20 The error is this, when get_event returns 10, (ie, =E2=80=98enter=E2=80=99 = has been pushed) the program jumps to the primary program menu, rather than continuing the routi= ne that called get_event. Whether it does this by going through that routine,= or by somehow going around it, I haven=E2=80=99t yet determined. But the fact= that only compilations under the latest gcc edition show this behavior, suggests a b= ug in the compiler. I can=E2=80=99t imagine what it would be. >>From gcc-bugs-return-487776-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Jun 02 04:48:00 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 39480 invoked by alias); 2 Jun 2015 04:48:00 -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 39281 invoked by uid 48); 2 Jun 2015 04:47:27 -0000 From: "juanslayton at dslextreme dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/66373] gcc downloaded from Fedora 21 repository produces defective executable. Same source code with gcc from Fedora 19 and Fedora 20 works fine Date: Tue, 02 Jun 2015 04:48:00 -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: X-Bugzilla-Severity: normal X-Bugzilla-Who: juanslayton at dslextreme dot com 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: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-06/txt/msg00108.txt.bz2 Content-length: 159 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66373 --- Comment #1 from John Slayton --- reference to xp.c should be xs.c