public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Sebastian Pop <s.pop@samsung.com>
To: sebpop@gmail.com
Cc: gcc-patches@gcc.gnu.org,	hiraditya@msn.com,
	Sebastian Pop <s.pop@samsung.com>
Subject: [PATCH 3/3] [graphite] fix PR68493: bail out when codegen_error is set
Date: Mon, 23 Nov 2015 19:07:00 -0000	[thread overview]
Message-ID: <1448305640-18564-3-git-send-email-s.pop@samsung.com> (raw)
In-Reply-To: <1448305640-18564-1-git-send-email-s.pop@samsung.com>

---
 gcc/graphite-isl-ast-to-gimple.c        |  2 ++
 gcc/testsuite/gcc.dg/graphite/pr68493.c | 34 +++++++++++++++++++++++++++++++++
 2 files changed, 36 insertions(+)
 create mode 100644 gcc/testsuite/gcc.dg/graphite/pr68493.c

diff --git a/gcc/graphite-isl-ast-to-gimple.c b/gcc/graphite-isl-ast-to-gimple.c
index 30c3a21..2783ac4 100644
--- a/gcc/graphite-isl-ast-to-gimple.c
+++ b/gcc/graphite-isl-ast-to-gimple.c
@@ -2760,6 +2760,8 @@ translate_isl_ast_to_gimple::translate_pending_phi_nodes ()
 	  fprintf (dump_file, "[codegen] to new-phi: ");
 	  print_gimple_stmt (dump_file, new_phi, 0, 0);
 	}
+      if (codegen_error)
+	return;
     }
 }
 
diff --git a/gcc/testsuite/gcc.dg/graphite/pr68493.c b/gcc/testsuite/gcc.dg/graphite/pr68493.c
new file mode 100644
index 0000000..95f3699
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/graphite/pr68493.c
@@ -0,0 +1,34 @@
+/* { dg-options "-O1 -floop-nest-optimize" } */
+
+int ce[2];
+int o5;
+int p7;
+
+int foo (void)
+{
+  int j1;
+  ce[0] = 0;
+  for (j1 = 0; j1 < 2; ++j1)
+    for (o5 = 1; o5 >= 0; --o5)
+      p7 += ce[o5];
+  return 0;
+}
+
+int du;
+
+int bar (void)
+{
+  int u7[2];
+  int ar;
+
+  for (ar = 0; ar < 2; ++ar) {
+    int xo;
+
+    for (xo = 0; xo < 2; ++xo) {
+      du += u7[ar];
+      u7[0] = 0;
+    }
+  }
+
+  return 0;
+}
-- 
1.9.1

      parent reply	other threads:[~2015-11-23 19:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-23 19:15 [PATCH 1/3] [graphite] call update_ssa once Sebastian Pop
2015-11-23 19:07 ` [PATCH 2/3] [graphite] fix PR68279: bail out when scev gets instantiated to not_known Sebastian Pop
2015-11-23 19:07 ` Sebastian Pop [this message]

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=1448305640-18564-3-git-send-email-s.pop@samsung.com \
    --to=s.pop@samsung.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hiraditya@msn.com \
    --cc=sebpop@gmail.com \
    /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).