[OB] Disable nested function tests for clang

Message ID 1587394189-13374-1-git-send-email-gbenson@redhat.com
State New
Headers show
Series
  • [OB] Disable nested function tests for clang
Related show

Commit Message

Simon Marchi via Gdb-patches April 20, 2020, 2:49 p.m.
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                 | 6 ++++++
 gdb/testsuite/gdb.base/nested-subp1.exp | 6 ++++++
 gdb/testsuite/gdb.base/nested-subp2.exp | 6 ++++++
 gdb/testsuite/gdb.base/nested-subp3.exp | 6 ++++++
 4 files changed, 24 insertions(+)

-- 
1.8.3.1

Comments

Simon Marchi via Gdb-patches April 20, 2020, 2:52 p.m. | #1
On 4/20/20 3:49 PM, Gary Benson via Gdb-patches wrote:
> 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.


Please use the support_nested_function_tests procedure instead.

Thanks,
Pedro Alves
Simon Marchi via Gdb-patches April 20, 2020, 4:07 p.m. | #2
Pedro Alves wrote:
> On 4/20/20 3:49 PM, Gary Benson via Gdb-patches wrote:

> > 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.

> 

> Please use the support_nested_function_tests procedure instead.


Thanks, I've updated it.

Cheers,
Gary

Patch

diff --git a/gdb/testsuite/gdb.base/nested-subp1.exp b/gdb/testsuite/gdb.base/nested-subp1.exp
index c733af5..3d46325 100644
--- a/gdb/testsuite/gdb.base/nested-subp1.exp
+++ b/gdb/testsuite/gdb.base/nested-subp1.exp
@@ -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 \
diff --git a/gdb/testsuite/gdb.base/nested-subp2.exp b/gdb/testsuite/gdb.base/nested-subp2.exp
index cd041ec..6976f33 100644
--- a/gdb/testsuite/gdb.base/nested-subp2.exp
+++ b/gdb/testsuite/gdb.base/nested-subp2.exp
@@ -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 \
diff --git a/gdb/testsuite/gdb.base/nested-subp3.exp b/gdb/testsuite/gdb.base/nested-subp3.exp
index 5d2e1ec..37bbfca 100644
--- a/gdb/testsuite/gdb.base/nested-subp3.exp
+++ b/gdb/testsuite/gdb.base/nested-subp3.exp
@@ -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 \