public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/61742] New: wrong code at -O3 on x86_64-linux-gnu
@ 2014-07-08  4:01 su at cs dot ucdavis.edu
  2014-07-08  7:35 ` [Bug tree-optimization/61742] [4.10 Regression] " jakub at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: su at cs dot ucdavis.edu @ 2014-07-08  4:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61742

            Bug ID: 61742
           Summary: wrong code at -O3 on x86_64-linux-gnu
           Product: gcc
           Version: 4.10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: su at cs dot ucdavis.edu

The current gcc trunk miscompiles the following testcase on x86_64-linux at -O3
in both 32-bit and 64-bit modes.  

This is a regression from 4.9.x.  

$ gcc-trunk -v 
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-unknown-linux-gnu/4.10.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/usr/local/gcc-trunk
--enable-languages=c,c++ --disable-werror --enable-multilib
Thread model: posix
gcc version 4.10.0 20140707 (experimental) [trunk revision 212329] (GCC) 
$ 
$ gcc-trunk -O2 small.c; a.out
1
$ gcc-4.9 -O3 small.c; a.out
1
$ 
$ gcc-trunk -O3 small.c; a.out
0
$ 


---------------------------------


int printf (const char *, ...);

int a, b, c, e, f, g, h, i, j, k;
int d[1];

int
main ()
{
  int l, m;
  k = 0;
  for (; g < 1; g++)
    {
      for (i = 0; i < 1; i++)
    m = b ? b : 1;
      if (m)
    j = d[e] = 0;
      else
    f = 0;
      l = k ? k : a;
      if (d[0] < 1)
    {
      c++;
      h = (l || e) > 0;
    }
    }
  printf ("%d\n", c);
  return 0;
}


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

* [Bug tree-optimization/61742] [4.10 Regression] wrong code at -O3 on x86_64-linux-gnu
  2014-07-08  4:01 [Bug tree-optimization/61742] New: wrong code at -O3 on x86_64-linux-gnu su at cs dot ucdavis.edu
@ 2014-07-08  7:35 ` jakub at gcc dot gnu.org
  2014-07-08  9:07 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-07-08  7:35 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61742

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-07-08
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |kyukhin at gcc dot gnu.org,
                   |                            |ysrumyan at gmail dot com
   Target Milestone|---                         |4.10.0
            Summary|wrong code at -O3 on        |[4.10 Regression] wrong
                   |x86_64-linux-gnu            |code at -O3 on
                   |                            |x86_64-linux-gnu
     Ever confirmed|0                           |1

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r209972.


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

* [Bug tree-optimization/61742] [4.10 Regression] wrong code at -O3 on x86_64-linux-gnu
  2014-07-08  4:01 [Bug tree-optimization/61742] New: wrong code at -O3 on x86_64-linux-gnu su at cs dot ucdavis.edu
  2014-07-08  7:35 ` [Bug tree-optimization/61742] [4.10 Regression] " jakub at gcc dot gnu.org
@ 2014-07-08  9:07 ` rguenth at gcc dot gnu.org
  2014-07-08 10:37 ` ysrumyan at gmail dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-07-08  9:07 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61742

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
           Priority|P3                          |P1


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

* [Bug tree-optimization/61742] [4.10 Regression] wrong code at -O3 on x86_64-linux-gnu
  2014-07-08  4:01 [Bug tree-optimization/61742] New: wrong code at -O3 on x86_64-linux-gnu su at cs dot ucdavis.edu
  2014-07-08  7:35 ` [Bug tree-optimization/61742] [4.10 Regression] " jakub at gcc dot gnu.org
  2014-07-08  9:07 ` rguenth at gcc dot gnu.org
@ 2014-07-08 10:37 ` ysrumyan at gmail dot com
  2014-07-08 10:45 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: ysrumyan at gmail dot com @ 2014-07-08 10:37 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61742

--- Comment #2 from Yuri Rumyantsev <ysrumyan at gmail dot com> ---
This is duplicate of PR 61576 and it should pass after r212347.


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

* [Bug tree-optimization/61742] [4.10 Regression] wrong code at -O3 on x86_64-linux-gnu
  2014-07-08  4:01 [Bug tree-optimization/61742] New: wrong code at -O3 on x86_64-linux-gnu su at cs dot ucdavis.edu
                   ` (2 preceding siblings ...)
  2014-07-08 10:37 ` ysrumyan at gmail dot com
@ 2014-07-08 10:45 ` jakub at gcc dot gnu.org
  2014-07-08 12:18 ` ysrumyan at gmail dot com
  2014-07-10  8:00 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-07-08 10:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61742

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Indeed, it is.  Can you add the testcase from this PR to trunk?  Then we can
close it.


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

* [Bug tree-optimization/61742] [4.10 Regression] wrong code at -O3 on x86_64-linux-gnu
  2014-07-08  4:01 [Bug tree-optimization/61742] New: wrong code at -O3 on x86_64-linux-gnu su at cs dot ucdavis.edu
                   ` (3 preceding siblings ...)
  2014-07-08 10:45 ` jakub at gcc dot gnu.org
@ 2014-07-08 12:18 ` ysrumyan at gmail dot com
  2014-07-10  8:00 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: ysrumyan at gmail dot com @ 2014-07-08 12:18 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61742

--- Comment #4 from Yuri Rumyantsev <ysrumyan at gmail dot com> ---
Ok. I will add it.

2014-07-08 14:45 GMT+04:00 jakub at gcc dot gnu.org <gcc-bugzilla@gcc.gnu.org>:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61742
>
> --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
> Indeed, it is.  Can you add the testcase from this PR to trunk?  Then we can
> close it.
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.


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

* [Bug tree-optimization/61742] [4.10 Regression] wrong code at -O3 on x86_64-linux-gnu
  2014-07-08  4:01 [Bug tree-optimization/61742] New: wrong code at -O3 on x86_64-linux-gnu su at cs dot ucdavis.edu
                   ` (4 preceding siblings ...)
  2014-07-08 12:18 ` ysrumyan at gmail dot com
@ 2014-07-10  8:00 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-07-10  8:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61742

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Thanks.


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

end of thread, other threads:[~2014-07-10  8:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-08  4:01 [Bug tree-optimization/61742] New: wrong code at -O3 on x86_64-linux-gnu su at cs dot ucdavis.edu
2014-07-08  7:35 ` [Bug tree-optimization/61742] [4.10 Regression] " jakub at gcc dot gnu.org
2014-07-08  9:07 ` rguenth at gcc dot gnu.org
2014-07-08 10:37 ` ysrumyan at gmail dot com
2014-07-08 10:45 ` jakub at gcc dot gnu.org
2014-07-08 12:18 ` ysrumyan at gmail dot com
2014-07-10  8:00 ` 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).