From b5d1d6f7b70a0086a915c0d04c28a4db91161057 Mon Sep 17 00:00:00 2001 From: Gary Benson Date: Mon, 20 Apr 2020 15:49:09 +0100 Subject: [PATCH] Disable nested function tests for clang 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(+) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 8246424cc6b..cce1d03c8fc 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2020-04-20 Gary Benson + + * 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 * gdb.cp/exception.cc: Fix compilation error with clang. diff --git a/gdb/testsuite/gdb.base/nested-subp1.exp b/gdb/testsuite/gdb.base/nested-subp1.exp index c733af5811f..3d463256f99 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 cd041ec35be..6976f3315a2 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 5d2e1ecd5b9..37bbfcaf992 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 \ -- 2.30.2