Patchwork [30/44] Call fatal_error when the transform read from file is not legal.

login
register
mail settings
Submitter Sebastian Pop
Date Sept. 30, 2010, 6:01 p.m.
Message ID <1285869696-10915-31-git-send-email-sebpop@gmail.com>
Download mbox | patch
Permalink /patch/66217/
State New
Headers show

Comments

Sebastian Pop - Sept. 30, 2010, 6:01 p.m.
From: spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>

2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>

	* graphite-poly.c (apply_poly_transforms): Do not abort when the
	transform read from disk is not legal.  Call fatal_error instead.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/graphite@164123 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ChangeLog          |    5 +++++
 gcc/ChangeLog.graphite |    5 +++++
 gcc/graphite-poly.c    |    6 +++++-
 3 files changed, 15 insertions(+), 1 deletions(-)

Patch

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6741bc8..217799a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@ 
 2010-09-30  Sebastian Pop  <sebastian.pop@amd.com>
 
+	* graphite-poly.c (apply_poly_transforms): Do not abort when the
+	transform read from disk is not legal.  Call fatal_error instead.
+
+2010-09-30  Sebastian Pop  <sebastian.pop@amd.com>
+
 	* graphite-poly.c (print_pbb_body): Add missing closing parenthesis.
 	(print_scop_header): Removed.  Inlined in the only call place...
 	(print_scop): ... here.
diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite
index 99d4204..313869c 100644
--- a/gcc/ChangeLog.graphite
+++ b/gcc/ChangeLog.graphite
@@ -1,5 +1,10 @@ 
 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
 
+	* graphite-poly.c (apply_poly_transforms): Do not abort when the
+	transform read from disk is not legal.  Call fatal_error instead.
+
+2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
+
 	* graphite-poly.c (print_pbb_body): Add missing closing parenthesis.
 	(print_scop_header): Removed.  Inlined in the only call place...
 	(print_scop): ... here.
diff --git a/gcc/graphite-poly.c b/gcc/graphite-poly.c
index 46f1971..08a7a91 100644
--- a/gcc/graphite-poly.c
+++ b/gcc/graphite-poly.c
@@ -753,7 +753,11 @@  apply_poly_transforms (scop_p scop)
     {
       graphite_file = init_graphite_in_file (file_scop_number);
       transform_done |= graphite_read_scop_file (graphite_file, scop);
-      gcc_assert (graphite_legal_transform (scop));
+
+      if (!graphite_legal_transform (scop))
+	fatal_error ("the graphite file read for scop %d does not contain a legal transform",
+		     (int) file_scop_number);
+
       file_scop_number++;
     }