aboutsummaryrefslogtreecommitdiff
path: root/gcc/c/c-parser.cc
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2025-03-11 17:56:18 +0100
committerIain Buclaw <ibuclaw@gdcproject.org>2025-03-11 18:19:51 +0100
commit81582ca6cb692098c1bda7995aec46c6cbfbfcb3 (patch)
tree7e6eaec54409b5071e2e7db7dce5849cd8080838 /gcc/c/c-parser.cc
parentb3becb17b82cb3ffdb19b0301031b22a486501b0 (diff)
downloadgcc-81582ca6cb692098c1bda7995aec46c6cbfbfcb3.zip
gcc-81582ca6cb692098c1bda7995aec46c6cbfbfcb3.tar.gz
gcc-81582ca6cb692098c1bda7995aec46c6cbfbfcb3.tar.bz2
d: Fix regression returning from function with invariants [PR119139]
An optimization was added in GDC-12 which sets the TREE_READONLY flag on all local variables with the storage class `const' assigned. For some reason, const is also being added by the front-end to `__result' variables in non-virtual functions, which ends up getting wrong code by the gimplify pass promoting the local to static storage. A bug has been raised upstream, as this looks like an error in the AST. For now, turn off setting TREE_READONLY on all result variables. PR d/119139 gcc/d/ChangeLog: * decl.cc (get_symbol_decl): Don't set TREE_READONLY for __result declarations. gcc/testsuite/ChangeLog: * gdc.dg/pr119139.d: New test.
Diffstat (limited to 'gcc/c/c-parser.cc')
0 files changed, 0 insertions, 0 deletions