🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #2308

volatile function parameters

#2308
From: Ken Raeburn
Date: Wed, 15 Feb 1989 10:14
15 lines
750 bytes
GCC moves outside the loop the references to the variable "xyzzy" in
the following file:

    extern save_address_of_flag (volatile int *);

    void foo ( volatile int xyzzy) {
	save_address_of_flag (&xyzzy);
	while (xyzzy & 1)
	    ;
    }

If "xyzzy" is made an automatic variable, the problem goes away.

-- Ken
Technical Details
Message-ID: <8902151014.AA08995@MULTICS.MIT.EDU>
Path: arc1-ca.pugleaf.net!utzoo!yunexus!telly!attcan!uunet!tut.cis.ohio-state.edu!ATHENA.MIT.EDU!raeburn

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!yunexus!telly!attcan!uunet!tut.cis.ohio-state.edu!ATHENA.MIT.EDU!raeburn
From: raeburn@ATHENA.MIT.EDU (Ken Raeburn)
Newsgroups: gnu.gcc.bug
Subject: volatile function parameters
Message-ID: <8902151014.AA08995@MULTICS.MIT.EDU>
Date: 15 Feb 89 10:14:48 GMT
Article-I.D.: MULTICS.8902151014.AA08995
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 15