Fix PR target/103465

Message ID 4369935.LvFx2qVVIh@fomalhaut
State Committed
Commit 8234b0dcb2484f836d0fb8f12aa6b04f5e66db6f
Headers
Series Fix PR target/103465 |

Commit Message

Eric Botcazou Jan. 10, 2022, 9:19 a.m. UTC
  Hi,

this PR uncovered that -freorder-blocks-and-partition was working by accident 
on 64-bit Windows, i.e. the middle-end was supposed to disable it with SEH.
After Martin's change, the middle-end properly disables it now, which is too 
bad since a significant amount of work went into its implementation for SEH.

Tested on x86-64/Windows, OK for all active branches?


2022-01-10  Eric Botcazou  <ebotcazou@adacore.com>

	PR target/103465
	* coretypes.h (unwind_info_type): Swap UI_SEH and UI_TARGET.
  

Comments

Richard Biener Jan. 10, 2022, 11:23 a.m. UTC | #1
On Mon, Jan 10, 2022 at 10:19 AM Eric Botcazou via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> Hi,
>
> this PR uncovered that -freorder-blocks-and-partition was working by accident
> on 64-bit Windows, i.e. the middle-end was supposed to disable it with SEH.
> After Martin's change, the middle-end properly disables it now, which is too
> bad since a significant amount of work went into its implementation for SEH.
>
> Tested on x86-64/Windows, OK for all active branches?

OK.

Richard.

>
> 2022-01-10  Eric Botcazou  <ebotcazou@adacore.com>
>
>         PR target/103465
>         * coretypes.h (unwind_info_type): Swap UI_SEH and UI_TARGET.
>
> --
> Eric Botcazou
  

Patch

diff --git a/gcc/coretypes.h b/gcc/coretypes.h
index 5d0fc1d915d..506cd334401 100644
--- a/gcc/coretypes.h
+++ b/gcc/coretypes.h
@@ -228,15 +228,17 @@  enum stack_protector {
   SPCT_FLAG_EXPLICIT = 4
 };
 
-/* Types of unwind/exception handling info that can be generated.  */
+/* Types of unwind/exception handling info that can be generated.
+   Note that a UI_TARGET (or larger) setting is considered to be
+   incompatible with -freorder-blocks-and-partition.  */
 
 enum unwind_info_type
 {
   UI_NONE,
   UI_SJLJ,
   UI_DWARF2,
-  UI_TARGET,
-  UI_SEH
+  UI_SEH,
+  UI_TARGET
 };
 
 /* Callgraph node profile representation.  */