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]

obvious fix applied to stop ICE when doing debugging dumps for sh64-elf



The change in September to open_dump_file that makes it abort when another
file is already open - rather than closing it - revealed a problem in the
code that calls rest_of_handle_branch_target_load_optimize: the flow2
dump file is open, while the branch target load optimization pass opens
its own dump file.  This now causes the sh64-elf compiler to abort when doing
debugging dumps at -O2 or higher.

Fix commited as obvious.

2005-01-20  J"orn Rennecke <joern.rennecke@st.com>

	* passes.c (rest_of_handle_flow2): Close / open the flow2 dump file
	around the call to rest_of_handle_branch_target_load_optimize.

Index: passes.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/passes.c,v
retrieving revision 2.60
diff -p -r2.60 passes.c
*** passes.c	14 Dec 2004 01:30:31 -0000	2.60
--- passes.c	20 Jan 2005 19:09:46 -0000
*************** rest_of_handle_flow2 (void)
*** 1350,1356 ****
      split_all_insns (0);
  
    if (flag_branch_target_load_optimize)
!     rest_of_handle_branch_target_load_optimize ();
  
    if (optimize)
      cleanup_cfg (CLEANUP_EXPENSIVE);
--- 1366,1376 ----
      split_all_insns (0);
  
    if (flag_branch_target_load_optimize)
!     {
!       close_dump_file (DFI_flow2, print_rtl_with_bb, get_insns ());
!       rest_of_handle_branch_target_load_optimize ();
!       open_dump_file (DFI_flow2, current_function_decl);
!     }
  
    if (optimize)
      cleanup_cfg (CLEANUP_EXPENSIVE);

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