summaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorChristoph Weinmann <christoph.t.weinmann@intel.com>2017-09-08 15:11:47 +0200
committerTim Wiederhake <tim.wiederhake@intel.com>2017-09-08 15:11:47 +0200
commit469412dd9ccc4de5874fd3299b105833f36b34cd (patch)
tree30e8da1d0d3fa6cba70ecbf911babbd6b2ffdf6e /gdb/testsuite
parente0f86435f8b3c61e21070a232a07c03928c2d544 (diff)
downloadbinutils-gdb-469412dd9ccc4de5874fd3299b105833f36b34cd.tar.gz
Remove C/C++ relevant code in Fortran specific file.
Remove code relevant for printing C/C++ Integer values in a Fortran specific file to unify printing of Fortran values. This does not change the output.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.fortran/printing-types.exp35
-rw-r--r--gdb/testsuite/gdb.fortran/printing-types.f9027
3 files changed, 67 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 5835acc994c..8d8dc3c04c8 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
+
+ * gdb.fortran/printing-types.exp: New file.
+ * gdb.fortran/printing-types.exp: New file.
+
2017-09-08 Bernhard Heckel <bernhard.heckel@intel.com>
* gdb.fortran/vla-ptype.exp: Fix typos.
diff --git a/gdb/testsuite/gdb.fortran/printing-types.exp b/gdb/testsuite/gdb.fortran/printing-types.exp
new file mode 100644
index 00000000000..085de4fc8f7
--- /dev/null
+++ b/gdb/testsuite/gdb.fortran/printing-types.exp
@@ -0,0 +1,35 @@
+# Copyright 2017 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+if {[skip_fortran_tests]} { return -1 }
+
+standard_testfile .f90
+
+if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug f90}]} {
+ return -1
+}
+
+if {![runto MAIN__]} then {
+ untested "Could not run to breakpoint MAIN__"
+ return -1
+}
+
+gdb_breakpoint [gdb_get_line_number "write"]
+gdb_continue_to_breakpoint "write"
+
+gdb_test "print oneByte" " = 1"
+gdb_test "print twobytes" " = 2"
+gdb_test "print chvalue" " = \'a\'"
+gdb_test "print logvalue" " = \.TRUE\."
diff --git a/gdb/testsuite/gdb.fortran/printing-types.f90 b/gdb/testsuite/gdb.fortran/printing-types.f90
new file mode 100644
index 00000000000..749aa7cf051
--- /dev/null
+++ b/gdb/testsuite/gdb.fortran/printing-types.f90
@@ -0,0 +1,27 @@
+! Copyright 2017 Free Software Foundation, Inc.
+!
+! This program is free software; you can redistribute it and/or modify
+! it under the terms of the GNU General Public License as published by
+! the Free Software Foundation; either version 3 of the License, or
+! (at your option) any later version.
+!
+! This program is distributed in the hope that it will be useful,
+! but WITHOUT ANY WARRANTY; without even the implied warranty of
+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+! GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License
+! along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+program prog
+ integer(1) :: oneByte
+ integer(2) :: twoBytes
+ character :: chValue
+ logical(1) :: logValue
+
+ oneByte = 1
+ twoBytes = 2
+ chValue = 'a'
+ logValue = .true.
+ write(*,*) s
+end