# JVA1V is derived from A1; A1 is a virtual base indirectly
# and also directly; must not report ambiguity when a JVA1V is cast to an A1.
gdb_test "print (A1)jva1v" " = {x = 1, y = 2}"
+
+# C++20 introduced a way to have ambiguous fields with the same byte offset.
+# This class explicitly tests for that.
+# if this is tested with a compiler that can't handle [[no_unique_address]]
+# the code should still correctly identify the ambiguity because of
+# different byte offsets.
+test_ambiguous "je.x" "x" "JE" {
+ "'int A1::x' (JE -> A1)"
+ "'empty A4::x' (JE -> A4)"
+}