diff options
author | dnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-12-17 22:20:33 +0000 |
---|---|---|
committer | dnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-12-17 22:20:33 +0000 |
commit | 00a1a249e088472ba08196998a595d421a0244ce (patch) | |
tree | d30e405b088b0e569b5e4a7c2d94d855af66387b /gcc/tree-optimize.c | |
parent | 4d5f8cf5f7072f39ead15100cc608ddbc35e0ae7 (diff) | |
download | gcc-00a1a249e088472ba08196998a595d421a0244ce.tar.gz |
tree-optimization/18501
* tree-optimize.c (init_tree_optimization_passes): Run
pass_late_warn_uninitialized before the last DCE run.
testsuite/ChangeLog:
* gcc.dg/pr18501.c: New test.
* gcc.dg/uninit-5.c: XFAIL.
* gcc.dg/uninit-9.c: XFAIL.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@92337 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-optimize.c')
-rw-r--r-- | gcc/tree-optimize.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/tree-optimize.c b/gcc/tree-optimize.c index 9f58f533731..eae39df90aa 100644 --- a/gcc/tree-optimize.c +++ b/gcc/tree-optimize.c @@ -381,12 +381,21 @@ init_tree_optimization_passes (void) NEXT_PASS (pass_loop); NEXT_PASS (pass_dominator); NEXT_PASS (pass_redundant_phi); + /* FIXME: If DCE is not run before checking for uninitialized uses, + we may get false warnings (e.g., testsuite/gcc.dg/uninit-5.c). + However, this also causes us to misdiagnose cases that should be + real warnings (e.g., testsuite/gcc.dg/pr18501.c). + + To fix the false positives in uninit-5.c, we would have to + account for the predicates protecting the set and the use of each + variable. Using a representation like Gated Single Assignment + may help. */ + NEXT_PASS (pass_late_warn_uninitialized); NEXT_PASS (pass_cd_dce); NEXT_PASS (pass_dse); NEXT_PASS (pass_forwprop); NEXT_PASS (pass_phiopt); NEXT_PASS (pass_tail_calls); - NEXT_PASS (pass_late_warn_uninitialized); NEXT_PASS (pass_del_ssa); NEXT_PASS (pass_nrv); NEXT_PASS (pass_remove_useless_vars); |