From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CD3AB3860017; Sun, 24 May 2020 01:33:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CD3AB3860017 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1590283989; bh=AvL3kn0ygCWfSYcYtkNXOGXNm9MZ515hlZcCvy9Gwgk=; h=From:To:Subject:Date:From; b=B79dGdmRsZuPyVbOyBal4aJ6oS5pFsg6Wk/Doa1H/P18n2Xvb1bPep4+bf46X3C60 6F9z4VIkAumgkiNlsJ48K8BBxlmb9tLOV2XxQeRu0GjyoS+2/4V0A6R9C1u5ZMbZRi R6u1Qt/O9rY4uBiEwaFiinyjS0QQHmXMHn3NG+Ww= From: "bouanto at zoho dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug jit/95296] New: Segfault when trying to return a void value Date: Sun, 24 May 2020 01:33:08 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: jit X-Bugzilla-Version: 10.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: bouanto at zoho dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: dmalcolm at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: 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: Sun, 24 May 2020 01:33:10 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95296 Bug ID: 95296 Summary: Segfault when trying to return a void value Product: gcc Version: 10.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: jit Assignee: dmalcolm at gcc dot gnu.org Reporter: bouanto at zoho dot com Target Milestone: --- Created attachment 48589 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D48589&action=3Dedit Complete example reproducing the segfault Hi. When trying to return a void value this way, this makes the code segfault: gcc_jit_type *void_type =3D gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_VOID); gcc_jit_lvalue *return_value =3D gcc_jit_function_new_local(func, NULL, void_type, "void"); gcc_jit_block_end_with_return (block, NULL, gcc_jit_lvalue_as_rvalue(return_value)); Could you please fix it so that it shows an error instead of segfaulting? Thanks.=