PATCH: use gcc_assert, gcc_unreachable in java frontend
Andreas Tobler
toa@pop.agri.ch
Sat Feb 4 00:05:00 GMT 2006
Ben Elliston wrote:
> While debugging the Java frontend, I discovered that it had not been
> converted to use gcc_assert() and gcc_unreachable().
>
> Tested on powerpc-linux with a full bootstrap and no regressions when
> running make check-target-libjava run. Okay for the trunk?
Disable-checking.....
Is this ok ?
2006-02-04 Andreas Tobler <a.tobler@schweiz.ch>
* expr.c (java_stack_swap): Revert gcc_assert patch
Index: expr.c
===================================================================
--- expr.c (revision 110565)
+++ expr.c (working copy)
@@ -629,12 +629,14 @@
tree temp;
tree decl1, decl2;
+ if (stack_pointer < 2
+ || (type1 = stack_type_map[stack_pointer - 1]) == TYPE_UNKNOWN
+ || (type2 = stack_type_map[stack_pointer - 2]) == TYPE_UNKNOWN
+ || type1 == TYPE_SECOND || type2 == TYPE_SECOND
+ || TYPE_IS_WIDE (type1) || TYPE_IS_WIDE (type2))
+ /* Bad stack swap. */
+ abort ();
/* Bad stack swap. */
- gcc_assert (stack_pointer >= 2
- && (type1 = stack_type_map[stack_pointer - 1]) != TYPE_UNKNOWN
- && (type2 = stack_type_map[stack_pointer - 2]) != TYPE_UNKNOWN
- && (type1 != TYPE_SECOND && type2 != TYPE_SECOND)
- && (! TYPE_IS_WIDE (type1) && ! TYPE_IS_WIDE (type2)));
flush_quick_stack ();
decl1 = find_stack_slot (stack_pointer - 1, type1);
More information about the Java
mailing list