From a2f4b4b76cdd0a4150e82e69fae4a70c54b523d2 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Fri, 10 Dec 2021 09:28:48 -0500 Subject: 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 --- gcc/jit/jit-playback.c | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/jit/jit-playback.c') 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) { -- cgit v1.1