From: Richard Biener <rguenther@suse.de>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH] Fix PR71462
Date: Thu, 09 Jun 2016 08:45:00 -0000 [thread overview]
Message-ID: <alpine.LSU.2.11.1606091043520.1493@t29.fhfr.qr> (raw)
I am testing the following patch to robustify into-loop-closed-SSA
rewrite against removed blocks in the changed_bbs bitmap.
Bootstrap and regtest running on x86_64-unknown-linux-gnu.
Richard.
2016-06-09 Richard Biener <rguenther@suse.de>
PR tree-optimization/71462
* tree-ssa-loop-manip.c (find_uses_to_rename): Guard against
removed blocks.
* gcc.dg/torture/pr71462.c: New testcase.
Index: gcc/tree-ssa-loop-manip.c
===================================================================
*** gcc/tree-ssa-loop-manip.c (revision 237248)
--- gcc/tree-ssa-loop-manip.c (working copy)
*************** find_uses_to_rename (bitmap changed_bbs,
*** 472,479 ****
if (changed_bbs)
EXECUTE_IF_SET_IN_BITMAP (changed_bbs, 0, index, bi)
! find_uses_to_rename_bb (BASIC_BLOCK_FOR_FN (cfun, index), use_blocks,
! need_phis, use_flags);
else
FOR_EACH_BB_FN (bb, cfun)
find_uses_to_rename_bb (bb, use_blocks, need_phis, use_flags);
--- 472,482 ----
if (changed_bbs)
EXECUTE_IF_SET_IN_BITMAP (changed_bbs, 0, index, bi)
! {
! bb = BASIC_BLOCK_FOR_FN (cfun, index);
! if (bb)
! find_uses_to_rename_bb (bb, use_blocks, need_phis, use_flags);
! }
else
FOR_EACH_BB_FN (bb, cfun)
find_uses_to_rename_bb (bb, use_blocks, need_phis, use_flags);
Index: gcc/testsuite/gcc.dg/torture/pr71462.c
===================================================================
*** gcc/testsuite/gcc.dg/torture/pr71462.c (revision 0)
--- gcc/testsuite/gcc.dg/torture/pr71462.c (working copy)
***************
*** 0 ****
--- 1,28 ----
+ /* { dg-do compile } */
+
+ short a;
+ long b;
+ void fn1()
+ {
+ int c = a = 1;
+ for (; a; a++)
+ {
+ for (; 9 <= 8;)
+ for (;;) {
+ a = 20;
+ for (; a <= 35; a++)
+ ;
+ line:;
+ }
+ if ((c += 264487869) == 9)
+ {
+ unsigned *d = 0;
+ for (; b;)
+ d = (unsigned *)&c;
+ if (d)
+ for (;;)
+ ;
+ }
+ }
+ goto line;
+ }
reply other threads:[~2016-06-09 8:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=alpine.LSU.2.11.1606091043520.1493@t29.fhfr.qr \
--to=rguenther@suse.de \
--cc=gcc-patches@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: link
Be 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).