public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug objc/101666] Objective-C frontend crashes with `-fobjc-nilcheck`
Date: Wed, 18 Aug 2021 18:42:30 +0000	[thread overview]
Message-ID: <bug-101666-4-Z7U9bybqn5@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-101666-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Iain D Sandoe <iains@gcc.gnu.org>:

https://gcc.gnu.org/g:d2aa4e0b3b5053df8f5853d9ed29022ff0d3ecf6

commit r12-3006-gd2aa4e0b3b5053df8f5853d9ed29022ff0d3ecf6
Author: Iain Sandoe <iain@sandoe.co.uk>
Date:   Sat Aug 14 12:27:55 2021 +0100

    Objective-C: fix crash with -fobjc-nilcheck

    When -fobjc-nilcheck is enabled, messages that result in a struct type
should
    yield a zero-initialized struct when sent to nil.  Currently, the frontend
    crashes when it encounters this situation.  This patch fixes the crash by
    generating the tree for the `{}` initializer.

    Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
    Co-authored-by: Matt Jacobson  <mhjacobson@me.com>

            PR objc/101666

    gcc/objc/ChangeLog:

            * objc-act.c (objc_build_constructor): Handle empty constructor
            lists.
            * objc-next-runtime-abi-02.c (build_v2_objc_method_fixup_call):
            Handle nil receivers.
            (build_v2_build_objc_method_call): Likewise.

    gcc/testsuite/ChangeLog:

            * obj-c++.dg/pr101666-0.mm: New test.
            * obj-c++.dg/pr101666-1.mm: New test.
            * obj-c++.dg/pr101666.inc: New.
            * objc.dg/pr101666-0.m: New test.
            * objc.dg/pr101666-1.m: New test.
            * objc.dg/pr101666.inc: New.

  parent reply	other threads:[~2021-08-18 18:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-28 23:15 [Bug objc/101666] New: " mhjacobson at me dot com
2021-07-28 23:33 ` [Bug objc/101666] " mhjacobson at me dot com
2021-07-28 23:34 ` mhjacobson at me dot com
2021-08-14  8:16 ` mhjacobson at me dot com
2021-08-18 18:42 ` cvs-commit at gcc dot gnu.org [this message]
2021-08-22 10:48 ` iains at gcc dot gnu.org
2022-05-27  9:07 ` rguenth at gcc dot gnu.org
2022-05-29 19:13 ` cvs-commit at gcc dot gnu.org
2022-05-29 19:26 ` iains at gcc dot gnu.org
2022-06-14 22:38 ` iains at gcc dot gnu.org
2024-04-23 14:11 ` cvs-commit at gcc dot gnu.org
2024-04-23 14:19 ` iains at gcc dot gnu.org

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-101666-4-Z7U9bybqn5@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).