This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: PATCH: use gcc_assert, gcc_unreachable in java frontend
- From: Andreas Tobler <toa at pop dot agri dot ch>
- To: Ben Elliston <bje at au1 dot ibm dot com>
- Cc: java at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Sat, 04 Feb 2006 01:04:59 +0100
- Subject: Re: PATCH: use gcc_assert, gcc_unreachable in java frontend
- References: <20060203032813.GA6537@ozlabs.au.ibm.com>
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);