c+: -Wabi false positive [PR120012]

The warning compares the position of a field depending on whether or not the
previous base/field is considered a POD for layout, but failed to consider
whether the previous base/field is empty; layout of an empty base doesn't
consider PODness.

	PR c++/120012

gcc/cp/ChangeLog:

	* class.cc (check_non_pod_aggregate): Check is_empty_class.

gcc/testsuite/ChangeLog:

	* g++.dg/abi/base-defaulted2.C: New test.

(cherry picked from commit b4b4dfbd22e06877052bd4cc4b191d9d138155cf)
2 files changed