public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/106966] alpha cross build crashes gcc-12 "internal compiler error: in emit_move_insn"
Date: Tue, 20 Sep 2022 07:19:49 +0000	[thread overview]
Message-ID: <bug-106966-4-rqO1os30uo@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-106966-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106966

--- Comment #4 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Christian Ehrhardt from comment #3)
> > Just drop -mbuild-constants.
> 
> Thanks for the hint Uroš, but I'm not sure if one can do that, this option
> is from [1]. I do not have the background on this, but it reads as there was
> a reason "Use -mbuild-constants to prevent the compiler using static data"
> to set this which seems more breaking than my current workaround (reduce -O2
> to -O1).
> 
> [1]:
> https://github.com/qemu/qemu-palcode/commit/
> 0830e72f0bce29bdf1de0d67ad503a9a8b99c968

-mbuild-constants is used here together with -msmall-data (which limits
relocations to the small data area to 16 bits). -mbuild-constants option tries
harder to construct 64-bit constants using arithmetic with immediates instead
of loads from the small data area. So, if the linker does not error out with
relocation overflow, it can be safely omitted.

The fix to the compiler is relatively straightforward, but I have no access to
alpha system any more to properly test the fix (and I have no patience to run
the testsuite on the simulator). The -mbuild-constant option is rarely used,
and the proposed workaround should be safe.

  parent reply	other threads:[~2022-09-20  7:19 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-19 10:56 [Bug c/106966] New: " christian.ehrhardt at canonical dot com
2022-09-19 11:11 ` [Bug c/106966] " christian.ehrhardt at canonical dot com
2022-09-19 13:49 ` [Bug target/106966] " ubizjak at gmail dot com
2022-09-19 14:15 ` christian.ehrhardt at canonical dot com
2022-09-20  7:19 ` ubizjak at gmail dot com [this message]
2022-09-22  6:30 ` christian.ehrhardt at canonical dot com
2022-09-23  8:20 ` ubizjak at gmail dot com
2023-07-08 12:11 ` ubizjak at gmail dot com
2023-07-08 13:47 ` ubizjak at gmail dot com
2023-07-08 13:50 ` [Bug target/106966] [12/13/14 Regression] " ubizjak at gmail dot com
2023-07-10  3:58 ` matoro_gcc_bugzilla at matoro dot tk
2023-07-10  6:32 ` ubizjak at gmail dot com
2023-07-10 14:41 ` matoro_gcc_bugzilla at matoro dot tk
2023-07-10 15:05 ` doko at gcc dot gnu.org
2023-07-13 13:19 ` doko at gcc dot gnu.org
2023-07-13 16:32 ` cvs-commit at gcc dot gnu.org
2023-07-13 16:34 ` cvs-commit at gcc dot gnu.org
2023-07-13 16:34 ` cvs-commit at gcc dot gnu.org
2023-07-13 16:37 ` ubizjak at gmail dot com

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=bug-106966-4-rqO1os30uo@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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: link
Be 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).