On 06/19/11 12:01, Andy Wingo wrote:
> No, this program also exhibits the same incorrect behavior, for purposes
> of stack growth checking.
Thanks, I guess we'll have to turn it up a notch. How about the
following test program?
int
find_stack_direction (int *addr, int depth)
{
int dir, dummy = 0;
if (! addr)
addr = &dummy;
*addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
dir = depth ? find_stack_direction (addr, depth - 1) : 0;
return dir + dummy;
}
int
main (int argc, char **argv)
{
return find_stack_direction (0, argc + !argv + 20) < 0;
}
This program is reflected in my most recent patch, here:
http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=6cd9f12520b0d6f76d3230d7565feba1ecf29497