🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #2214

bug in gcc v1.32 Sun 3 SunOS 4.0.1

#2214
From: Richard
Date: Thu, 26 Jan 1989 12:56
41 lines
1100 bytes
/*
    The following trivial function demonstrates a bug in gcc v1.32 for
    a 68020 running SunOS 4.0.1
    
    When compiled by gcc v1.32 without any optimisation, the compiler 
    produces the following code, which appears to be correct.

#NO_APP
gcc_compiled.:
.text
	.even
.globl _fred
_fred:
	link a6,#-4
	moveb a6@(11),a6@(-1)
L1:
	unlk a6
	rts
   
    When compiled with "-O", it produces the following code, which extracts 
    the MSB of the parameter rather than the LSB.

#NO_APP
gcc_compiled.:
.text
	.even
.globl _fred
_fred:
	link a6,#-4
	moveb a6@(8),d0
	moveb d0,a6@(-1)
	unlk a6
	rts
*/

fred( int j )
    {
    volatile char x;

    x = j;
    }
Technical Details
Message-ID: <8901261256.AA01602@marvin.moncam.uucp>
Path: arc1-ca.pugleaf.net!utzoo!telly!ddsw1!lll-winken!killer!mit-eddie!bbn!mailrus!tut.cis.ohio-state.edu!"Richard

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!ddsw1!lll-winken!killer!mit-eddie!bbn!mailrus!tut.cis.ohio-state.edu!"Richard
From: "Richard@tut.cis.ohio-state.edu
Newsgroups: gnu.gcc.bug
Subject: bug in gcc v1.32 Sun 3 SunOS 4.0.1
Message-ID: <8901261256.AA01602@marvin.moncam.uucp>
Date: 26 Jan 89 12:56:17 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 41