g++.old-deja/g++.mike/p7325.C - suspected bogus test case
Nathan Sidwell
nathan@codesourcery.com
Tue Jun 29 09:22:00 GMT 2004
Ian Lance Taylor wrote:
> For example, here is a quickie test for whether arrays declared in
> different blocks overlap. This test appears to currently always fail.
> char *
> foo ()
> {
> {
> char b[100];
> memset (b, 0, sizeof b);
> }
> {
> char c[100];
> memset (c, 0, sizeof c);
> }
> return stack ();
> }
couldn't stack be sibcalled here, and thus not detect non-overlappingness?
Passing the address of some new parm of FOO should prevent sibcalling.
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk
More information about the Gcc
mailing list