This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: basic_induction_var change
- To: mark at codesourcery dot com
- Subject: Re: basic_induction_var change
- From: Jeffrey A Law <law at upchuck dot cygnus dot com>
- Date: Wed, 26 May 1999 14:28:27 -0600
- cc: egcs-patches at egcs dot cygnus dot com, Joern Rennecke <amylaar at cygnus dot co dot uk>
- Reply-To: law at cygnus dot com
In message <19990526121500Y.mitchell@codesourcery.com>you write:
>
> Let me preface by saying I'm blundering about somewhat in the dark.
> The attached patch has not been tested by running the testsuite, let
> alone by a bootstrap. But, it does seem to fix an abort I was seeing
> with a C++ test-case. I'd like a little feedback; perhaps this is the
> "obvious fix" or perhaps it is in totally the wrong direction.
>
> The deal is that basic_induction_var is being called with
> `x' equal to `(const_int 1)'. We decide this is a legitimate
> increment, but fail to set the output parameter LOCATION. As a
> result, a later call to validate_change
>
> if (! validate_change (next->insn, next->location, add_val, 0))
>
> crashes. I guessed that what was wanted for LOCATION was the address
> of the `(const_int 1)'.
>
> Could be way off. Thoughts?
Very cool. Thanks for starting to take a look at this. I briefly looked
at it while in the Cinn. airport over the weekend, but didn't get far enough
to even guess what was happening. I've seen at least 4 or 5 bug reports that
are probably the same problem.
I see that Joern has replied with another patch. I'll try to get to both
of them tonight.
jeff