From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 997CC386180E; Wed, 28 Jul 2021 23:33:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 997CC386180E From: "mhjacobson at me dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug objc/101666] Objective-C frontend crashes with `-fobjc-nilcheck` Date: Wed, 28 Jul 2021 23:33:51 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: objc X-Bugzilla-Version: 10.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mhjacobson at me dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jul 2021 23:33:51 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101666 --- Comment #1 from Matt Jacobson --- I'm not an expert on GCC ASTs, but would this change be correct here? I'm trying to simulate something like `struct whatever ftree[8 * 3] =3D {0};`. diff --git a/gcc/objc/objc-next-runtime-abi-02.c b/gcc/objc/objc-next-runtime-abi-02.c index e401906ed..0cc19a079 100644 --- a/gcc/objc/objc-next-runtime-abi-02.c +++ b/gcc/objc/objc-next-runtime-abi-02.c @@ -1631,9 +1631,8 @@ build_v2_build_objc_method_call (int super_flag, tree method_prototype, || TREE_CODE (ret_type) =3D=3D UNION_TYPE) { vec *rtt =3D NULL; - /* ??? CHECKME. hmmm..... think we need something more - here. */ - CONSTRUCTOR_APPEND_ELT (rtt, NULL_TREE, NULL_TREE); + CONSTRUCTOR_APPEND_ELT (rtt, NULL_TREE, build_int_cst (integer_type_node, + 0)); ftree =3D objc_build_constructor (ret_type, rtt); } else=