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]

[tree-ssa][rfc] fix some bytecode crashes


The symptom here is aborts in record_in_finally_tree.  The cause is the
same LABEL_DECL emitted twice, right in a row.  I'm somewhat surprised
this didn't cause problems elsewhere.  The patch below should be mostly
self-explanitory.

It appears to me as if the same problem can occur on mainline.  Am I
mis-reading things there?


r~


	* expr.c (build_java_jsr): Don't emit LABEL_EXPR or
	load_type_state here.

Index: expr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/expr.c,v
retrieving revision 1.147.2.23
diff -c -p -d -r1.147.2.23 expr.c
*** expr.c	6 Oct 2003 17:38:19 -0000	1.147.2.23
--- expr.c	13 Oct 2003 09:33:07 -0000
*************** build_java_jsr (int target_pc, int retur
*** 585,593 ****
    push_value (ret_label);
    flush_quick_stack ();
    java_add_stmt (build (GOTO_EXPR, void_type_node, where));
!   java_add_stmt (build (LABEL_EXPR, void_type_node, ret));
!   if (instruction_bits [return_pc] & BCODE_VERIFIED)
!     load_type_state (ret);
  }
  
  static void
--- 585,594 ----
    push_value (ret_label);
    flush_quick_stack ();
    java_add_stmt (build (GOTO_EXPR, void_type_node, where));
! 
!   /* Do not need to emit the label here.  We noted the existance of the
!      label as a jump target in note_instructions; we'll emit the label
!      for real at the beginning of the expand_byte_code loop.  */
  }
  
  static void


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