public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/30980]  New: [4.3 Regression] Recent complex miscompilation
@ 2007-02-27 12:39 pcarlini at suse dot de
  2007-02-27 13:21 ` [Bug c++/30980] " pcarlini at suse dot de
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: pcarlini at suse dot de @ 2007-02-27 12:39 UTC (permalink / raw)
  To: gcc-bugs

Recently (~10 days ago), 26_numerics/complex/13450.cc started failing for
*many* targets, among which powerpc-darwin. On the latter I'm seeing a
miscompilation at -O1 and above of this reduced C++ snippet:

#include <math.h>
#include <stdio.h>

int main()
{
  __complex__ double x;

  __real__ x = -1.0;
  __imag__ x = 0.0;

  __complex__ double t = __builtin_clog(x);

  double tmp = 0.5 * (__imag__ t);

  printf("%g %g\n", cos(tmp), sin(tmp));
}

/////////////////

Note how the output changes at -O1 and above. Also note that the very same
snippet, as C is fine, thus I'm categorizing as C++, not as middle-end or
something else.


-- 
           Summary: [4.3 Regression] Recent complex miscompilation
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: critical
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pcarlini at suse dot de
GCC target triplet: powerpc-apple-darwin8.8.0


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


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

end of thread, other threads:[~2007-06-29 18:10 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-27 12:39 [Bug c++/30980] New: [4.3 Regression] Recent complex miscompilation pcarlini at suse dot de
2007-02-27 13:21 ` [Bug c++/30980] " pcarlini at suse dot de
2007-02-27 13:27 ` [Bug target/30980] " rguenth at gcc dot gnu dot org
2007-02-27 13:30 ` pcarlini at suse dot de
2007-02-27 13:39 ` pcarlini at suse dot de
2007-02-27 13:41 ` pcarlini at suse dot de
2007-02-27 15:43 ` pinskia at gcc dot gnu dot org
2007-02-27 15:48 ` pinskia at gcc dot gnu dot org
2007-02-27 17:25 ` geoffk at gcc dot gnu dot org
2007-03-11 12:19 ` dominiq at lps dot ens dot fr
2007-03-13 12:57 ` dominiq at lps dot ens dot fr
2007-03-13 13:22 ` rguenth at gcc dot gnu dot org
2007-03-13 13:26 ` rguenth at gcc dot gnu dot org
2007-03-13 14:48 ` dominiq at lps dot ens dot fr
2007-03-17  0:26 ` dominiq at lps dot ens dot fr
2007-03-22 16:22 ` dominiq at lps dot ens dot fr
2007-06-29 18:00 ` mmitchel at gcc dot gnu dot org
2007-06-29 18:10 ` pcarlini at suse dot de

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