Skip to content
Snippets Groups Projects
Commit 47c3144c authored by Jason Merrill's avatar Jason Merrill
Browse files

c++: mutable temps in rodata

If the type of a temporary has mutable members, we can't set TREE_READONLY
on the VAR_DECL; this is parallel to the check in
cp_apply_type_quals_to_decl.

gcc/cp/ChangeLog:

	* tree.cc (build_target_expr): Check TYPE_HAS_MUTABLE_P.

gcc/testsuite/ChangeLog:

	* g++.dg/tree-ssa/initlist-opt6.C: New test.
parent 1d4d302a
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment