This is the mail archive of the
mailing list for the GCC project.
Re: [patch] Fix PR40021: miscompile of BLAS (hence tonto and gamess)
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Michael Matz <matz at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 6 May 2009 09:03:36 -0700
- Subject: Re: [patch] Fix PR40021: miscompile of BLAS (hence tonto and gamess)
- References: <Pine.LNX.email@example.com>
On Wed, May 6, 2009 at 9:00 AM, Michael Matz <firstname.lastname@example.org> wrote:
> as detailed in the bugreport we can end up in a situation where a basic
> block with just one successor edge ends with multiple jump instructions to
> the same target (only during expansion itself). ?We are confused if we
> want to insert instructions on such edge and insert them before the last
> jump, but after the others, which later leads to miscompilations as the
> inserted instruction isn't ru then.
> This fixes the miscompile (with test input and of the testcase).
> Regstrapped on x86_64-linux. ?Okay?
> ? ? ? ?PR middle-end/40021
> ? ? ? ?* cfgexpand.c (maybe_cleanup_end_of_block): New static function.
> ? ? ? ?(expand_gimple_cond): Use it to cleanup CFG and superfluous jumps.
Would you include the small run-time testcase at
if (DX(I).ne.DY(I)) then
print *, I, DX(I), '!=', DY(I)
with something like
if (DX(I).ne.DY(I)) call abort