public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/61509] New: GCC miscompilation on ARM during RTL optimization when compiled with -O3
@ 2014-06-14 19:03 quentusrex at gmail dot com
2014-06-14 19:10 ` [Bug rtl-optimization/61509] " pinskia at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: quentusrex at gmail dot com @ 2014-06-14 19:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61509
Bug ID: 61509
Summary: GCC miscompilation on ARM during RTL optimization when
compiled with -O3
Product: gcc
Version: 4.6.3
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: quentusrex at gmail dot com
C code:
if(strcasecmp(var,"a"))
else if(strcasecmp(var, "b")
the second call to strcasecmp is being optimized out, and the control statement
is effectively being treated as an if() else statement.
More detailed write up here:
http://quentusrex.com/freeswitch-raspberrypi-gcc-compiler-bug.html
Debug files located here:
https://github.com/quentusrex/FS-6495/tree/master/gcc_debug_orig
The second call to strcasecmp is being removed in pass #200 during a DCE loop.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/61509] GCC miscompilation on ARM during RTL optimization when compiled with -O3
2014-06-14 19:03 [Bug rtl-optimization/61509] New: GCC miscompilation on ARM during RTL optimization when compiled with -O3 quentusrex at gmail dot com
@ 2014-06-14 19:10 ` pinskia at gcc dot gnu.org
2014-06-14 20:15 ` quentusrex at gmail dot com
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2014-06-14 19:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61509
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2014-06-14
Ever confirmed|0 |1
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
4.6.3 is no longer supported, can you try a newer compiler? Also can you
attach the preprocessed source?
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/61509] GCC miscompilation on ARM during RTL optimization when compiled with -O3
2014-06-14 19:03 [Bug rtl-optimization/61509] New: GCC miscompilation on ARM during RTL optimization when compiled with -O3 quentusrex at gmail dot com
2014-06-14 19:10 ` [Bug rtl-optimization/61509] " pinskia at gcc dot gnu.org
2014-06-14 20:15 ` quentusrex at gmail dot com
@ 2014-06-14 20:15 ` quentusrex at gmail dot com
2014-06-14 22:26 ` pinskia at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: quentusrex at gmail dot com @ 2014-06-14 20:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61509
--- Comment #3 from William King <quentusrex at gmail dot com> ---
Line 7945 has the strcasecmp of the gcc output 'original' pass:
https://github.com/quentusrex/FS-6495/blob/master/gcc_debug_orig/switch_core_media.c.003t.original
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/61509] GCC miscompilation on ARM during RTL optimization when compiled with -O3
2014-06-14 19:03 [Bug rtl-optimization/61509] New: GCC miscompilation on ARM during RTL optimization when compiled with -O3 quentusrex at gmail dot com
2014-06-14 19:10 ` [Bug rtl-optimization/61509] " pinskia at gcc dot gnu.org
@ 2014-06-14 20:15 ` quentusrex at gmail dot com
2014-06-14 20:15 ` quentusrex at gmail dot com
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: quentusrex at gmail dot com @ 2014-06-14 20:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61509
--- Comment #2 from William King <quentusrex at gmail dot com> ---
Created attachment 32939
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=32939&action=edit
Source file for switch_core_media.c
Line 3356 is the strcasecmp that is being optimized out.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/61509] GCC miscompilation on ARM during RTL optimization when compiled with -O3
2014-06-14 19:03 [Bug rtl-optimization/61509] New: GCC miscompilation on ARM during RTL optimization when compiled with -O3 quentusrex at gmail dot com
` (2 preceding siblings ...)
2014-06-14 20:15 ` quentusrex at gmail dot com
@ 2014-06-14 22:26 ` pinskia at gcc dot gnu.org
2014-06-14 22:47 ` [Bug rtl-optimization/61509] GCC miscompilation on ARM during RTL optimization when compiled with -O2 quentusrex at gmail dot com
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2014-06-14 22:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61509
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to William King from comment #2)
> Created attachment 32939 [details]
> Source file for switch_core_media.c
This is the source and not the preprocessed source.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/61509] GCC miscompilation on ARM during RTL optimization when compiled with -O2
2014-06-14 19:03 [Bug rtl-optimization/61509] New: GCC miscompilation on ARM during RTL optimization when compiled with -O3 quentusrex at gmail dot com
` (3 preceding siblings ...)
2014-06-14 22:26 ` pinskia at gcc dot gnu.org
@ 2014-06-14 22:47 ` quentusrex at gmail dot com
2014-06-16 8:30 ` rguenth at gcc dot gnu.org
2014-06-17 15:00 ` quentusrex at gmail dot com
6 siblings, 0 replies; 8+ messages in thread
From: quentusrex at gmail dot com @ 2014-06-14 22:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61509
--- Comment #5 from William King <quentusrex at gmail dot com> ---
Preprocessed file located here:
http://quentusrex.com/switch_core_media.c.preprocessed
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/61509] GCC miscompilation on ARM during RTL optimization when compiled with -O2
2014-06-14 19:03 [Bug rtl-optimization/61509] New: GCC miscompilation on ARM during RTL optimization when compiled with -O3 quentusrex at gmail dot com
` (4 preceding siblings ...)
2014-06-14 22:47 ` [Bug rtl-optimization/61509] GCC miscompilation on ARM during RTL optimization when compiled with -O2 quentusrex at gmail dot com
@ 2014-06-16 8:30 ` rguenth at gcc dot gnu.org
2014-06-17 15:00 ` quentusrex at gmail dot com
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-06-16 8:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61509
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
Still waiting for reporter to try a still supported compiler which would be
GCC 4.8.3 or 4.9.0.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug rtl-optimization/61509] GCC miscompilation on ARM during RTL optimization when compiled with -O2
2014-06-14 19:03 [Bug rtl-optimization/61509] New: GCC miscompilation on ARM during RTL optimization when compiled with -O3 quentusrex at gmail dot com
` (5 preceding siblings ...)
2014-06-16 8:30 ` rguenth at gcc dot gnu.org
@ 2014-06-17 15:00 ` quentusrex at gmail dot com
6 siblings, 0 replies; 8+ messages in thread
From: quentusrex at gmail dot com @ 2014-06-17 15:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61509
--- Comment #7 from William King <quentusrex at gmail dot com> ---
While I haven't had a chance to run through more than a handful of call
scenarios, building FreeSWITCH on the Raspberry Pi with GCC 4.9.0 does not have
the same problem.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-06-17 15:00 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-14 19:03 [Bug rtl-optimization/61509] New: GCC miscompilation on ARM during RTL optimization when compiled with -O3 quentusrex at gmail dot com
2014-06-14 19:10 ` [Bug rtl-optimization/61509] " pinskia at gcc dot gnu.org
2014-06-14 20:15 ` quentusrex at gmail dot com
2014-06-14 20:15 ` quentusrex at gmail dot com
2014-06-14 22:26 ` pinskia at gcc dot gnu.org
2014-06-14 22:47 ` [Bug rtl-optimization/61509] GCC miscompilation on ARM during RTL optimization when compiled with -O2 quentusrex at gmail dot com
2014-06-16 8:30 ` rguenth at gcc dot gnu.org
2014-06-17 15:00 ` quentusrex at gmail dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).