comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <Stephen.Leake@gsfc.nasa.gov>
Subject: Re: A SPARC curiosity.
Date: 1997/10/29
Date: 1997-10-29T00:00:00+00:00	[thread overview]
Message-ID: <3457758D.4BAD@gsfc.nasa.gov> (raw)
In-Reply-To: 345741D3.2162@pseserv3.fw.hac.com


W. Wesley Groleau x4923 wrote:
> 
> I received some SPARC-specific C code with embedded asm() from
> someone at Sun.  It had a lot of printf.  I trimmed the output down
> to the subset I needed, and it still worked.  I then changed it to
> put the output into an Ada string, changed the while loop to
> a for loop, and had the Ada do the printing.  It didn't work.
> 
> But as I was trying to figure out what seemed wrong, I discovered
> it DOES work on another SPARC!
> 
> Details:
> gcc 2.7.2 and gnat 3.10 crossmounted to both machines.
> Same executable (no relinking) does not work on this:
>    166 -> uname -a
>    SunOS sparc02 5.5.1 Generic sun4d sparc SUNW,SPARCserver-1000
> but does work on this:
>    169 -> uname -a
>    SunOS gc058 5.5.1 Generic sun4u sparc SUNW,Ultra-2
> 
> The error is not a crash or other disaster, merely a truncation of
> the output.  Optimization -O3 and -O0 are the same.

Does the C code behave the same on the two machines? They seem to have
slightly different versions of the OS. If GNAT is calling the C library
for low-level output, a difference in the two libraries would explain
things. Hmm, that assumes the libraries are dynamically linked; does
SunOS on SPARC do that?
-- 
- Stephe




  parent reply	other threads:[~1997-10-29  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-10-29  0:00 A SPARC curiosity W. Wesley Groleau x4923
1997-10-29  0:00 ` Robert S. White
1997-10-29  0:00 ` Stephen Leake [this message]
1997-10-30  0:00   ` W. Wesley Groleau x4923
replies disabled

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