🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #965

i960 gcc and "static" memory initialization

#965
From: Steve Simmons
Date: Wed, 19 Aug 1992 15:22
30 lines
1606 bytes
We are having an interesting problem with the i960 gcc compiler/linker,
version 1.37 of gcc, Intels release 2.0.

When there are variables declared in the form:

int i = 4 ;

main()
{
	printf( "Value of i is %d\n", i ) ;
	i = 5 ;
}

we have some problems when debugging.  On the first debug pass thru
the program, everything is fine.  If we rerun the program without
refreshing the core image (ie, re-downloading), the initial value
of i is 5.

This is correct performance (or rather, allowed performance) under
ANSI C.  Nonetheless it makes debugging hell.  We'd rather not have
to rewrite the code to dynamically initialize all the variables.  Is
there a set of switches or mod package that will handle this?

Please reply to jak@aisinc.com (Jeff Kraudelt).  He has email access
but not news access.
-- 
"If life were fair, the acquisition of a large bosom or a massive inheritance
 would have no bearing on your ability to attract the opposite sex, and Dan
 Quayle would be making a living asking runny-nosed children, `Do you want
 fries with that?'"     -- John Cleese, "Corporate Computing" magazine
Technical Details
Message-ID: <scs.714237776@wotan.iti.org>
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!iti.org!scs

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!iti.org!scs
From: scs@iti.org (Steve Simmons)
Subject: i960 gcc and "static" memory initialization
Message-ID: <scs.714237776@wotan.iti.org>
Sender: gnulists@ai.mit.edu
Reply-To: jak@aisinc.com (Jeff Kraudelt)
Organization: Industrial Technology Institute
Distribution: gnu
Date: Wed, 19 Aug 1992 15:22:56 GMT
Approved: bug-gcc@prep.ai.mit.edu
Lines: 31