[PATCH][Revised3] Fix PR41313 with dual approach

Mike Stump mrs@apple.com
Thu Oct 8 21:12:00 GMT 2009


On Oct 8, 2009, at 12:59 PM, Jack Howarth wrote:
> So you don't want to omit the unwind labels on 10.6, correct?

Right, for now.

> So reduced patch would look something like...
>
> Index: gcc/config/darwin.c
> ===================================================================
> --- gcc/config/darwin.c (revision 152573)
> +++ gcc/config/darwin.c (working copy)
> @@ -1697,6 +1697,16 @@
>   if (dwarf_strict < 0)
>     dwarf_strict = 1;
>
> +  /* Disable -freorder-blocks-and-partition for exception handling  
> or when
> +     the target requested unwind info.  */
> +  if (flag_reorder_blocks_and_partition && (flag_exceptions ||  
> flag_unwind_tables))
> +    {
> +      inform (input_location,
> +              "-freorder-blocks-and-partition does not work with  
> exceptions on this architecture");
> +      flag_reorder_blocks_and_partition = 0;
> +      flag_reorder_blocks = 1;
> +    }
> +
>   if (flag_mkernel || flag_apple_kext)
>     {
>       /* -mkernel implies -fapple-kext for C++ */
>

This is a good first step.  Ok to check that in while we discuss the  
other problem.

> If we just ignore the failures in gcc.dg/tree- prof/bb-reorg.c and  
> gcc.dg/tree-prof/pr34999.c

I'd be nice to understand just why those fail.  I've not seen a good  
enough description to know.  The worst case fix would be to do this:

> +  if (flag_reorder_blocks_and_partition && (1 || flag_exceptions ||  
> flag_unwind_tables))

until the conditions under which the failure happens is understood.   
Not ideal, but better than failing.



More information about the Gcc-patches mailing list