This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/63534] [5 Regression] Bootstrap failure on x86_64/i686-linux
- From: "evstupac at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 14 Oct 2014 13:20:28 +0000
- Subject: [Bug target/63534] [5 Regression] Bootstrap failure on x86_64/i686-linux
- Auto-submitted: auto-generated
- References: <bug-63534-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63534
Stupachenko Evgeny <evstupac at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |evstupac at gmail dot com
--- Comment #2 from Stupachenko Evgeny <evstupac at gmail dot com> ---
Before the changes there were potential bug as morestack call was emitted with
dependency on ebx (which was not set):
(call_insn 28 27 29 3 (call (mem:QI (symbol_ref:SI ("__morestack")) [0 S1 A8])
(const_int 4 [0x4])) ../../../../gcc/libgo/runtime/go-assert.c:15 -1
(nil)
(expr_list (use (reg:SI 3 bx))
(nil)))
Treating morestack as SYMBOL_FLAG_LOCAL resolves the issue.
The following patch should fix go bootstrap:
(bootstaped with --enable-languages=c,c++,fortran,lto,go)
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index a3ca2ed..6235c4f 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -11999,7 +11999,10 @@ ix86_expand_split_stack_prologue (void)
REG_BR_PROB_BASE - REG_BR_PROB_BASE / 100);
if (split_stack_fn == NULL_RTX)
- split_stack_fn = gen_rtx_SYMBOL_REF (Pmode, "__morestack");
+ {
+ split_stack_fn = gen_rtx_SYMBOL_REF (Pmode, "__morestack");
+ SYMBOL_REF_FLAGS (split_stack_fn) |= SYMBOL_FLAG_LOCAL;
+ }
fn = split_stack_fn;
/* Get more stack space. We pass in the desired stack space and the
@@ -12044,9 +12047,11 @@ ix86_expand_split_stack_prologue (void)
gcc_assert ((args_size & 0xffffffff) == args_size);
if (split_stack_fn_large == NULL_RTX)
- split_stack_fn_large =
- gen_rtx_SYMBOL_REF (Pmode, "__morestack_large_model");
-
+ {
+ split_stack_fn_large =
+ gen_rtx_SYMBOL_REF (Pmode, "__morestack_large_model");
+ SYMBOL_REF_FLAGS (split_stack_fn_large) |= SYMBOL_FLAG_LOCAL;
+ }
if (ix86_cmodel == CM_LARGE_PIC)
{
rtx_code_label *label;