Update copyright year range in all GDB files
[external/binutils.git] / gdb / testsuite / gdb.fortran / common-block.exp
index abdc50a..ed40b67 100644 (file)
@@ -1,4 +1,4 @@
-# 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
@@ -11,8 +11,7 @@
 # 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>.
 
@@ -21,8 +20,9 @@ if {[skip_fortran_tests]} {
 }
 
 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
 }
@@ -42,9 +42,10 @@ gdb_continue_to_breakpoint "stop-here-out"
 #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."