c++: Propagate TREE_ADDRESSABLE in fixup_type_variants [PR115062]
This has caused issues with modules when an import fills in the
definition of a type already created with a typedef.
PR c++/115062
gcc/cp/ChangeLog:
* class.cc (fixup_type_variants): Propagate TREE_ADDRESSABLE.
(finish_struct_bits): Cleanup now that TREE_ADDRESSABLE is
propagated by fixup_type_variants.
gcc/testsuite/ChangeLog:
* g++.dg/modules/pr115062_a.H: New test.
* g++.dg/modules/pr115062_b.H: New test.
* g++.dg/modules/pr115062_c.C: New test.
Signed-off-by:
Nathaniel Shead <nathanieloshead@gmail.com>
Showing
- gcc/cp/class.cc 14 additions, 17 deletionsgcc/cp/class.cc
- gcc/testsuite/g++.dg/modules/pr115062_a.H 6 additions, 0 deletionsgcc/testsuite/g++.dg/modules/pr115062_a.H
- gcc/testsuite/g++.dg/modules/pr115062_b.H 14 additions, 0 deletionsgcc/testsuite/g++.dg/modules/pr115062_b.H
- gcc/testsuite/g++.dg/modules/pr115062_c.C 9 additions, 0 deletionsgcc/testsuite/g++.dg/modules/pr115062_c.C
Loading
Please register or sign in to comment