NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: toolchain/40694: gcc tail-call vs. volatile bug
The following reply was made to PR toolchain/40694; it has been noted by GNATS.
From: David Laight <david%l8s.co.uk@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: toolchain/40694: gcc tail-call vs. volatile bug
Date: Thu, 19 Feb 2009 20:59:58 +0000
On Thu, Feb 19, 2009 at 06:00:00PM +0000, dholland%eecs.harvard.edu@localhost
wrote:
> >Number: 40694
> >Category: toolchain
> >Synopsis: gcc tail-call vs. volatile bug
...
> Compiling the following fragment (gcc -O2 -S foo.c) generates an
> invalid tail call that does not repeat the local (volatile, no less)
> variable on a new stack frame.
>
> void
> recurse_inf(void)
> {
> volatile char buf[16];
> buf[0] = 0;
> recurse_inf();
> }
Surely the 'as if' rule applies?
Since 'buf' cannot be referenced it can be discarded.
I don't see why the 'volatile' would have any effect here.
David
--
David Laight: david%l8s.co.uk@localhost
Home |
Main Index |
Thread Index |
Old Index