aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAlok Kumar Sharma <alokkumar.sharma@amd.com>2020-02-04 17:17:20 +0000
committerAndrew Burgess <andrew.burgess@embecosm.com>2020-02-04 17:17:20 +0000
commitc3b149eb7697b376df1b3a47d0102afda389ee6d (patch)
tree88ebc515e517a4a47f23e8fbf6792fa8bbe41b14 /gdb
parentdcc9fbc6da9536f65c55dbb67f50ab3c2e086c6e (diff)
downloadbinutils-c3b149eb7697b376df1b3a47d0102afda389ee6d.zip
binutils-c3b149eb7697b376df1b3a47d0102afda389ee6d.tar.gz
binutils-c3b149eb7697b376df1b3a47d0102afda389ee6d.tar.bz2
gdb/fortran: Allow for using Flang in Fortran testing
In lib/fortran.exp, in the helper function fortran_int4, there is currently no support for the LLVM Fortran compiler, Flang. As a result we return the default pattern 'unknown' to match against all 4-byte integer types, which causes many tests to fail. The same is true for all of the other helper functions related to finding a suitable type pattern. This commit adds support for Flang. There should be no change when testing with gfortran. gdb/testsuite/ChangeLog: * lib/fortran.exp (fortran_int4): Handle clang. (fortran_int8): Likewise. (fortran_real4): Likewise. (fortran_real8): Likewise. (fortran_complex4): Likewise. (fortran_logical4): Likewise. (fortran_character1): Likewise. Change-Id: Ife0d9828f78361fbd992bf21af746042b017dafc
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/ChangeLog10
-rw-r--r--gdb/testsuite/lib/fortran.exp21
2 files changed, 24 insertions, 7 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index cd496e7..eb43880 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,13 @@
+2020-02-04 Alok Kumar Sharma <alokkumar.sharma@amd.com>
+
+ * lib/fortran.exp (fortran_int4): Handle clang.
+ (fortran_int8): Likewise.
+ (fortran_real4): Likewise.
+ (fortran_real8): Likewise.
+ (fortran_complex4): Likewise.
+ (fortran_logical4): Likewise.
+ (fortran_character1): Likewise.
+
2020-02-04 Tom de Vries <tdevries@suse.de>
* README (Race detection): Add note.
diff --git a/gdb/testsuite/lib/fortran.exp b/gdb/testsuite/lib/fortran.exp
index 0c2627d..54f3293 100644
--- a/gdb/testsuite/lib/fortran.exp
+++ b/gdb/testsuite/lib/fortran.exp
@@ -32,7 +32,8 @@ proc set_lang_fortran {} {
proc fortran_int4 {} {
if {[test_compiler_info {gcc-4-[012]-*}]} {
return "int4"
- } elseif {[test_compiler_info {gcc-*}]} {
+ } elseif {[test_compiler_info {gcc-*}]
+ || [test_compiler_info {clang-*}]} {
return "integer\\(kind=4\\)"
} elseif {[test_compiler_info {icc-*}]} {
return "INTEGER\\(4\\)"
@@ -44,7 +45,8 @@ proc fortran_int4 {} {
proc fortran_int8 {} {
if {[test_compiler_info {gcc-4-[012]-*}]} {
return "int8"
- } elseif {[test_compiler_info {gcc-*}]} {
+ } elseif {[test_compiler_info {gcc-*}]
+ || [test_compiler_info {clang-*}]} {
return "integer\\(kind=8\\)"
} elseif {[test_compiler_info {icc-*}]} {
return "INTEGER\\(8\\)"
@@ -56,7 +58,8 @@ proc fortran_int8 {} {
proc fortran_real4 {} {
if {[test_compiler_info {gcc-4-[012]-*}]} {
return "real4"
- } elseif {[test_compiler_info {gcc-*}]} {
+ } elseif {[test_compiler_info {gcc-*}]
+ || [test_compiler_info {clang-*}]} {
return "real\\(kind=4\\)"
} elseif {[test_compiler_info {icc-*}]} {
return "REAL\\(4\\)"
@@ -68,7 +71,8 @@ proc fortran_real4 {} {
proc fortran_real8 {} {
if {[test_compiler_info {gcc-4-[012]-*}]} {
return "real8"
- } elseif {[test_compiler_info {gcc-*}]} {
+ } elseif {[test_compiler_info {gcc-*}]
+ || [test_compiler_info {clang-*}]} {
return "real\\(kind=8\\)"
} elseif {[test_compiler_info {icc-*}]} {
return "REAL\\(8\\)"
@@ -80,7 +84,8 @@ proc fortran_real8 {} {
proc fortran_complex4 {} {
if {[test_compiler_info {gcc-4-[012]-*}]} {
return "complex4"
- } elseif {[test_compiler_info {gcc-*}]} {
+ } elseif {[test_compiler_info {gcc-*}]
+ || [test_compiler_info {clang-*}]} {
return "complex\\(kind=4\\)"
} elseif {[test_compiler_info {icc-*}]} {
return "COMPLEX\\(4\\)"
@@ -92,7 +97,8 @@ proc fortran_complex4 {} {
proc fortran_logical4 {} {
if {[test_compiler_info {gcc-4-[012]-*}]} {
return "logical4"
- } elseif {[test_compiler_info {gcc-*}]} {
+ } elseif {[test_compiler_info {gcc-*}]
+ || [test_compiler_info {clang-*}]} {
return "logical\\(kind=4\\)"
} elseif {[test_compiler_info {icc-*}]} {
return "LOGICAL\\(4\\)"
@@ -104,7 +110,8 @@ proc fortran_logical4 {} {
proc fortran_character1 {} {
if {[test_compiler_info {gcc-4-[012]-*}]} {
return "character1"
- } elseif {[test_compiler_info {gcc-*}]} {
+ } elseif {[test_compiler_info {gcc-*}]
+ || [test_compiler_info {clang-*}]} {
return "character\\(kind=1\\)"
} elseif {[test_compiler_info {icc-*}]} {
return "CHARACTER\\(1\\)"