New failures (update from 269300 to 269304): FAIL: gcc.dg/uninit-pred-8_b.c bogus warning (test for bogus messages, line 20) FAIL: gcc.dg/uninit-pred-8_b.c bogus warning (test for bogus messages, line 39) FAIL: gcc.dg/uninit-pred-8_b.c warning (test for warnings, line 42) spawn -ignore SIGHUP /home/seurer/gcc/build/gcc-test2/gcc/xgcc -B/home/seurer/gcc/build/gcc-test2/gcc/ /home/seurer/gcc/gcc-test2/gcc/testsuite/gcc.dg/uninit-pred-8_b.c -fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers -fdiagnostics-color=never -Wuninitialized -O2 -S -o uninit-pred-8_b.s /home/seurer/gcc/gcc-test2/gcc/testsuite/gcc.dg/uninit-pred-8_b.c: In function 'foo': /home/seurer/gcc/gcc-test2/gcc/testsuite/gcc.dg/uninit-pred-8_b.c:20:7: warning: 'v' may be used uninitialized in this function [-Wmaybe-uninitialized] /home/seurer/gcc/gcc-test2/gcc/testsuite/gcc.dg/uninit-pred-8_b.c: In function 'foo_2': /home/seurer/gcc/gcc-test2/gcc/testsuite/gcc.dg/uninit-pred-8_b.c:39:7: warning: 'v' may be used uninitialized in this function [-Wmaybe-uninitialized] FAIL: gcc.dg/uninit-pred-8_b.c bogus warning (test for bogus messages, line 20) PASS: gcc.dg/uninit-pred-8_b.c bogus warning (test for bogus messages, line 23) FAIL: gcc.dg/uninit-pred-8_b.c bogus warning (test for bogus messages, line 39) FAIL: gcc.dg/uninit-pred-8_b.c warning (test for warnings, line 42) PASS: gcc.dg/uninit-pred-8_b.c (test for excess errors) testcase /home/seurer/gcc/gcc-test2/gcc/testsuite/gcc.dg/dg.exp completed in 0 seconds === gcc Summary === # of expected passes 2 # of unexpected failures 3
I will have a look.
The difference starts in DOM3 by the CFG cleanup change catching two more BB merging opportunities which then in VRP2 causes(?) extra jump threadings to happen (for whatever reason...). On x86_64 we have different IL (branch-cost, logical-op-non-short-circuit) so what happens is different. The IL we hand off to the late uninit pass is not resembling the original source in any way due to these threadings and the usual inabilities of the uninit pass pop up. --param logical-op-non-short-circuit=1 fixes the testcase on powerpc64le, =0 makes it fail on x86_64. I'll adjust the testcase, not sure if anybody wants to analyze why jump threading goes berzerk here. Note disabling DOM3 fixes the testcase as well - the effect is just the extra forwarder and then in VRP2: Visiting statement: _2 = g.0_1 + 1; -<<<< COPY m_19 = m_8(D) -0>>> COPY m_20 = m_8(D) +LKUP STMT n_7(D) le_expr 9 +FIND: 0 +LKUP STMT m_8(D) gt_expr 100 +FIND: 0 + Registering jump thread: (6, 7) incoming edge; (7, 8) joiner; (8, 10) normal; (10, 11) nocopy; <<<< COPY m_20 = m_8(D) +LKUP STMT n_7(D) le_expr 9 +FIND: 0 + Registering jump thread: (6, 7) incoming edge; (7, 9) joiner; (9, 11) normal; and more similar cases.
Author: rguenth Date: Wed Mar 6 10:13:08 2019 New Revision: 269416 URL: https://gcc.gnu.org/viewcvs?rev=269416&root=gcc&view=rev Log: 2019-03-06 Richard Biener <rguenther@suse.de> PR testsuite/89551 * gcc.dg/uninit-pred-8_b.c: Force logical-op-non-short-circuit the way that makes the testcase PASS. Modified: trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.dg/uninit-pred-8_b.c
Fixed.
*** Bug 89717 has been marked as a duplicate of this bug. ***
Author: rguenth Date: Fri Mar 15 11:07:53 2019 New Revision: 269704 URL: https://gcc.gnu.org/viewcvs?rev=269704&root=gcc&view=rev Log: 2019-03-15 Richard Biener <rguenther@suse.de> Backport from mainline 2019-03-06 Richard Biener <rguenther@suse.de> PR testsuite/89551 * gcc.dg/uninit-pred-8_b.c: Force logical-op-non-short-circuit the way that makes the testcase PASS. 2018-11-30 Jakub Jelinek <jakub@redhat.com> PR testsuite/85368 * params.def (PARAM_LOGICAL_OP_NON_SHORT_CIRCUIT): New param. * tree-ssa-ifcombine.c (ifcombine_ifandif): If --param logical-op-non-short-circuit is present, override LOGICAL_OP_NON_SHORT_CIRCUIT value from the param. * fold-const.c (fold_range_test, fold_truth_andor): Likewise. Modified: branches/gcc-8-branch/gcc/ChangeLog branches/gcc-8-branch/gcc/fold-const.c branches/gcc-8-branch/gcc/params.def branches/gcc-8-branch/gcc/testsuite/ChangeLog branches/gcc-8-branch/gcc/testsuite/gcc.dg/uninit-pred-8_b.c branches/gcc-8-branch/gcc/tree-ssa-ifcombine.c