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

login
register
mail settings
Submitter Sebastian Pop
Date Sept. 9, 2010, 7:30 p.m.
Message ID <1284060606-26216-3-git-send-email-sebpop@gmail.com>
Download mbox | patch
Permalink /patch/64324/
State New
Headers show

Comments

Sebastian Pop - Sept. 9, 2010, 7:30 p.m.
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.
---
 gcc/ChangeLog.graphite |    5 +++++
 gcc/graphite-poly.c    |    6 +++++-
 2 files changed, 10 insertions(+), 1 deletions(-)

Patch

diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite
index 3cc99df..46dd03b 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 a648b45..4220c05 100644
--- a/gcc/graphite-poly.c
+++ b/gcc/graphite-poly.c
@@ -752,7 +752,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++;
     }