public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH][Revised5] Fix PR41313 with dual approach
@ 2009-10-13 13:41 Jack Howarth
  2009-10-21 19:20 ` Eric Botcazou
  0 siblings, 1 reply; 2+ messages in thread
From: Jack Howarth @ 2009-10-13 13:41 UTC (permalink / raw)
  To: gcc-patches; +Cc: mrs, jakub

This revised patch restores the original behavior on Darwin before
r150553 by disabling -freorder-blocks-and-partition whenever
darwin_emit_unwind_label is in use. The patch allows darwin10 to now
use default_emit_unwind_label since eh labels are no longer needed under 10.6.
Bootstrapped and regression tested on x86_64-apple-darwin10 and 
x86_64-apple-darwin9...

http://gcc.gnu.org/ml/gcc-testresults/2009-10/msg01275.html
http://gcc.gnu.org/ml/gcc-testresults/2009-10/msg01308.html

The patch eliminates the failing for the g++.dg/tree-prof test cases
in both cases except for excessive compile errors that are harmless
which cause false failures in the test cases...

FAIL: g++.dg/tree-prof/partition1.C compilation,  -g  -fprofile-use
UNRESOLVED: g++.dg/tree-prof/partition1.C execution,    -g  -fprofile-use
FAIL: g++.dg/tree-prof/partition1.C compilation,  -O3 -g  -fprofile-use
UNRESOLVED: g++.dg/tree-prof/partition1.C execution,    -O3 -g  -fprofile-use

on x86_64-apple-darwin10. Okay for gcc trunk?
               Jack


2009-10-12  Jack Howarth  <howarth@bromo.med.uc.edu>

        PR c++/41313
        * gcc/config/darwin10.h: Use default_emit_unwind_label.
        * gcc/config/darwin.c: Disable -freorder-blocks-and-partition
        when darwin_emit_unwind_label is used.

Index: gcc/config/darwin.c
===================================================================
--- gcc/config/darwin.c	(revision 152694)
+++ gcc/config/darwin.c	(working copy)
@@ -1697,6 +1697,16 @@
   if (dwarf_strict < 0) 
     dwarf_strict = 1;
 
+  /* Disable -freorder-blocks-and-partition for darwin_emit_unwind_label.  */
+  if (flag_reorder_blocks_and_partition 
+      && (targetm.asm_out.unwind_label == darwin_emit_unwind_label))
+    {
+      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++ */
Index: gcc/config/darwin10.h
===================================================================
--- gcc/config/darwin10.h	(revision 152694)
+++ gcc/config/darwin10.h	(working copy)
@@ -23,3 +23,8 @@
 
 #undef LIB_SPEC
 #define LIB_SPEC "%{!static:-no_compact_unwind -lSystem}"
+
+/* Unwind labels are no longer required in darwin10.  */
+
+#undef TARGET_ASM_EMIT_UNWIND_LABEL
+#define TARGET_ASM_EMIT_UNWIND_LABEL default_emit_unwind_label

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH][Revised5] Fix PR41313 with dual approach
  2009-10-13 13:41 [PATCH][Revised5] Fix PR41313 with dual approach Jack Howarth
@ 2009-10-21 19:20 ` Eric Botcazou
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Botcazou @ 2009-10-21 19:20 UTC (permalink / raw)
  To: Jack Howarth; +Cc: gcc-patches, mrs, jakub

> 2009-10-12  Jack Howarth  <howarth@bromo.med.uc.edu>
>
>         PR c++/41313
>         * gcc/config/darwin10.h: Use default_emit_unwind_label.
>         * gcc/config/darwin.c: Disable -freorder-blocks-and-partition
>         when darwin_emit_unwind_label is used.

Paths in ChangeLog must be relative to the ChangeLog's directory.

-- 
Eric Botcazou

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-10-21 19:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-13 13:41 [PATCH][Revised5] Fix PR41313 with dual approach Jack Howarth
2009-10-21 19:20 ` Eric Botcazou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).