[Bug jit/95314] Sharing a local reference to a global variable in multiple functions results in location references block not in block tree

2020-05-27 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95314 David Malcolm changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug jit/95314] Sharing a local reference to a global variable in multiple functions results in location references block not in block tree

2020-05-27 Thread cvs-commit at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95314 --- Comment #11 from CVS Commits --- The master branch has been updated by David Malcolm : https://gcc.gnu.org/g:c98bd673ef93836f03491201f1c63929ea429cd6 commit r11-668-gc98bd673ef93836f03491201f1c63929ea429cd6 Author: David Malcolm Date: We

[Bug jit/95314] Sharing a local reference to a global variable in multiple functions results in location references block not in block tree

2020-05-27 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95314 David Malcolm changed: What|Removed |Added Ever confirmed|0 |1 Status|UNCONFIRMED

[Bug jit/95314] Sharing a local reference to a global variable in multiple functions results in location references block not in block tree

2020-05-27 Thread bouanto at zoho dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95314 --- Comment #9 from bouanto at zoho dot com --- Actually, it seems I was wrong on the conditions to reproduce this issue. I managed to create a small example to reproduce the issue. I attached it to the bug report.

[Bug jit/95314] Sharing a local reference to a global variable in multiple functions results in location references block not in block tree

2020-05-27 Thread bouanto at zoho dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95314 --- Comment #8 from bouanto at zoho dot com --- Created attachment 48617 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48617&action=edit Small example to reproduce the bug

[Bug jit/95314] Sharing a local reference to a global variable in multiple functions results in location references block not in block tree

2020-05-27 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95314 --- Comment #7 from David Malcolm --- Created attachment 48615 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48615&action=edit Non-reproducing attempt at a reproducer I attempted to reproduce this, but was unsuccessful. I'm attaching wha

[Bug jit/95314] Sharing a local reference to a global variable in multiple functions results in location references block not in block tree

2020-05-25 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95314 --- Comment #6 from David Malcolm --- Sorry about that; thanks for trying. I think I can figure out a reproducer, and will try tomorrow.

[Bug jit/95314] Sharing a local reference to a global variable in multiple functions results in location references block not in block tree

2020-05-25 Thread bouanto at zoho dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95314 --- Comment #5 from bouanto at zoho dot com --- The reproducer generates a file where the function create_code only contains this: /* Replay of API calls for ctxt_0x7f8079128680. */ So, no code is actually generated and thus, does not reprodu

[Bug jit/95314] Sharing a local reference to a global variable in multiple functions results in location references block not in block tree

2020-05-25 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95314 --- Comment #4 from Jakub Jelinek --- unshare_expr can handle that.

[Bug jit/95314] Sharing a local reference to a global variable in multiple functions results in location references block not in block tree

2020-05-25 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95314 --- Comment #3 from David Malcolm --- Thanks Jakub, that sounds like the problem: I'm creating a tree per playback::rvalue (m_inner), and I need to unshare them.

[Bug jit/95314] Sharing a local reference to a global variable in multiple functions results in location references block not in block tree

2020-05-25 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95314 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #2

[Bug jit/95314] Sharing a local reference to a global variable in multiple functions results in location references block not in block tree

2020-05-25 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95314 --- Comment #1 from David Malcolm --- Thanks for reporting it; this sounds like a bug. Please can you use attach a reproducer (e.g. using gcc_jit_context_dump_reproducer_to_file). Looking at the backtrace, it looks like a bad interaction with i