public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: Mikael Pettersson <mikpelinux@gmail.com>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Avoid ICE with m68k-elf -malign-int and libcalls
Date: Thu, 4 Jan 2024 14:39:23 -0700	[thread overview]
Message-ID: <7de190a0-5562-402d-9958-242c41129ad9@gmail.com> (raw)
In-Reply-To: <20240104092425.1844-2-mikpelinux@gmail.com>



On 1/4/24 02:23, Mikael Pettersson wrote:
> emit_library_call_value_1 calls emit_push_insn with NULL_TREE
> for TYPE.  Sometimes emit_push_insn needs to assign a temp with
> that TYPE, which causes a segfault.
> 
> Fixed by computing the TYPE from MODE when needed.
> 
> Original patch by Thorsten Otto.
> 
> gcc/
> 
> 2024-01-03  Thorsten Otto  <admin@tho-otto.de>
>              Mikael Pettersson  <mikpelinux@gmail.com>
> 
> 	PR target/82420
> 	PR target/111279
> 	* expr.cc (emit_push_insn): If TYPE is NULL compute it
> 	from MODE before calling assign_temp.
> 
> gcc/teststuite/
> 
> 2024-01-03  Mikael Pettersson  <mikpelinux@gmail.com>
> 
> 	PR target/82420
> 	* gcc.target/m68k/pr82420.c: New test.
This really needs to happen in the two call paths which pass in 
NULL_TREE for the type.  Note how the type is used to determine padding 
earlier in emit_push_insn.  That would also make the code more 
consistent with the comment before emit_push_insn which implies that 
both MODE and TYPE are valid.


Additionally you should bootstrap and regression test this patch on at 
least one target.

jeff

  reply	other threads:[~2024-01-04 21:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-04  9:23 Mikael Pettersson
2024-01-04 21:39 ` Jeff Law [this message]
2024-01-16 16:55   ` Mikael Pettersson
2024-01-16 16:55     ` Mikael Pettersson
2024-01-21 23:00     ` Jeff Law

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=7de190a0-5562-402d-9958-242c41129ad9@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=mikpelinux@gmail.com \
    /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).