public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Sandra Loosemore <sandra@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-6693] middle-end: move initialization of stack_limit_rtx [PR103163] Date: Tue, 18 Jan 2022 17:29:11 +0000 (GMT) [thread overview] Message-ID: <20220118172911.36CA1385803B@sourceware.org> (raw) https://gcc.gnu.org/g:3a0837b8fb96f50f2e60222ce289cc2542bbb477 commit r12-6693-g3a0837b8fb96f50f2e60222ce289cc2542bbb477 Author: Sandra Loosemore <sandra@codesourcery.com> Date: Tue Jan 18 09:27:36 2022 -0800 middle-end: move initialization of stack_limit_rtx [PR103163] stack_limit_rtx was being initialized before init_reg_modes_target (), resulting in the REG expression being created incorrectly and an ICE later in compilation. 2022-01-18 Sandra Loosemore <sandra@codesourcery.com> PR middle-end/103163 gcc/ * emit-rtl.cc (init_emit_regs): Initialize stack_limit_rtx here... (init_emit_once): ...not here. Diff: --- gcc/emit-rtl.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gcc/emit-rtl.cc b/gcc/emit-rtl.cc index 079e563dcf3..3260ca8c3fa 100644 --- a/gcc/emit-rtl.cc +++ b/gcc/emit-rtl.cc @@ -6097,6 +6097,13 @@ init_emit_regs (void) if ((unsigned) PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM) pic_offset_table_rtx = gen_raw_REG (Pmode, PIC_OFFSET_TABLE_REGNUM); + /* Process stack-limiting command-line options. */ + if (opt_fstack_limit_symbol_arg != NULL) + stack_limit_rtx + = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (opt_fstack_limit_symbol_arg)); + if (opt_fstack_limit_register_no >= 0) + stack_limit_rtx = gen_rtx_REG (Pmode, opt_fstack_limit_register_no); + for (i = 0; i < (int) MAX_MACHINE_MODE; i++) { mode = (machine_mode) i; @@ -6177,13 +6184,6 @@ init_emit_once (void) /* Create the unique rtx's for certain rtx codes and operand values. */ - /* Process stack-limiting command-line options. */ - if (opt_fstack_limit_symbol_arg != NULL) - stack_limit_rtx - = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (opt_fstack_limit_symbol_arg)); - if (opt_fstack_limit_register_no >= 0) - stack_limit_rtx = gen_rtx_REG (Pmode, opt_fstack_limit_register_no); - /* Don't use gen_rtx_CONST_INT here since gen_rtx_CONST_INT in this case tries to use these variables. */ for (i = - MAX_SAVED_CONST_INT; i <= MAX_SAVED_CONST_INT; i++)
reply other threads:[~2022-01-18 17:29 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220118172911.36CA1385803B@sourceware.org \ --to=sandra@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).