aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/iresolve.c
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2020-05-27 09:44:07 -0400
committerDavid Malcolm <dmalcolm@redhat.com>2020-05-27 14:26:08 -0400
commitc98bd673ef93836f03491201f1c63929ea429cd6 (patch)
tree90d7eb25aa472f26263211afd48bbc5efa65bb90 /gcc/fortran/iresolve.c
parentac43b32ce2e0e38848d06a1567f6db2bbeb678dc (diff)
downloadgcc-c98bd673ef93836f03491201f1c63929ea429cd6.zip
gcc-c98bd673ef93836f03491201f1c63929ea429cd6.tar.gz
gcc-c98bd673ef93836f03491201f1c63929ea429cd6.tar.bz2
jit: use deep unsharing of trees [PR 95314]
PR jit/95314 reports a internal error inside verify_gimple, which turned out to be due to reusing the result of gcc_jit_lvalue_get_address in several functions, leading to tree nodes shared between multiple function bodies. This patch fixes the issue by adopting the "Deep unsharing" strategy described in the comment in gimplify.c preceding mostly_copy_tree_r: to mark all of the jit "frontend"'s expression tree nodes with TREE_VISITED, and to set LANG_HOOKS_DEEP_UNSHARING, so that "they are unshared on the first reference within functions when the regular unsharing algorithm runs". gcc/jit/ChangeLog: PR jit/95314 * dummy-frontend.c (LANG_HOOKS_DEEP_UNSHARING): Define to be true. * jit-playback.h (gcc::jit::playback::rvalue): Mark tree node with TREE_VISITED. gcc/testsuite/ChangeLog: PR jit/95314 * jit.dg/all-non-failing-tests.h: Add test-pr95314-rvalue-reuse.c. * jit.dg/test-pr95314-rvalue-reuse.c: New test.
Diffstat (limited to 'gcc/fortran/iresolve.c')
0 files changed, 0 insertions, 0 deletions