public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/55999] New: gcc 4.7.2 -O2  -floop-parallelize-all generates incorrect code
@ 2013-01-16  0:27 nfxjfg at gmail dot com
  2013-01-16  0:28 ` [Bug c/55999] " nfxjfg at gmail dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: nfxjfg at gmail dot com @ 2013-01-16  0:27 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 55999
           Summary: gcc 4.7.2 -O2  -floop-parallelize-all generates
                    incorrect code
    Classification: Unclassified
           Product: gcc
           Version: 4.7.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: nfxjfg@gmail.com


struct s {
    int8_t num, c;
    int8_t xs[4], ys[4];
};

void stuff(struct s *desc)
{
    int n;
    for (n = 0; n < desc->num; n++) {
        desc->xs[n] = (n == 1 || n == 2) ? desc->c : 0;
        desc->ys[n] = (n == 1 || n == 2) ? desc->c : 0;
    }
}

desc->xs[0] is not 0 after calling this function, although it should be.

The attached log was generated with gcc -v -save-temps  gcc_issue.c
gcc_issue_main.c -Wall -Wextra -O2  -floop-parallelize-all  > log.txt 2>&1

The assert in gcc_issue_main.c should not be triggered (and is not triggered
when removing -O2 or -floop-parallelize-all).


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

end of thread, other threads:[~2013-01-16  9:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-16  0:27 [Bug c/55999] New: gcc 4.7.2 -O2 -floop-parallelize-all generates incorrect code nfxjfg at gmail dot com
2013-01-16  0:28 ` [Bug c/55999] " nfxjfg at gmail dot com
2013-01-16  0:33 ` nfxjfg at gmail dot com
2013-01-16  0:36 ` nfxjfg at gmail dot com
2013-01-16  9:54 ` [Bug tree-optimization/55999] " rguenth at gcc dot gnu.org
2013-01-16  9:56 ` 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).