This is the mail archive of the
mailing list for the GCC project.
Chasing a potential wrong-code bug on trunk
- From: Martin Reinecke <martin at MPA-Garching dot MPG dot DE>
- To: gcc at gcc dot gnu dot org
- Cc: rguenther at suse dot de
- Date: Thu, 17 Nov 2016 10:49:09 +0100
- Subject: Chasing a potential wrong-code bug on trunk
- Authentication-results: sourceware.org; auth=none
At some point in May 2016 there was a patch to the gcc trunk which
caused one of my numerical codes to give incorrect results when compiled
with this gcc version. This may of course be caused by some undefined
behavior I'm unknowingly invoking in the code, or it may be a code
generation bug in gcc. I tried to isolate the exact gcc commit that
caused the change, but I got stuck...
Starting from SVN revision 236320:
2016-05-17 Richard Biener <email@example.com>
* tree-loop-distribution.c (create_rdg_cd_edges): Pass in loop.
Only add control dependences for blocks in the loop.
(generate_code_for_partition): Return whether loop should
be destroyed and delay that.
(pass_loop_distribution::execute): Record loops to be destroyed
and perform delayed destroying of loops.
gcc crashes with an ICE when trying to compile the code.
Compilation works again starting with revision 236361:
2016-05-18 Richard Biener <firstname.lastname@example.org>
* tree-loop-distribution.c (distribute_loop): Move *destroy_p
* gcc.dg/torture/pr71168.c: New testcase.
but then the compiled code produces incorrect results.
I can provide an unreduced test case, but it is several thousand lines
long and I don't have a clue how to reduce it yet. Judging from the
ChangeLog entries I strongly suspect that the tree-loop-distribution
changes caused the different behavior.
Could someone please give me a hint which sort of loops are most likely
to be compiled differently after the changes, so that I have a better
idea where to look for the problem?
Thanks in advance,