aboutsummaryrefslogtreecommitdiff
path: root/gcc/d/expr.cc
diff options
context:
space:
mode:
authorNathaniel Shead <nathanieloshead@gmail.com>2024-02-29 22:49:13 +1100
committerNathaniel Shead <nathanieloshead@gmail.com>2024-03-02 09:04:15 +1100
commit2823b4d96d9ec4ad4e67e5e8edaa1b060a467491 (patch)
tree6aa3d5d183995e298f09bfae54c20ce35daacb9a /gcc/d/expr.cc
parentb7b387e1200fd182599195979d5d21656fa8969d (diff)
downloadgcc-2823b4d96d9ec4ad4e67e5e8edaa1b060a467491.zip
gcc-2823b4d96d9ec4ad4e67e5e8edaa1b060a467491.tar.gz
gcc-2823b4d96d9ec4ad4e67e5e8edaa1b060a467491.tar.bz2
c++: Ensure DECL_CONTEXT is set for temporary vars [PR114005]
Modules streaming requires DECL_CONTEXT to be set for anything streamed. This patch ensures that 'create_temporary_var' does set a DECL_CONTEXT for these variables (such as the backing storage for initializer_lists) even if not inside a function declaration. PR c++/114005 gcc/cp/ChangeLog: * init.cc (create_temporary_var): Use current_scope instead of current_function_decl. gcc/testsuite/ChangeLog: * g++.dg/modules/pr114005_a.C: New test. * g++.dg/modules/pr114005_b.C: New test. Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
Diffstat (limited to 'gcc/d/expr.cc')
0 files changed, 0 insertions, 0 deletions