https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88368
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- #include <type_traits> #include <utility> template<class T> union trivial_helper { T t; }; template <typename T> struct trait { static constexpr bool value = std::is_copy_constructible<trivial_helper<T>>::value; }; struct BlockFrequencyInfoImplBase { struct BlockNode { int Index = 1; BlockNode() = default; }; static constexpr bool v = trait<std::pair<BlockNode, int>>::value; // << remove this line to remove the error void print() const { BlockNode BB; } }; Testcase included inline. Used to be rejected e.g. in r210000, from r216750 and before r250994 used to be rejected with a different error.