Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* Possible BUG on Alpha C compiler?
@ 1995-11-27  5:00 Christos Siopis
  1995-11-27  5:00 ` Ron Natalie
  1995-12-01  5:00 ` Steve Tate
  0 siblings, 2 replies; 6+ messages in thread
From: Christos Siopis @ 1995-11-27  5:00 UTC (permalink / raw)
  To: siopis, bcs

I have a bizzare (for my modest experience, at least) problem with a
C program I am trying to run on a DEC Alpha running OSF/1.

The program has compiled and runs successfully on a SUN SPARCstation 2
using the gcc compiler, on an IBM RISC/6000 using its native cc compiler
as well as a DECstation 3100 using either gcc or its own cc compiler.

The program compiles without problem on a DEC Alpha OSF/1, but when
I run it, I get a ``floating exception'' error. I have pinpointed the
error to the following rather inconspicuous statement:

               delta    = c[j] - q;

Right before the statement is executed, j=0, c[j]=1.221301, q=0.000000
and delta=533.333333. delta, q and c[1] are double variables and j is
integer. I get the same error with gcc and cc, so it looks more like a
linker error? But then I do not use any function call... Any help is
greatly appreciated, this is an important part of my thesis project
and it *has* to run on the Alpha, or it will take substantially more
time to finish...

Please forward any posting to my E-mail address as well!

Thank you,
Christos
-- 
*********************************************************************
*  Christos Siopis                |  Internet: siopis@astro.ufl.edu *
*  Graduate Student               |  BITNET  : siopis@ufcc          *
*  P.O. Box 112055                |                                 *
*  Department of Astronomy        |  Voice   : (904) 374-6833       *
*  University of Florida          |            (904) 392-0123       *
*  Gainesville, FL 32611-2055     |                                 *
*  U.S.A.                         |  FAX     : (904) 392-5089       *
*********************************************************************




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

* Re: Possible BUG on Alpha C compiler?
  1995-11-27  5:00 Possible BUG on Alpha C compiler? Christos Siopis
@ 1995-11-27  5:00 ` Ron Natalie
  1995-11-30  5:00   ` Martin Farrall
  1995-12-01  5:00 ` Steve Tate
  1 sibling, 1 reply; 6+ messages in thread
From: Ron Natalie @ 1995-11-27  5:00 UTC (permalink / raw)


Christos Siopis (siopis) wrote:
: I have a bizzare (for my modest experience, at least) problem with a
: C program I am trying to run on a DEC Alpha running OSF/1.

: The program has compiled and runs successfully on a SUN SPARCstation 2
: using the gcc compiler, on an IBM RISC/6000 using its native cc compiler
: as well as a DECstation 3100 using either gcc or its own cc compiler.

: The program compiles without problem on a DEC Alpha OSF/1, but when
: I run it, I get a ``floating exception'' error. I have pinpointed the
: error to the following rather inconspicuous statement:

:                delta    = c[j] - q;

: Right before the statement is executed, j=0, c[j]=1.221301, q=0.000000
: and delta=533.333333. delta, q and c[1] are double variables and j is
: integer. I get the same error with gcc and cc, so it looks more like a
: linker error? But then I do not use any function call... Any help is
: greatly appreciated, this is an important part of my thesis project
: and it *has* to run on the Alpha, or it will take substantially more
: time to finish...

The major difference on the Alpha, is that even accessing a memory
location with an invalid floating point value as floating point causes
an exception (nearly every other CPU actually requires you to do some
calculation with the number to trigger the exception).

I would suspect that you q or c[0] is actually uninitialized data
and gdb or whatever is inhibitting (or ignoring) the exception when
you try to debug it.

Purify (unfortunately not available on the alpha) or CodeCenter (which
unfortunately rolls over and dies on any decent sized application) will
help find these.

-Ron



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

* Possible BUG on Alpha C compiler?
@ 1995-11-27  5:00 Christos Siopis
  0 siblings, 0 replies; 6+ messages in thread
From: Christos Siopis @ 1995-11-27  5:00 UTC (permalink / raw)
  To: siopis, bcs

I have a bizzare (for my modest experience, at least) problem with a
C program I am trying to run on a DEC Alpha running OSF/1.

The program has compiled and runs successfully on a SUN SPARCstation 2
using the gcc compiler, on an IBM RISC/6000 using its native cc compiler
as well as a DECstation 3100 using either gcc or its own cc compiler.

The program compiles without problem on a DEC Alpha OSF/1, but when
I run it, I get a ``floating exception'' error. I have pinpointed the
error to the following rather inconspicuous statement:

               delta    = c[j] - q;

Right before the statement is executed, j=0, c[j]=1.221301, q=0.000000
and delta=533.333333. delta, q and c[1] are double variables and j is
integer. I get the same error with gcc and cc, so it looks more like a
linker error? But then I do not use any function call... Any help is
greatly appreciated, this is an important part of my thesis project
and it *has* to run on the Alpha, or it will take substantially more
time to finish...

Please forward any posting to my E-mail address as well!

Thank you,
Christos
-- 
*********************************************************************
*  Christos Siopis                |  Internet: siopis@astro.ufl.edu *
*  Graduate Student               |  BITNET  : siopis@ufcc          *
*  P.O. Box 112055                |                                 *
*  Department of Astronomy        |  Voice   : (904) 374-6833       *
*  University of Florida          |            (904) 392-0123       *
*  Gainesville, FL 32611-2055     |                                 *
*  U.S.A.                         |  FAX     : (904) 392-5089       *
*********************************************************************




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

* Re: Possible BUG on Alpha C compiler?
  1995-11-27  5:00 ` Ron Natalie
@ 1995-11-30  5:00   ` Martin Farrall
  1995-11-30  5:00     ` Ron Natalie
  0 siblings, 1 reply; 6+ messages in thread
From: Martin Farrall @ 1995-11-30  5:00 UTC (permalink / raw)


> The major difference on the Alpha, is that even accessing a memory
> location with an invalid floating point value as floating point causes
> an exception (nearly every other CPU actually requires you to do some
> calculation with the number to trigger the exception).
> 
> I would suspect that you q or c[0] is actually uninitialized data
> and gdb or whatever is inhibitting (or ignoring) the exception when
> you try to debug it.
> 
> Purify (unfortunately not available on the alpha) or CodeCenter (which
> unfortunately rolls over and dies on any decent sized application) will
> help find these.
> 
> -Ron

I've encountered similar problems.  Look in /usr/lib/atom for
various software development tools including "3rd degree" which is a
memory error detection tool similar in spirit to Purify.


Martin Farrall



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

* Re: Possible BUG on Alpha C compiler?
  1995-11-30  5:00   ` Martin Farrall
@ 1995-11-30  5:00     ` Ron Natalie
  0 siblings, 0 replies; 6+ messages in thread
From: Ron Natalie @ 1995-11-30  5:00 UTC (permalink / raw)


Martin Farrall (mfarrall@well.ox.ac.uk) wrote:

: I've encountered similar problems.  Look in /usr/lib/atom for
: various software development tools including "3rd degree" which is a
: memory error detection tool similar in spirit to Purify.

Unforutantely, it didn't work last time I tried it.



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

* Re: Possible BUG on Alpha C compiler?
  1995-11-27  5:00 Possible BUG on Alpha C compiler? Christos Siopis
  1995-11-27  5:00 ` Ron Natalie
@ 1995-12-01  5:00 ` Steve Tate
  1 sibling, 0 replies; 6+ messages in thread
From: Steve Tate @ 1995-12-01  5:00 UTC (permalink / raw)


Christos Siopis (siopis) wrote:

> The program compiles without problem on a DEC Alpha OSF/1, but when
> I run it, I get a ``floating exception'' error. I have pinpointed the
> error to the following rather inconspicuous statement:

>                delta    = c[j] - q;

> Right before the statement is executed, j=0, c[j]=1.221301, q=0.000000
> and delta=533.333333. delta, q and c[1] are double variables and j is
> integer. 

There's obviously nothing wrong with that statement using those values
(and yes, it works fine on an Alpha) --- try to get the smallest
COMPLETE program that has this same problem, so that it can be
reproduced by others, and then maybe someone can help you.  It's very
likely that something in one of the preceding lines is actually
causing the error....

--
Steve Tate  ---  srt@cs.unt.edu | "As often as a study is cultivated by narrow
Dept. of Computer Sciences      |  minds, they will draw from it narrow
University of North Texas       |  conclusions."  -- John Stuart Mill, 1865.
Denton, TX  76201               | 



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

end of thread, other threads:[~1995-12-01  5:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-11-27  5:00 Possible BUG on Alpha C compiler? Christos Siopis
1995-11-27  5:00 ` Ron Natalie
1995-11-30  5:00   ` Martin Farrall
1995-11-30  5:00     ` Ron Natalie
1995-12-01  5:00 ` Steve Tate
  -- strict thread matches above, loose matches on Subject: below --
1995-11-27  5:00 Christos Siopis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox