From 74a6366d23c21709744b8f5cd91043a742571b09 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Fri, 3 Nov 2017 11:14:23 -0600 Subject: [PATCH] i386.c (ix86_expand_prologue): Tighten assert for int_registers_saved. * config/i386/i386.c (ix86_expand_prologue): Tighten assert for int_registers_saved. From-SVN: r254386 --- gcc/ChangeLog | 3 +++ gcc/config/i386/i386.c | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 949f3cb5a6f..9082b8529c7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -6,6 +6,9 @@ 2017-11-03 Jeff Law + * config/i386/i386.c (ix86_expand_prologue): Tighten assert + for int_registers_saved. + * cfganal.c (single_pred_edge_ignoring_loop_edges): New function extracted from tree-ssa-dom.c. * cfganal.h (single_pred_edge_ignoring_loop_edges): Prototype. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 1cf1e2b27a6..25b28a1a088 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -13167,8 +13167,12 @@ ix86_expand_prologue (void) && (flag_stack_check == STATIC_BUILTIN_STACK_CHECK || flag_stack_clash_protection)) { - /* We expect the GP registers to be saved when probes are used. */ - gcc_assert (int_registers_saved); + /* This assert wants to verify that integer registers were saved + prior to probing. This is necessary when probing may be implemented + as a function call (Windows). It is not necessary for stack clash + protection probing. */ + if (!flag_stack_clash_protection) + gcc_assert (int_registers_saved); if (flag_stack_clash_protection) { -- 2.30.2