Disable nested function tests for clang
authorGary Benson <gbenson@redhat.com>
Mon, 20 Apr 2020 14:49:09 +0000 (15:49 +0100)
committerGary Benson <gbenson@redhat.com>
Mon, 20 Apr 2020 14:49:09 +0000 (15:49 +0100)
Clang does not support nested functions, and there are no plans to
change this.  This commit disables the three nested function tests
when using clang.

gdb/testsuite/ChangeLog:

* gdb.base/nested-subp1.exp: Disable test when using clang.
* gdb.base/nested-subp2.exp: Likewise.
* gdb.base/nested-subp3.exp: Likewise.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/nested-subp1.exp
gdb/testsuite/gdb.base/nested-subp2.exp
gdb/testsuite/gdb.base/nested-subp3.exp

index 8246424cc6b8580128804ade2f7fec6b19323889..cce1d03c8fcf0b15a38e0c45971e98f4e75e3bfd 100644 (file)
@@ -1,3 +1,9 @@
+2020-04-20  Gary Benson <gbenson@redhat.com>
+
+       * gdb.base/nested-subp1.exp: Disable test when using clang.
+       * gdb.base/nested-subp2.exp: Likewise.
+       * gdb.base/nested-subp3.exp: Likewise.
+
 2020-04-20  Gary Benson <gbenson@redhat.com>
 
        * gdb.cp/exception.cc: Fix compilation error with clang.
index c733af5811f03fbafa64da746faf214ff1b6bc80..3d463256f9900d3d9564af0dc90ee7e8c448b2a3 100644 (file)
@@ -24,6 +24,12 @@ standard_testfile
 
 set testcase "nested-subp1"
 
+get_compiler_info
+if { [test_compiler_info "clang-*"] } {
+    untested "compiler does not support nested functions"
+    return -1
+}
+
 if { [gdb_compile "${srcdir}/${subdir}/${testcase}.c" \
                   [standard_output_file "${testcase}"] \
                   executable \
index cd041ec35be9072038b95fe9805ca7462750489e..6976f3315a25f71e18a9a94613690997f153e9a4 100644 (file)
@@ -24,6 +24,12 @@ standard_testfile
 
 set testcase "nested-subp2"
 
+get_compiler_info
+if { [test_compiler_info "clang-*"] } {
+    untested "compiler does not support nested functions"
+    return -1
+}
+
 if { [gdb_compile "${srcdir}/${subdir}/${testcase}.c" \
                   [standard_output_file "${testcase}"] \
                   executable \
index 5d2e1ecd5b93347e1b7d7d7b6ab9a589af0d8a38..37bbfcaf992ef4218b47075f461afe7188d978eb 100644 (file)
@@ -24,6 +24,12 @@ standard_testfile
 
 set testcase "nested-subp3"
 
+get_compiler_info
+if { [test_compiler_info "clang-*"] } {
+    untested "compiler does not support nested functions"
+    return -1
+}
+
 if { [gdb_compile "${srcdir}/${subdir}/${testcase}.c" \
                   [standard_output_file "${testcase}"] \
                   executable \