public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* A new alpha bug
@ 1997-09-12 15:31 H.J. Lu
  1997-09-12 18:08 ` Richard Henderson
  1997-09-15 20:26 ` Jim Wilson
  0 siblings, 2 replies; 18+ messages in thread
From: H.J. Lu @ 1997-09-12 15:31 UTC (permalink / raw)
  To: egcs; +Cc: rth

Using egcs 970910 configured for linux/alpha, this code failed
to run on alpha with any optimization:

# gcc foo.cc
# a.out
# gcc -O foo.cc
# a.out
Floating point exception (core dumped)

gcc 2.7.2.1 for linux/alpha is fine.


-- 
H.J. Lu (hjl@gnu.ai.mit.edu)
---
class complex_double
{
public:
  complex_double (double r = 0, double i = 0): re (r), im (i) { }
  double re, im;
};

main()
{
  complex_double one = 1.0;
  if (one.re != 1.0 || one.im != 0.0)
    abort ();

  return 0;
}

^ permalink raw reply	[flat|nested] 18+ messages in thread
* Re:  A new alpha bug
@ 1997-09-12 19:59 Kaveh R. Ghazi
  0 siblings, 0 replies; 18+ messages in thread
From: Kaveh R. Ghazi @ 1997-09-12 19:59 UTC (permalink / raw)
  To: egcs, hjl; +Cc: rth

 > From: hjl@lucon.org (H.J. Lu)
 > Subject: A new alpha bug
 > 
 > Using egcs 970910 configured for linux/alpha, this code failed
 > to run on alpha with any optimization:
 > 
 > # gcc foo.cc
 > # a.out
 > # gcc -O foo.cc
 > # a.out
 > Floating point exception (core dumped)
 > 
 > gcc 2.7.2.1 for linux/alpha is fine.
 > -- 
 > H.J. Lu (hjl@gnu.ai.mit.edu)
 > ---
 > class complex_double
 > {
 > public:
 >   complex_double (double r = 0, double i = 0): re (r), im (i) { }
 >   double re, im;
 > };
 > 
 > main()
 > {
 >   complex_double one = 1.0;
 >   if (one.re != 1.0 || one.im != 0.0)
 >     abort ();
 > 
 >   return 0;
 > }

	FWIW, egcs-2.90.07 970910 had the same failure on alpha-dec-osf4.0.

		--Kaveh
--
Kaveh R. Ghazi				Project Manager
ghazi@caip.rutgers.edu			ICon CMT Corp.

^ permalink raw reply	[flat|nested] 18+ messages in thread
* Re: A new alpha bug
@ 1997-09-16 14:53 Mike Stump
  0 siblings, 0 replies; 18+ messages in thread
From: Mike Stump @ 1997-09-16 14:53 UTC (permalink / raw)
  To: hjl, wilson; +Cc: egcs, g++

This patch should be safe, and goes this the general design of
TARGET_EXPR and the C++ frontend's use of it, though, it could be made
better by checking what target is...  Only if it is (or might be) a
REG, do we have to worry about doing this.  If it is a mem, we should
be safe.

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

end of thread, other threads:[~1997-09-16 14:53 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-09-12 15:31 A new alpha bug H.J. Lu
1997-09-12 18:08 ` Richard Henderson
1997-09-12 18:25   ` H.J. Lu
     [not found]   ` <m0x9gxl-0004ecC.cygnus.egcs@ocean.lucon.org>
1997-09-12 19:10     ` Jason Merrill
1997-09-12 22:03       ` H.J. Lu
1997-09-14 11:40       ` H.J. Lu
1997-09-14 11:56       ` More info on the g++ " H.J. Lu
1997-09-13 14:44   ` A new " H.J. Lu
1997-09-15 20:26 ` Jim Wilson
1997-09-15 20:38   ` Jason Merrill
1997-09-16 10:11     ` H.J. Lu
1997-09-16 10:18       ` Jason Merrill
1997-09-16 11:09         ` H.J. Lu
1997-09-16 10:38           ` Jason Merrill
1997-09-16 11:39       ` Jim Wilson
1997-09-16 11:39     ` Jim Wilson
1997-09-12 19:59 Kaveh R. Ghazi
1997-09-16 14:53 Mike Stump

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