]> git.ipfire.org Git - thirdparty/gcc.git/commit
jit: set DECL_CONTEXT of RESULT_DECL [PR103562]
authorDavid Malcolm <dmalcolm@redhat.com>
Fri, 10 Dec 2021 14:28:48 +0000 (09:28 -0500)
committerDavid Malcolm <dmalcolm@redhat.com>
Fri, 10 Dec 2021 22:51:24 +0000 (17:51 -0500)
commita2f4b4b76cdd0a4150e82e69fae4a70c54b523d2
tree0a5ba1d8d2be853797d6eb330d69e7fae5507499
parent1e2eee7b29ed2afbc7edea6f3da7e6c8f70b1a4e
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>
gcc/jit/jit-playback.c
gcc/testsuite/jit.dg/all-non-failing-tests.h
gcc/testsuite/jit.dg/test-pr103562.c [new file with mode: 0644]