-# Copyright 2008-2016 Free Software Foundation, Inc.
+# Copyright 2008-2018 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
# 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
# This file was written by Jan Kratochvil <jan.kratochvil@redhat.com>.
}
standard_testfile .f90
+load_lib "fortran.exp"
-if {[prepare_for_testing ${testfile}.exp ${testfile} \
+if {[prepare_for_testing "failed to prepare" ${testfile} \
$srcfile {debug f90 quiet}]} {
return -1
}
#set suffix "_"
set suffix ""
-set int4 {(integer\(kind=4\)|INTEGER\(4\))}
-set real4 {(real\(kind=4\)|REAL\(4\))}
-set real8 {(real\(kind=8\)|REAL\(8\))}
+# Depending on the compiler being used, the type names can be printed differently.
+set int4 [fortran_int4]
+set real4 [fortran_real4]
+set real8 [fortran_real8]
gdb_test "whatis foo$suffix" "No symbol \"foo$suffix\" in current context."
gdb_test "ptype foo$suffix" "No symbol \"foo$suffix\" in current context."