public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/40924]  New: 4.4.1 regression: miscompiles with -03 (seemingly related to attribute may_alias)
@ 2009-07-31  9:23 kretz at kde dot org
  2009-07-31  9:24 ` [Bug middle-end/40924] " kretz at kde dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: kretz at kde dot org @ 2009-07-31  9:23 UTC (permalink / raw)
  To: gcc-bugs

After upgrading to 4.4.1 one of my unit tests started failing reproducibly.

I tried to find the part of -O3 (compared to -O2) that caused the failure and I
was able to "fix" the error by changing "optimize >= 3" to "optimize >= 4" in
tree-ssa-loop.c lines 509 and 550. That's the minimal change to make it work
again.

Next I tried to reduce my code to a simple testcase but that is really hard. I
will attach the smallest file I was able to reduce. But in that case it also
fails at -O3 (with my change above -O4 was necessary to make it fail), -O2 and
-O1. -O0 still doesn't fail.

Any further simplification of the code made the bug go away.

The code creates an array of floats which an index vector (starting from {0,
1}) gathers values from into a float vector class. Then the code verifies that
the correct values were read.

The error I was able to identify in the assembly is that the multiplication at
line 93 ({0, 1} * uint_v(1)) is carried out as {0, 1} * {2, 3} instead of {0,
1} * {1, 1}.


-- 
           Summary: 4.4.1 regression: miscompiles with -03 (seemingly
                    related to attribute may_alias)
           Product: gcc
           Version: 4.4.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kretz at kde dot org
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


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


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

end of thread, other threads:[~2009-08-05 12:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-31  9:23 [Bug middle-end/40924] New: 4.4.1 regression: miscompiles with -03 (seemingly related to attribute may_alias) kretz at kde dot org
2009-07-31  9:24 ` [Bug middle-end/40924] " kretz at kde dot org
2009-07-31 11:15 ` [Bug rtl-optimization/40924] [4.4 Regression] " rguenth at gcc dot gnu dot org
2009-07-31 12:13 ` jakub at gcc dot gnu dot org
2009-08-04 10:27 ` jakub at gcc dot gnu dot org
2009-08-04 20:56 ` jakub at gcc dot gnu dot org
2009-08-05 12:37 ` jakub at gcc dot gnu dot org
2009-08-05 12:54 ` jakub at gcc dot gnu dot org
2009-08-05 12:55 ` jakub at gcc dot gnu dot 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).