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][LTO] Fix g++.dg/lto/20081109 with -m32


This fixes the EH testcase which fails with -fwhopr because we fail to
emit unwind information for foo.  The reason is there are no EH regions
for that translation unit so we do not initialize EH.  The fix is to
always initialize EH if flag_exceptions was enabled - this patch does it
by always emitting an (empty) eh region in this case.

I wonder if the decision to enable EH or not should be done differently,
for example by setting a bit in the cgraph header that wpa then can
distribute to all units.  Anyway, the following is certainly the
easiest workaround.

Bootstrap and regtest running.

Richard.

2009-08-27  Richard Guenther  <rguenther@suse.de>

	PR lto/41092
	* lto-streamer-out.c (output_eh_regions): Always output a
	eh region if exceptions are enabled.

Index: gcc/lto-streamer-out.c
===================================================================
*** gcc/lto-streamer-out.c	(revision 151117)
--- gcc/lto-streamer-out.c	(working copy)
*************** output_eh_regions (struct output_block *
*** 1596,1602 ****
  {
    eh_region curr;
  
!   if (fn->eh && fn->eh->region_array)
      {
        unsigned i;
  
--- 1596,1607 ----
  {
    eh_region curr;
  
!   if (fn->eh
!       /* Always output LTO_eh_table if exceptions are enabled.  Otherwise
!          we miss to emit unwind informations for a translation unit
! 	 that just throws.  */
!       && (flag_exceptions
! 	  || fn->eh->region_array))
      {
        unsigned i;
  


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