type2 = cp_build_qualified_type (type2, TYPE_UNQUALIFIED);
if (TREE_CODE (type1) == ENUMERAL_TYPE)
- return (tree_int_cst_equal (TYPE_SIZE (type1), TYPE_SIZE (type2))
- && same_type_p (finish_underlying_type (type1),
- finish_underlying_type (type2)));
+ return same_type_p (finish_underlying_type (type1),
+ finish_underlying_type (type2));
if (CLASS_TYPE_P (type1)
&& std_layout_type_p (type1)
- && std_layout_type_p (type2)
- && tree_int_cst_equal (TYPE_SIZE (type1), TYPE_SIZE (type2)))
+ && std_layout_type_p (type2))
{
tree field1 = TYPE_FIELDS (type1);
tree field2 = TYPE_FIELDS (type2);
struct alignas (16) C1 : public A1 {};
struct alignas (16) D1 : public B1 {};
-static_assert (!std::is_layout_compatible_v<I, J>);
+static_assert (std::is_layout_compatible_v<I, J>);
static_assert (!std::is_layout_compatible_v<K, L>);
-static_assert (!std::is_layout_compatible_v<M, N>);
+static_assert (std::is_layout_compatible_v<M, N>);
static_assert (!std::is_layout_compatible_v<O, P>);
static_assert (!std::is_layout_compatible_v<P, D>);
static_assert (std::is_layout_compatible_v<Q, R>);
static_assert (!std::is_layout_compatible_v<U, V>);
-static_assert (!std::is_layout_compatible_v<A, I>);
-static_assert (!std::is_layout_compatible_v<C, I>);
+static_assert (std::is_layout_compatible_v<A, I>);
+static_assert (std::is_layout_compatible_v<C, I>);
static_assert (!std::is_layout_compatible_v<E, F>);
static_assert (std::is_layout_compatible_v<G, H>);
static_assert (std::is_layout_compatible_v<C1, D1>);