Article View: gnu.gcc.bug
Article #6096Re: gcc-2.7.2{,.1} m68k-elf problem
From: Andreas Schwab
Date: Wed, 27 Nov 1996 00:00
Date: Wed, 27 Nov 1996 00:00
45 lines
1985 bytes
1985 bytes
Matthew L Martin <mxm@proteon.com> writes:
|> I have reduced this to what I think is the minimum needed to reproduce:
|> The gcc used is 2.7.2 with no local modifications, targeted for
|> m68k-unknown-linux, hosted on a sparc running sunos-4.1.4.
|> I first noticed this on gcc-2.7.2.1, I then backed down to 2.7.2, but it
|> appears to be a m68k-elf bug.
[...]
|>> cat inconf.c
|> /*
|> * External declarations
|> */
|> extern int zero();
|> extern unsigned int tnets;
|> void *ALP(unsigned int size);
|> extern inline void *alp(unsigned int size)
|> {
|> return((void *)(
|> {
|> register unsigned short __SCOPS ;
|> register unsigned long __RETURN asm("%d0");
|> asm volatile ("move %%SR, %0; move #0x2700, %%SR" : "=md" (__SCOPS));
|> ;
|> ALP ( size );
|> asm volatile ("move %0, %%SR": : "md" ((unsigned short)(__SCOPS)));
|> ;
|> __RETURN;
^^^^^^^^ this is not initialized.
|> })
|> );
|> }
This is not a bug in gcc: __RETURN is never initialized, so gcc can put
there anything it sees fit. Actually the real bug is that gcc does not
warn about this use of an uninitialized variable.
--
Andreas Schwab "And now for something
schwab@issan.informatik.uni-dortmund.de completely different"
Technical Details
Message-ID:
<vyzralfdee4.fsf@issan.informatik.uni-dortmund.de>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<Pine.SUN.3.95.961122165053.8853B-100000@cobain.proteon.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 113d02,f7c3876a6b1f26f6
X-Google-Attributes: gid113d02,public
From: schwab@issan.informatik.uni-dortmund.de (Andreas Schwab)
Subject: Re: gcc-2.7.2{,.1} m68k-elf problem
Date: 1996/11/27
Message-ID: <vyzralfdee4.fsf@issan.informatik.uni-dortmund.de>
X-Deja-AN: 201010074
sender: schwab@issan.informatik.uni-dortmund.de
references: <Pine.SUN.3.95.961122165053.8853B-100000@cobain.proteon.com>
organization: Dortmund University, Germany
x-gateway: relay7.UU.NET from bug-gcc to gnu.gcc.bug; Wed, 27 Nov 1996 05:25:37 EST
newsgroups: gnu.gcc.bug