From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16999 invoked by alias); 28 Aug 2013 16:58:09 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 16934 invoked by uid 48); 28 Aug 2013 16:58:06 -0000 From: "xinliangli at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/57287] [4.9 Regression] Bogous uninitialized warning with abnormal control flow Date: Wed, 28 Aug 2013 16:58:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: xinliangli at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-08/txt/msg01483.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57287 --- Comment #16 from davidxl --- (In reply to Richard Biener from comment #15) > Confirmed. David, can you have a look here? I had a hard time following > what > exactly to do with the dataflow in the uninit pass for abnormal control flow > (abnormal control flow should be considered receiving an initialized value). > > Thanks. I looked at it a little. The warning is not from the predicated uninit analysis which checks uses of phi defs. The warning is emitted from tree-ssa.c:1644 in function warn_uninitialized_vars. It warns about the 'definitely' uninitialized variable that may be executed. In this case it is use of 'buf_16(ab)' in BB3. Not sure where this statement comes from: buf_24 = buf_16(ab); The dot file is attached. digraph "uninit.c.131t.uninit1" { overlap=false; subgraph "baz" { color="black"; label="baz"; fn_11_basic_block_0 [shape=Mdiamond,style=filled,fillcolor=white,label="ENTRY"]; fn_11_basic_block_1 [shape=Mdiamond,style=filled,fillcolor=white,label="EXIT"]; fn_11_basic_block_2 [shape=record,style=filled,fillcolor=lightgrey,label="{ FREQ:10000 |\:\l\ |varseen_11(ab)\ =\ 0;\l\ |_14\ =\ head\ ();\l\ }"]; fn_11_basic_block_3 [shape=record,style=filled,fillcolor=lightgrey,label="{ FREQ:7100 |\:\l\ |list\ =\ _14;\l\ |buf_24\ =\ buf_16(ab);\l\ |if\ (_14\ !=\ 0B)\l\ \ \ goto\ \;\l\ else\l\ \ \ goto\ \;\l\ }"]; fn_11_basic_block_4 [shape=record,style=filled,fillcolor=lightgrey,label="{ FREQ:8500 |\:\l\ |#\ varseen_3(ab)\ =\ PHI\ \<1(3),\ 1(6)\>\l\ |#\ n_26(ab)\ =\ PHI\ \<_14(3),\ n_2(ab)(6)\>\l\ |#\ buf_27(ab)\ =\ PHI\ \\l\ |buf_21\ =\ bar\ ();\l\ }"]; fn_11_basic_block_5 [shape=record,style=filled,fillcolor=lightgrey,label="{ FREQ:4250 |\:\l\ }"]; fn_11_basic_block_6 [shape=record,style=filled,fillcolor=lightgrey,label="{ FREQ:2900 |\:\l\ |#\ n_1(ab)\ =\ PHI\ \\l\ |#\ varseen_4(ab)\ =\ PHI\ \\l\ |#\ buf_6(ab)\ =\ PHI\ \\l\ |__sigsetjmp\ (buf_6(ab),\ 1);\l\ |n_19\ =\ n_1(ab)-\>next;\l\ |n_2(ab)\ =\ n_19;\l\ |varseen_5\ =\ varseen_4(ab);\l\ |buf_7(ab)\ =\ buf_6(ab);\l\ |if\ (n_2(ab)\ !=\ 0B)\l\ \ \ goto\ \;\l\ else\l\ \ \ goto\ \;\l\ }"]; fn_11_basic_block_7 [shape=record,style=filled,fillcolor=lightgrey,label="{ FREQ:1500 |\:\l\ |_25\ =\ varseen_5;\l\ }"]; fn_11_basic_block_8 [shape=record,style=filled,fillcolor=lightgrey,label="{ FREQ:1500 |\:\l\ |#\ _8\ =\ PHI\ \<_25(7),\ 0(3)\>\l\ |return\ _8;\l\ }"]; fn_11_basic_block_0:s -> fn_11_basic_block_2:n [style="solid,bold",color=blue,weight=100,constraint=true, label="[100%]"]; fn_11_basic_block_2:s -> fn_11_basic_block_6:n [style="solid,bold",color=red,weight=10,constraint=true, label="[29%]"]; fn_11_basic_block_2:s -> fn_11_basic_block_3:n [style="solid,bold",color=blue,weight=100,constraint=true, label="[71%]"]; fn_11_basic_block_3:s -> fn_11_basic_block_4:n [style="solid,bold",color=black,weight=10,constraint=true, label="[85%]"]; fn_11_basic_block_3:s -> fn_11_basic_block_8:n [style="solid,bold",color=black,weight=10,constraint=true, label="[15%]"]; fn_11_basic_block_4:s -> fn_11_basic_block_6:n [style="dotted,bold",color=red,weight=10,constraint=false, label="[50%]"]; fn_11_basic_block_4:s -> fn_11_basic_block_5:n [style="solid,bold",color=blue,weight=100,constraint=true, label="[50%]"]; fn_11_basic_block_5:s -> fn_11_basic_block_6:n [style="dotted,bold",color=blue,weight=10,constraint=false, label="[100%]"]; fn_11_basic_block_6:s -> fn_11_basic_block_4:n [style="solid,bold",color=black,weight=10,constraint=true, label="[85%]"]; fn_11_basic_block_6:s -> fn_11_basic_block_7:n [style="solid,bold",color=black,weight=10,constraint=true, label="[15%]"]; fn_11_basic_block_7:s -> fn_11_basic_block_8:n [style="solid,bold",color=blue,weight=100,constraint=true, label="[100%]"]; fn_11_basic_block_8:s -> fn_11_basic_block_1:n [style="solid,bold",color=black,weight=10,constraint=true, label="[100%]"]; fn_11_basic_block_0:s -> fn_11_basic_block_1:n [style="invis",constraint=true]; } }