public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] [gdb/testsuite] Fix gdb.fortran/info-types.exp regexp
@ 2019-08-29 12:43 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2019-08-29 12:43 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=8077c50dbb74ee63c038dbd3527c372dbe180fbb

commit 8077c50dbb74ee63c038dbd3527c372dbe180fbb
Author: Tom de Vries <tdevries@suse.de>
Date:   Thu Aug 29 14:43:11 2019 +0200

    [gdb/testsuite] Fix gdb.fortran/info-types.exp regexp
    
    The gdb.fortran/info-types.exp test-case passes with gcc 7 (though not on
    openSUSE, due to the extra debug info) and fails with gcc 4.8 and gcc 8.
    
    Fix the gdb_test regexp to fix all those cases.
    
    gdb/testsuite/ChangeLog:
    
    2019-08-29  Tom de Vries  <tdevries@suse.de>
    
    	* gdb.fortran/info-types.exp: Fix gdb_test regexp to allow more
    	diverse debug info.
    	* lib/fortran.exp (fortran_int8): New proc, based on fortran_int4.

Diff:
---
 gdb/testsuite/ChangeLog                  |  6 ++++++
 gdb/testsuite/gdb.fortran/info-types.exp | 11 +++++++----
 gdb/testsuite/lib/fortran.exp            | 12 ++++++++++++
 3 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 06ee15c..b1dc7df 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2019-08-29  Tom de Vries  <tdevries@suse.de>
+
+	* gdb.fortran/info-types.exp: Fix gdb_test regexp to allow more
+	diverse debug info.
+	* lib/fortran.exp (fortran_int8): New proc, based on fortran_int4.
+
 2019-08-28  Tom de Vries  <tdevries@suse.de>
 
 	* gdb.base/info-var.exp: Allow info variables to print info for files
diff --git a/gdb/testsuite/gdb.fortran/info-types.exp b/gdb/testsuite/gdb.fortran/info-types.exp
index 81e6739..3064628 100644
--- a/gdb/testsuite/gdb.fortran/info-types.exp
+++ b/gdb/testsuite/gdb.fortran/info-types.exp
@@ -31,6 +31,7 @@ if { ![runto MAIN__] } {
 }
 
 set integer4 [fortran_int4]
+set integer8 [fortran_int8]
 set logical4 [fortran_logical4]
 set character1 [fortran_character1]
 
@@ -41,7 +42,9 @@ gdb_test "info types" \
 	 "File .*:" \
 	 "\[\t \]+${character1}" \
 	 "\[\t \]+${integer4}" \
-	 "\[\t \]+${logical4}" \
-	 "20:\[\t \]+Type __vtype_mod1_M1t1;" \
-	 "17:\[\t \]+Type m1t1;" \
-	 "22:\[\t \]+Type s1;" ]
+	 "(\[\t \]+${integer8}" \
+	 ")?\[\t \]+${logical4}" \
+	 "(20:\[\t \]+Type __vtype_mod1_M1t1;" \
+	 ")?$decimal:\[\t \]+Type m1t1;" \
+	 "22:\[\t \]+Type s1;(" \
+	 ".*)?"]
diff --git a/gdb/testsuite/lib/fortran.exp b/gdb/testsuite/lib/fortran.exp
index 81811db..d523608 100644
--- a/gdb/testsuite/lib/fortran.exp
+++ b/gdb/testsuite/lib/fortran.exp
@@ -41,6 +41,18 @@ proc fortran_int4 {} {
     }
 }
 
+proc fortran_int8 {} {
+    if {[test_compiler_info {gcc-4-[012]-*}]} {
+	return "int8"
+    } elseif {[test_compiler_info {gcc-*}]} {
+	return "integer\\(kind=8\\)"
+    } elseif {[test_compiler_info {icc-*}]} {
+	return "INTEGER\\(8\\)"
+    } else {
+	return "unknown"
+    }
+}
+
 proc fortran_real4 {} {
     if {[test_compiler_info {gcc-4-[012]-*}]} {
 	return "real4"


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-08-29 12:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-29 12:43 [binutils-gdb] [gdb/testsuite] Fix gdb.fortran/info-types.exp regexp Tom de Vries

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).