On Linux/x86-64, gcc 4.3.3 revision 143474 miscompiled 464.h264ref in SPEC CPU 2006 at -O2 -ffast-math: Running 464.h264ref ref base o2 default Error with '/export/gnu/import/svn/gcc-test/spec/2006/x86_64/spec/bin/specinvoke rt/gnu/import/svn/gcc-test/spec/2006/x86_64/spec/benchspec/CPU2006/464.h264ref/r ref_o2.0000 -c 1 -e compare.err -o compare.stdout -f compare.cmd': check file '/ mport/svn/gcc-test/spec/2006/x86_64/spec/benchspec/CPU2006/464.h264ref/run/run_b 000/.err' *** Miscompare of foreman_ref_main_leakybucketparam.cfg, see /export/gnu/import/ /spec/2006/x86_64/spec/benchspec/CPU2006/464.h264ref/run/run_base_ref_o2.0000/fo in_leakybucketparam.cfg.mis *** Miscompare of foreman_ref_main_encodelog.out, see /export/gnu/import/svn/gcc 006/x86_64/spec/benchspec/CPU2006/464.h264ref/run/run_base_ref_o2.0000/foreman_r delog.out.mis *** Miscompare of sss_main_encodelog.out, see /export/gnu/import/svn/gcc-test/sp 64/spec/benchspec/CPU2006/464.h264ref/run/run_base_ref_o2.0000/sss_main_encodelo *** Miscompare of foreman_ref_baseline_encodelog.out, see /export/gnu/import/svn ec/2006/x86_64/spec/benchspec/CPU2006/464.h264ref/run/run_base_ref_o2.0000/forem ine_encodelog.out.mis *** Miscompare of sss_main_leakybucketparam.cfg, see /export/gnu/import/svn/gcc- 06/x86_64/spec/benchspec/CPU2006/464.h264ref/run/run_base_ref_o2.0000/sss_main_l ram.cfg.mis *** Miscompare of foreman_ref_baseline_leakybucketparam.cfg, see /export/gnu/imp test/spec/2006/x86_64/spec/benchspec/CPU2006/464.h264ref/run/run_base_ref_o2.000 f_baseline_leakybucketparam.cfg.mis We are trying to find a smaller testcase as well as which checkin caused this.
It is caused by revision 142040: http://gcc.gnu.org/ml/gcc-cvs/2008-11/msg00541.html
(In reply to comment #1) > It is caused by revision 142040: > > http://gcc.gnu.org/ml/gcc-cvs/2008-11/msg00541.html > The patch is at http://gcc.gnu.org/ml/gcc-patches/2008-11/msg01040.html
Subject: Re: [4.3 Regression] 464.h264ref in SPEC CPU 2006 miscompiled On Sun, 18 Jan 2009, hjl dot tools at gmail dot com wrote: > ------- Comment #2 from hjl dot tools at gmail dot com 2009-01-18 17:19 ------- > (In reply to comment #1) > > It is caused by revision 142040: > > > > http://gcc.gnu.org/ml/gcc-cvs/2008-11/msg00541.html > > > > The patch is at > > http://gcc.gnu.org/ml/gcc-patches/2008-11/msg01040.html Can you check if it is fixed by -fno-strict-aliasing and/or --param max-fields-for-field-sensitive=0? I suspect we need to backport some PTA fixes :/ Richard.
(In reply to comment #3) > Can you check if it is fixed by -fno-strict-aliasing and/or > --param max-fields-for-field-sensitive=0? I suspect we need to > backport some PTA fixes :/ > Either -fno-strict-aliasing or --param max-fields-for-field-sensitive=0 fixed this.
Subject: Re: [4.3 Regression] 464.h264ref in SPEC CPU 2006 miscompiled On Sun, 18 Jan 2009, hjl dot tools at gmail dot com wrote: > ------- Comment #4 from hjl dot tools at gmail dot com 2009-01-18 17:39 ------- > (In reply to comment #3) > > Can you check if it is fixed by -fno-strict-aliasing and/or > > --param max-fields-for-field-sensitive=0? I suspect we need to > > backport some PTA fixes :/ > > > > Either -fno-strict-aliasing or --param max-fields-for-field-sensitive=0 > fixed this. I would guess that 2008-11-25 Daniel Berlin <dberlin@dberlin.org> Richard Guenther <rguenther@suse.de> PR tree-optimization/37869 * tree-ssa-structalias.c (struct constraint_graph): Remove pt_used and number_incoming members. (build_pred_graph): Do not allocate them. (condense_visit): Do not use them. (label_visit): Likewise. (free_var_substitution_info): Do not free them. might fix it, but of course a testcase would be nice to have. Thx for tracking this down btw. Richard.
(In reply to comment #5) > > I would guess that > > 2008-11-25 Daniel Berlin <dberlin@dberlin.org> > Richard Guenther <rguenther@suse.de> > > PR tree-optimization/37869 > * tree-ssa-structalias.c (struct constraint_graph): Remove > pt_used and number_incoming members. > (build_pred_graph): Do not allocate them. > (condense_visit): Do not use them. > (label_visit): Likewise. > (free_var_substitution_info): Do not free them. > > might fix it, but of course a testcase would be nice to have. > Tried it on 4.3 branch. It doesn't fix the problem.
It works for me with -O2 -ffast-math and the openSUSE 11.1 compiler which also has this patch applied (but is based on rev. 141291). I'm trying with plain 4.3 branch now - any special configure options used?
(In reply to comment #7) > It works for me with -O2 -ffast-math and the openSUSE 11.1 compiler which also > has this patch applied (but is based on rev. 141291). I'm trying with plain > 4.3 branch now - any special configure options used? > I am using -DSPEC_CPU -DNDEBUG -O2 -ffast-math -DSPEC_CPU_LP64 on Fedora 9/x86-64 with glibc 2.8-10. I used 4.3 branch at revision 143470.
Created attachment 17136 [details] first alias patch I can reproduce this with the plain branch. Attached is the first extra alias patch in the SUSE compiler.
Created attachment 17137 [details] second alias patch Second alias related patch in the openSUSE compiler.
The testcase from PR36765 fails on the 4.3 branch. Does it fail without the patch for PR37868?
I'm testing the patch for PR36765 - that was a h264ref miscompile on the trunk.
Patches in comment #9 plus comment #10 fix 464.h264ref with test input. I am running with reference input on both ia32 and x86-64.
(In reply to comment #11) > The testcase from PR36765 fails on the 4.3 branch. Does it fail without the > patch for PR37868? > gcc.c-torture/execute/pr36765.c works with -O2 at revision 142026 and fails at revision 142040 on 4.3 branch.
I have verified that the patch for PR36765 fixes h264ref on the branch. *** This bug has been marked as a duplicate of 36765 ***