aboutsummaryrefslogtreecommitdiff
path: root/gcc/jit/jit-playback.c
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2021-12-10 09:28:48 -0500
committerDavid Malcolm <dmalcolm@redhat.com>2021-12-10 17:51:24 -0500
commita2f4b4b76cdd0a4150e82e69fae4a70c54b523d2 (patch)
tree0a5ba1d8d2be853797d6eb330d69e7fae5507499 /gcc/jit/jit-playback.c
parent1e2eee7b29ed2afbc7edea6f3da7e6c8f70b1a4e (diff)
downloadgcc-a2f4b4b76cdd0a4150e82e69fae4a70c54b523d2.zip
gcc-a2f4b4b76cdd0a4150e82e69fae4a70c54b523d2.tar.gz
gcc-a2f4b4b76cdd0a4150e82e69fae4a70c54b523d2.tar.bz2
jit: set DECL_CONTEXT of RESULT_DECL [PR103562]
libgccjit was failing to set the DECL_CONTEXT of function RESULT_DECLs, leading to them failing to be properly handled by the inlining machinery. Fixed thusly. gcc/jit/ChangeLog: PR jit/103562 * jit-playback.c (gcc::jit::playback::context::new_function): Set DECL_CONTEXT of the result_decl. gcc/testsuite/ChangeLog: PR jit/103562 * jit.dg/all-non-failing-tests.h: Add comment about... * jit.dg/test-pr103562.c: New test. Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Diffstat (limited to 'gcc/jit/jit-playback.c')
-rw-r--r--gcc/jit/jit-playback.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/jit/jit-playback.c b/gcc/jit/jit-playback.c
index b412eae..783a037 100644
--- a/gcc/jit/jit-playback.c
+++ b/gcc/jit/jit-playback.c
@@ -473,6 +473,7 @@ new_function (location *loc,
DECL_ARTIFICIAL (resdecl) = 1;
DECL_IGNORED_P (resdecl) = 1;
DECL_RESULT (fndecl) = resdecl;
+ DECL_CONTEXT (resdecl) = fndecl;
if (builtin_id)
{