public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/50504] New: g++ 4.5.2 -O2 with complex<double> produces incorrect code on AMD64
@ 2011-09-24  9:56 casubbu at yahoo dot com
  2011-09-24 11:02 ` [Bug c++/50504] " paolo.carlini at oracle dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: casubbu at yahoo dot com @ 2011-09-24  9:56 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 50504
           Summary: g++ 4.5.2 -O2 with complex<double> produces incorrect
                    code on AMD64
    Classification: Unclassified
           Product: gcc
           Version: 4.5.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: casubbu@yahoo.com


Created attachment 25353
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25353
g++ -O2 main.cpp, and ./a.out should not produce all zero outputs. The correct
outputs are when compiled without -O2 option

A simple program attached that just delays complex<double> inputs (in a rather
complicated manner is a simple version of the bug) when compiled with -O2 using
g++ 4.5.2 on Ubuntu 11.04 produces incorrect outputs. The same code works fine
without -O2 option. Also Works correctly with g++-4.4 -O2 as well.

Compiler details:
OLLECT_GCC=g++-4.5
COLLECT_LTO_WRAPPER=/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
4.5.2-8ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.5/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.5 --enable-shared --enable-multiarch
--with-multiarch-defaults=x86_64-linux-gnu --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib/x86_64-linux-gnu
--without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.5 --libdir=/usr/lib/x86_64-linux-gnu
--enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-plugin --enable-gold --enable-ld=default
--with-plugin-ld=ld.gold --enable-objc-gc --disable-werror --with-arch-32=i686
--with-tune=generic --enable-checking=release --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu


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

* [Bug c++/50504] g++ 4.5.2 -O2 with complex<double> produces incorrect code on AMD64
  2011-09-24  9:56 [Bug c++/50504] New: g++ 4.5.2 -O2 with complex<double> produces incorrect code on AMD64 casubbu at yahoo dot com
@ 2011-09-24 11:02 ` paolo.carlini at oracle dot com
  2011-09-25 12:49 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-09-24 11:02 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-09-24 10:05:08 UTC ---
I haven't really looked into the code, but both gcc4.6.x and mainline seem
fine. Thus in case would be a regression from 4.4.x present only in 4.5.x:
unless the fix is a relatively straightforward backport...


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

* [Bug c++/50504] g++ 4.5.2 -O2 with complex<double> produces incorrect code on AMD64
  2011-09-24  9:56 [Bug c++/50504] New: g++ 4.5.2 -O2 with complex<double> produces incorrect code on AMD64 casubbu at yahoo dot com
  2011-09-24 11:02 ` [Bug c++/50504] " paolo.carlini at oracle dot com
@ 2011-09-25 12:49 ` rguenth at gcc dot gnu.org
  2011-09-25 13:31 ` paolo.carlini at oracle dot com
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-09-25 12:49 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2011-09-25
     Ever Confirmed|0                           |1

--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-09-25 12:31:01 UTC ---
Please try 4.5.3.


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

* [Bug c++/50504] g++ 4.5.2 -O2 with complex<double> produces incorrect code on AMD64
  2011-09-24  9:56 [Bug c++/50504] New: g++ 4.5.2 -O2 with complex<double> produces incorrect code on AMD64 casubbu at yahoo dot com
  2011-09-24 11:02 ` [Bug c++/50504] " paolo.carlini at oracle dot com
  2011-09-25 12:49 ` rguenth at gcc dot gnu.org
@ 2011-09-25 13:31 ` paolo.carlini at oracle dot com
  2011-09-25 13:33 ` mikpe at it dot uu.se
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-09-25 13:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-09-25 12:56:53 UTC ---
Indeed 4.5.3 works for me.


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

* [Bug c++/50504] g++ 4.5.2 -O2 with complex<double> produces incorrect code on AMD64
  2011-09-24  9:56 [Bug c++/50504] New: g++ 4.5.2 -O2 with complex<double> produces incorrect code on AMD64 casubbu at yahoo dot com
                   ` (2 preceding siblings ...)
  2011-09-25 13:31 ` paolo.carlini at oracle dot com
@ 2011-09-25 13:33 ` mikpe at it dot uu.se
  2011-09-25 13:51 ` paolo.carlini at oracle dot com
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: mikpe at it dot uu.se @ 2011-09-25 13:33 UTC (permalink / raw)
  To: gcc-bugs

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

Mikael Pettersson <mikpe at it dot uu.se> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mikpe at it dot uu.se

--- Comment #4 from Mikael Pettersson <mikpe at it dot uu.se> 2011-09-25 13:21:43 UTC ---
The bug reproduces for me with the 4.5.3 release, but not with the latest 4.5
weekly snapshot, 4.5-20110922.


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

* [Bug c++/50504] g++ 4.5.2 -O2 with complex<double> produces incorrect code on AMD64
  2011-09-24  9:56 [Bug c++/50504] New: g++ 4.5.2 -O2 with complex<double> produces incorrect code on AMD64 casubbu at yahoo dot com
                   ` (3 preceding siblings ...)
  2011-09-25 13:33 ` mikpe at it dot uu.se
@ 2011-09-25 13:51 ` paolo.carlini at oracle dot com
  2011-09-25 15:50 ` mikpe at it dot uu.se
  2011-12-18 11:27 ` paolo.carlini at oracle dot com
  6 siblings, 0 replies; 8+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-09-25 13:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-09-25 13:30:28 UTC ---
Actually I tried 179164, not 4.5.3 proper, sorry. The fix must be very recent,
then.


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

* [Bug c++/50504] g++ 4.5.2 -O2 with complex<double> produces incorrect code on AMD64
  2011-09-24  9:56 [Bug c++/50504] New: g++ 4.5.2 -O2 with complex<double> produces incorrect code on AMD64 casubbu at yahoo dot com
                   ` (4 preceding siblings ...)
  2011-09-25 13:51 ` paolo.carlini at oracle dot com
@ 2011-09-25 15:50 ` mikpe at it dot uu.se
  2011-12-18 11:27 ` paolo.carlini at oracle dot com
  6 siblings, 0 replies; 8+ messages in thread
From: mikpe at it dot uu.se @ 2011-09-25 15:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Mikael Pettersson <mikpe at it dot uu.se> 2011-09-25 15:25:01 UTC ---
According to my bisection, the bug started on trunk for 4.5.0 with r147851,
stopped on trunk for 4.6.0 with r164136, and stopped on 4.5 branch with
r175813.
I can't say if those fixes are proper or just masking a latent issue.


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

* [Bug c++/50504] g++ 4.5.2 -O2 with complex<double> produces incorrect code on AMD64
  2011-09-24  9:56 [Bug c++/50504] New: g++ 4.5.2 -O2 with complex<double> produces incorrect code on AMD64 casubbu at yahoo dot com
                   ` (5 preceding siblings ...)
  2011-09-25 15:50 ` mikpe at it dot uu.se
@ 2011-12-18 11:27 ` paolo.carlini at oracle dot com
  6 siblings, 0 replies; 8+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-12-18 11:27 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
      Known to work|                            |4.6.0, 4.7.0
         Resolution|                            |FIXED

--- Comment #7 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-12-18 11:03:18 UTC ---
Thus this is fixed in the active branches.


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

end of thread, other threads:[~2011-12-18 11:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-24  9:56 [Bug c++/50504] New: g++ 4.5.2 -O2 with complex<double> produces incorrect code on AMD64 casubbu at yahoo dot com
2011-09-24 11:02 ` [Bug c++/50504] " paolo.carlini at oracle dot com
2011-09-25 12:49 ` rguenth at gcc dot gnu.org
2011-09-25 13:31 ` paolo.carlini at oracle dot com
2011-09-25 13:33 ` mikpe at it dot uu.se
2011-09-25 13:51 ` paolo.carlini at oracle dot com
2011-09-25 15:50 ` mikpe at it dot uu.se
2011-12-18 11:27 ` paolo.carlini at oracle dot com

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