This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Add a little more checking in gimple_push_condition


In gimple_push_condition we should check to make sure that we don't
have any conditional cleanups still set if we have not pushed a condition
yet. If we do, we know we are going to create wrong code already.
This does change any code generation or even add more ICEs that I know
of, we might get an ICE earlier than we did before.


OK? Bootstrapped and tested on powerpc-darwin with no regressions.

Thanks,
Andrew Pinski

ChangeLog:
	* gimplify.c (gimple_push_condition): Make sure that we don't
	have any saved condition cleanup if we were at the top level.

Patch:
Index: gimplify.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/gimplify.c,v
retrieving revision 2.82
diff -u -p -r2.82 gimplify.c
--- gimplify.c	30 Sep 2004 01:22:05 -0000	2.82
+++ gimplify.c	9 Oct 2004 19:10:48 -0000
@@ -191,6 +191,10 @@ gimple_conditional_context (void)
 static void
 gimple_push_condition (void)
 {
+#ifdef ENABLE_CHECKING
+  if (gimplify_ctxp->conditions == 0)
+    gcc_assert (!gimplify_ctxp->conditional_cleanups);
+#endif
   ++(gimplify_ctxp->conditions);
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]