From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id ED8443893657; Wed, 17 Feb 2021 08:18:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ED8443893657 From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug jit/99126] Compilation ICE trying insert trap Date: Wed, 17 Feb 2021 08:18:17 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: jit X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin at gcc dot gnu.org X-Bugzilla-Status: NEW 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: cf_reconfirmed_on bug_status everconfirmed cc 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, 17 Feb 2021 08:18:18 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99126 Martin Li=C5=A1ka changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2021-02-17 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 CC| |marxin at gcc dot gnu.org --- Comment #2 from Martin Li=C5=A1ka --- Thanks for the report. > This is my understanding of what is going on here: we have a some > generated code that in GIMPLE is proved to dereference a null pointer > (BTW this code should be unreachable). That's fine. >=20 > MEM[(struct comp_Lisp_Cons *)0B].u.s.car =3D _35; >=20 So I guess JIT should really initialize the builtins. I tried manually calling: gcc_jit_context_get_builtin_function (ctxt_0x8892590, "__builtin_trap"); and then your reproducer is fine. Leaving to David.=