public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/56920] New: another static initialization of an array miscompiled
@ 2013-04-11 13:33 kretz at kde dot org
  2013-04-11 15:20 ` [Bug tree-optimization/56920] [4.8 Regression] " jakub at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: kretz at kde dot org @ 2013-04-11 13:33 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 56920
           Summary: another static initialization of an array miscompiled
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: kretz@kde.org


compile the following testcase with "gcc -O3 -msse2":

int main() {
    unsigned int indexes[15];
    for (unsigned int i = 0; i < 15; ++i) {
        indexes[i] = (i * 2) % 15;
    }
    for (unsigned int i = 0; i < 15; ++i) {
        if (indexes[i] != (i * 2) % 15) {
            __builtin_abort();
        }
    }
}

GCC initializes the stack with the values 0, 2, 4, 6, 8, 10, 12, 14, 16, 18,
20, 22. The last three values of indexes apparently are not initialized at all.
Expected is: 0, 2, 4, 6, 8, 10, 12, 14, 1, 3, 5, 7, 9, 11, 13

This might be related to #56918, but -fdisable-tree-vrp2 does not fix the
issue.


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

* [Bug tree-optimization/56920] [4.8 Regression] another static initialization of an array miscompiled
  2013-04-11 13:33 [Bug tree-optimization/56920] New: another static initialization of an array miscompiled kretz at kde dot org
@ 2013-04-11 15:20 ` jakub at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-04-11 15:20 UTC (permalink / raw)
  To: gcc-bugs


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |jakub at gcc dot gnu.org
         Resolution|                            |DUPLICATE

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-04-11 15:20:11 UTC ---
Dup.  I'll include the testcase in PR56918 fix.

*** This bug has been marked as a duplicate of bug 56918 ***


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

end of thread, other threads:[~2013-04-11 15:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-11 13:33 [Bug tree-optimization/56920] New: another static initialization of an array miscompiled kretz at kde dot org
2013-04-11 15:20 ` [Bug tree-optimization/56920] [4.8 Regression] " jakub 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).