public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcc/60429] New: Miscompilation (aliasing) with -finline-functions
@ 2014-03-05 13:12 linux at carewolf dot com
  2014-03-05 13:13 ` [Bug libgcc/60429] " linux at carewolf dot com
                   ` (29 more replies)
  0 siblings, 30 replies; 31+ messages in thread
From: linux at carewolf dot com @ 2014-03-05 13:12 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60429

            Bug ID: 60429
           Summary: Miscompilation (aliasing) with -finline-functions
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgcc
          Assignee: unassigned at gcc dot gnu.org
          Reporter: linux at carewolf dot com

After recently trying to build Qt with -O3, I found one of our tests failing.
After investigating I narrowed it down to qregion.cpp and the flag
-finline-functions (using -O2 -finline-functions).

Specificially the inlining of the function loadAET() in "QRegionPrivate
*PolygonRegion()" causes the problem. Adding __attribute__((noinline)) to
loadAET() solves the problem. Interestingly compiling without -finline-function
and just marking the loadAET as inline or always_inline, does not trigger the
issue.

The code is not Qt specific and is used in a other projects, though it is most
places compiled as C code.

Further testing shows the issue is also triggered in GCC 4.6, 4.7, and the
latest version of 4.9 I had. It is however NOT present in GCC 4.4, so this is a
regression.

Looking at the assembler and debug output, I believe the that the variable pAET
that should have been reloaded after loadAET() has been eliminated. This might
be what breaks the aliasing rules.


^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2014-06-12 13:37 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-05 13:12 [Bug libgcc/60429] New: Miscompilation (aliasing) with -finline-functions linux at carewolf dot com
2014-03-05 13:13 ` [Bug libgcc/60429] " linux at carewolf dot com
2014-03-05 13:17 ` linux at carewolf dot com
2014-03-05 13:28 ` linux at carewolf dot com
2014-03-05 13:29 ` linux at carewolf dot com
2014-03-06 10:10 ` [Bug middle-end/60429] " rguenth at gcc dot gnu.org
2014-03-06 19:07 ` linux at carewolf dot com
2014-03-07 12:18 ` rguenth at gcc dot gnu.org
2014-03-07 16:36 ` linux at carewolf dot com
2014-03-07 16:38 ` linux at carewolf dot com
2014-03-07 16:38 ` linux at carewolf dot com
2014-03-07 16:44 ` linux at carewolf dot com
2014-03-07 18:47 ` pinskia at gcc dot gnu.org
2014-03-07 19:58 ` linux at carewolf dot com
2014-03-07 20:02 ` trippels at gcc dot gnu.org
2014-03-07 20:26 ` trippels at gcc dot gnu.org
2014-03-07 21:40 ` [Bug middle-end/60429] [4.7/4.8/4.9 Regression] " jakub at gcc dot gnu.org
2014-03-10  9:05 ` rguenth at gcc dot gnu.org
2014-03-10 10:42 ` rguenth at gcc dot gnu.org
2014-03-10 11:29 ` rguenth at gcc dot gnu.org
2014-03-10 13:18 ` rguenth at gcc dot gnu.org
2014-03-11 12:42 ` rguenth at gcc dot gnu.org
2014-03-11 12:59 ` [Bug middle-end/60429] [4.7/4.8 " rguenth at gcc dot gnu.org
2014-03-11 14:38 ` linux at carewolf dot com
2014-03-15 13:20 ` linux at carewolf dot com
2014-03-17  8:30 ` rguenther at suse dot de
2014-03-17 13:09 ` [Bug middle-end/60429] [4.7 " rguenth at gcc dot gnu.org
2014-03-17 13:09 ` [Bug middle-end/60429] [4.7/4.8 " rguenth at gcc dot gnu.org
2014-03-24  8:43 ` [Bug middle-end/60429] [4.7 " rguenth at gcc dot gnu.org
2014-03-24  8:43 ` rguenth at gcc dot gnu.org
2014-06-12 13:37 ` rguenth at gcc dot gnu.org

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).