From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 04CFA3851C37; Mon, 25 May 2020 13:15:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 04CFA3851C37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1590412527; bh=k+3SXyjZfC0yb+qsJYc7Bfy6bztNKa8js3Q+VcChtRs=; h=From:To:Subject:Date:From; b=co5UXwXsxFGRgPI4gbGw1FyHAABKQ5pnkPg+p+yHpsV64ORhi6kUWtj/in49SBlmH m4dEAB546+r8af3uplQP0r9SRWJiibU212zSVdg7PHqwIrDIYq8oNBIc9m8ztlupUb aTsYz/U3Xz2tbdygugkn3umA5NcqL6cOnmOV8Gco= From: "bouanto at zoho dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug jit/95314] New: Sharing a local reference to a global variable in multiple functions results in location references block not in block tree Date: Mon, 25 May 2020 13:15:26 +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 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: Mon, 25 May 2020 13:15:27 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95314 Bug ID: 95314 Summary: Sharing a local reference to a global variable in multiple functions results in location references block not in block tree 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: --- Hi. If a create, in a function, a reference (with gcc_jit_lvalue_get_address) t= o a global and reuse this local reference in another function, it gives the following error: libgccjit.so: error: location references block not in block tree =E2=80=A6 during IPA pass: *free_lang_data libgccjit.so: error: verify_gimple failed 0x7f83924b35c9 verify_gimple_in_cfg(function*, bool) ../../gcc-10.1.0/gcc/tree-cfg.c:5462 0x7f839236a819 execute_function_todo ../../gcc-10.1.0/gcc/passes.c:1985 0x7f839236add7 do_per_function ../../gcc-10.1.0/gcc/passes.c:1647 0x7f839236b06b do_per_function ../../gcc-10.1.0/gcc/passes.c:2050 0x7f839236b06b execute_todo ../../gcc-10.1.0/gcc/passes.c:2039 I can try to make an example to reproduce this issue if needed. Is that the expected behavior or should libgccjit gives a proper error? (Recreating the reference in every function fix this issue.) Thanks.=