http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56858



--- Comment #2 from Steven Bosscher <steven at gcc dot gnu.org> 2013-04-06 
21:55:57 UTC ---

Proposed fix:



Index: config/alpha/alpha.c

===================================================================

--- config/alpha/alpha.c        (revision 197532)

+++ config/alpha/alpha.c        (working copy)

@@ -8568,11 +8568,10 @@ static void

 alpha_handle_trap_shadows (void)

 {

   struct shadow_summary shadow;

-  int trap_pending, exception_nesting;

+  int trap_pending;

   rtx i, n;



   trap_pending = 0;

-  exception_nesting = 0;

   shadow.used.i = 0;

   shadow.used.fp = 0;

   shadow.used.mem = 0;

@@ -8582,25 +8581,9 @@ alpha_handle_trap_shadows (void)

     {

       if (NOTE_P (i))

        {

-         switch (NOTE_KIND (i))

-           {

-           case NOTE_INSN_EH_REGION_BEG:

-             exception_nesting++;

-             if (trap_pending)

-               goto close_shadow;

-             break;

-

-           case NOTE_INSN_EH_REGION_END:

-             exception_nesting--;

-             if (trap_pending)

-               goto close_shadow;

-             break;

-

-           case NOTE_INSN_EPILOGUE_BEG:

-             if (trap_pending && alpha_tp >= ALPHA_TP_FUNC)

-               goto close_shadow;

-             break;

-           }

+         if (NOTE_KIND (i) == NOTE_INSN_EPILOGUE_BEG

+             && trap_pending && alpha_tp >= ALPHA_TP_FUNC)

+           goto close_shadow;

        }

       else if (trap_pending)

        {

@@ -8683,7 +8666,7 @@ alpha_handle_trap_shadows (void)

            }

        }



-      if ((exception_nesting > 0 || alpha_tp >= ALPHA_TP_FUNC)

+      if (alpha_tp >= ALPHA_TP_FUNC

          && NONJUMP_INSN_P (i)

          && GET_CODE (PATTERN (i)) != USE

          && GET_CODE (PATTERN (i)) != CLOBBER





I can't test this because I have no access to alpha hardware.

Reply via email to