Jakub Jelinek <ja...@redhat.com> writes: > On Sat, Sep 07, 2013 at 12:37:14PM +0100, Richard Sandiford wrote: >> Steven Bosscher <stevenb....@gmail.com> writes: >> > Can you please add a test case? >> >> What kind of test would you suggest? Do we have a harness for testing >> that -O2 and -O2 -g .text output is identical? > > No, but we have -fcompare-debug, which is even stronger than that (compares > final RTL, so can catch even differences that aren't visible in the .s file, > but still are relevant). And, the default way of bootstrapping also > compares .text etc. after stripping, between stage2 (built without debug) > and stage3 (with debug).
Right, the bootstrap thing is what forced me to write the patch in the first place. I probably wasn't clear, sorry, but the original problem was a bootstrap comparison failure between stage 2 and stage 3 because the tree.o code depended on whether debug info was enabled. I'll try to use -fcompare-debug though, thanks. Richard