public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "msebor at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/67196] [9/10/11 Regression] loop-induced false positive from -Wmaybe-uninitialized Date: Wed, 31 Mar 2021 19:44:36 +0000 [thread overview] Message-ID: <bug-67196-4-pRqDYJN0P3@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-67196-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67196 Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed|2015-08-12 00:00:00 |2021-3-31 Known to fail| |10.2.0, 11.0, 5.5.0, 6.4.0, | |7.2.0, 8.3.0, 9.1.0 CC| |msebor at gcc dot gnu.org Summary|Another false positive from |[9/10/11 Regression] |-Wmaybe-uninitialized |loop-induced false positive | |from -Wmaybe-uninitialized Keywords| |diagnostic --- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> --- Reconfirmed with GCC 11 as a regression introduced in r185913 (4.8.0 20120328). Nothing in the IL jumps out at me that could be used by the predicate analysis to rule out the false positive: the use in the return statement in bb 8 looks unconditional. pr67196.c: In function ‘test’: pr67196.c:7:7: warning: ‘first_caption_idx’ may be used uninitialized in this function [-Wmaybe-uninitialized] 7 | int first_caption_idx; | ^~~~~~~~~~~~~~~~~ int test (int n) { int i; int first_caption_idx; int first_caption; int num_captions_in_row; int _1; _Bool _2; _Bool _3; _Bool _4; int _12; <bb 2> [local count: 118111600]: if (n_16(D) > 0) goto <bb 9>; [89.00%] else goto <bb 11>; [11.00%] <bb 11> [local count: 12992276]: goto <bb 8>; [100.00%] <bb 9> [local count: 105119324]: <bb 3> [local count: 955630225]: # num_captions_in_row_25 = PHI <num_captions_in_row_5(10), 0(9)> # first_caption_27 = PHI <first_caption_7(10), 0(9)> # first_caption_idx_29 = PHI <first_caption_idx_9(10), first_caption_idx_14(D)(9)> <<< (3) first_caption_idx_14(D) is uninitialized # i_31 = PHI <i_19(10), 0(9)> _1 = some_test (i_31); if (_1 != 0) goto <bb 4>; [50.00%] else goto <bb 12>; [50.00%] <bb 12> [local count: 477815113]: goto <bb 5>; [100.00%] <bb 4> [local count: 477815112]: num_captions_in_row_18 = num_captions_in_row_25 + 1; <bb 5> [local count: 955630225]: # num_captions_in_row_5 = PHI <num_captions_in_row_25(12), num_captions_in_row_18(4)> # first_caption_7 = PHI <first_caption_27(12), 1(4)> # first_caption_idx_9 = PHI <first_caption_idx_29(12), i_31(4)> <<< (2) i_19 = i_31 + 1; if (n_16(D) != i_19) goto <bb 10>; [89.00%] else goto <bb 6>; [11.00%] <bb 10> [local count: 850510901]: goto <bb 3>; [100.00%] <bb 6> [local count: 105119324]: _2 = first_caption_7 != 0; _3 = num_captions_in_row_5 == 1; _4 = _2 & _3; if (_4 != 0) goto <bb 13>; [38.20%] else goto <bb 7>; [61.80%] <bb 13> [local count: 40157944]: goto <bb 8>; [100.00%] <bb 7> [local count: 64961380]: <bb 8> [local count: 118111600]: # _12 = PHI <first_caption_idx_9(13), 0(7), 0(11)> <<< (1) return _12; <<< use }
next prev parent reply other threads:[~2021-03-31 19:44 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-08-12 19:03 [Bug tree-optimization/67196] New: Another " dmalcolm at gcc dot gnu.org 2015-08-12 20:26 ` [Bug tree-optimization/67196] " manu at gcc dot gnu.org 2021-03-31 19:44 ` msebor at gcc dot gnu.org [this message] 2021-04-08 14:24 ` [Bug tree-optimization/67196] [9/10/11 Regression] loop-induced " rguenth at gcc dot gnu.org 2021-06-01 8:06 ` [Bug tree-optimization/67196] [9/10/11/12 " rguenth at gcc dot gnu.org 2022-01-21 13:53 ` rguenth at gcc dot gnu.org 2022-05-27 9:35 ` [Bug tree-optimization/67196] [10/11/12/13 " rguenth at gcc dot gnu.org 2022-06-28 10:31 ` jakub at gcc dot gnu.org 2022-08-30 9:40 ` rguenth at gcc dot gnu.org 2022-08-30 11:15 ` cvs-commit at gcc dot gnu.org 2022-11-20 3:56 ` [Bug tree-optimization/67196] [10/11/12 " law at gcc dot gnu.org 2022-11-21 6:47 ` rguenth at gcc dot gnu.org 2023-07-07 7:28 ` [Bug tree-optimization/67196] [11/12 " rguenth at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-67196-4-pRqDYJN0P3@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).