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

c++: std::variant slow to compile [PR109678]

Here, when dealing with a class with a complex subobject structure, we would
try and fail to find the relevant FIELD_DECL for an empty base before giving
up.  And we would do this at each level, in a combinatorially problematic
way.  Instead, we should check for an empty base first.

	PR c++/109678

gcc/cp/ChangeLog:

	* constexpr.cc (cxx_fold_indirect_ref_1): Handle empty base first.

gcc/testsuite/ChangeLog:

	* g++.dg/cpp1z/variant1.C: New test.
parent db6c4ba9
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