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: Sun, 21 Jan 2024 16:00:17 -0700	[thread overview]
Message-ID: <01050c0b-bfd1-4ba9-9f8d-505476e0393b@gmail.com> (raw)
In-Reply-To: <20240116165608.8599-1-mikpelinux@gmail.com>



On 1/16/24 09:55, Mikael Pettersson wrote:
> On Thu, 4 Jan 2024 14:39:23 -0700, Jeff Law wrote:
>> 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.
> 
> Updated as requested, and bootstrapped and tested on
> {x86_64,aarch64,m68k}-linux-gnu without regressions.
> 
> gcc/
> 
> 2024-01-16  Thorsten Otto  <admin@tho-otto.de>
>              Mikael Pettersson  <mikpelinux@gmail.com>
> 
> 	PR target/82420
> 	PR target/111279
> 	* calls.cc (emit_library_call_value_1): Pass valid TYPE
> 	to emit_push_insn.
> 	* expr.cc (emit_push_insn): Likewise.
> 
> gcc/teststuite/
> 
> 2024-01-16  Mikael Pettersson  <mikpelinux@gmail.com>
> 
> 	PR target/82420
> 	* gcc.target/m68k/pr82420.c: New test.
I made minor adjustments to the commit message and pushed this to the trunk.

jeff

      parent reply	other threads:[~2024-01-21 23:00 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
2024-01-16 16:55   ` Mikael Pettersson
2024-01-16 16:55     ` Mikael Pettersson
2024-01-21 23:00     ` Jeff Law [this message]

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=01050c0b-bfd1-4ba9-9f8d-505476e0393b@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).