+2021-05-17 Bhuvanendra Kumar N <Bhuvanendra.KumarN@amd.com>
+
+ * gdb.base/class-allocatable-array.exp: Modified test for clang.
+
2021-05-16 Weimin Pan <weimin.pan@oracle.com>
* gdb.ctf/funcreturn.exp: New file.
# different names, or maybe a completely different approach, for
# representing class like structures. The following tests are
# cetainly going to fail.
-gdb_test "print this" " = \\( _data = \[^\r\n\]+, _vptr = \[^\r\n\]+\\)"
-gdb_test "print this%_data" " = \\(PTR TO -> \\( Type test_type \\)\\) \[^\r\n\]+"
-gdb_test "print this%_data%b" " = \\(\\(1, 2, 3\\) \\(4, 5, 6\\)\\)"
+# Hence the test case is modified for clang.
+if {[test_compiler_info {clang-*}]} {
+ gdb_test "print this" " = \\( a = 0, b = \\(\\(1, 2, 3\\) \\(4, 5, 6\\)\\) \\)"
+ gdb_test "print this%a" " = 0"
+ gdb_test "print this%b" " = \\(\\(1, 2, 3\\) \\(4, 5, 6\\)\\)"
+} else {
+ gdb_test "print this" " = \\( _data = \[^\r\n\]+, _vptr = \[^\r\n\]+\\)"
+ gdb_test "print this%_data" " = \\(PTR TO -> \\( Type test_type \\)\\) \[^\r\n\]+"
+ gdb_test "print this%_data%b" " = \\(\\(1, 2, 3\\) \\(4, 5, 6\\)\\)"
+}