This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug jit/64722] On 2nd time libgccjit is run in-process on i686, generated code clobbers %ebx register
- From: "dmalcolm at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 22 Jan 2015 11:33:52 +0000
- Subject: [Bug jit/64722] On 2nd time libgccjit is run in-process on i686, generated code clobbers %ebx register
- Auto-submitted: auto-generated
- References: <bug-64722-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64722
--- Comment #2 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Indeed, adding this to toplev.c fixes the issue:
@@ -2166,7 +2169,8 @@ toplev::finalize (void)
{
rtl_initialized = false;
this_target_rtl->target_specific_initialized = false;
+ this_target_rtl->x_pic_offset_table_rtx = NULL;
/* Needs to be called before cgraph_c_finalize since it uses symtab. */
ipa_reference_c_finalize ();
fixes the issue; 5 iterations of test-hello-world.c run to completion.