chip@tct.com (Chip Salzenberg) (05/29/91)
I am so confused.
A long time ago, in a galaxy far far away (named "3003"), I compiled
GNU Make 3.58. It worked fine. Everyone was happy.
Recently, we installed the 3005 update. Now when I compile GNU Make,
it doesn't work. Everyone is sad.
Tracking this error down has been an adventure.
When I compile without optimization, a simple "for" loop in main()
is executing all wrong. The loop looks like this:
register unsigned int i;
/* ... */
for (i = 0; environ[i] != 0; ++i)
{
register char *ep = environ[i];
while (*ep++ != '=')
;
(void) define_variable (environ[i], ep - environ[i] - 1, ep, o_env, 1);
}
A debugging printf() reveals that the value of "i" is getting trashed
during the subroutine call! That problem should not be possible.
It gets worse. When I compile GNU Make with the optimizer on, it dies
with the message "Killed" -- *unless* I run it with the "-d" flag, in
which case it is fine (if verbose). I'm so confused!
I'd try to track down the bug myself, but without a "-S" flag for cc,
I can't verify the compilers output. :-(
What's happening to my cc?!
--
Chip Salzenberg at Teltronics/TCT <chip@tct.com>, <uunet!pdn!tct!chip>
perl -e 'sub do { print "extinct!\n"; } do do()'