This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

gdb.fortran testsuite patch


This patch contains merged gdb.fortran testsuite.

It includes merge changes and some new tests added by HP for fortran
testing.  A FSF copyright assignment is on its way.

File renames / moves (a tar file of gdb.fortran has been ftp'd over as
ftp.cygnus.com:/incoming/hp_gdb.fortran.tar):

Old                                            New
---                                            ---
                                               Makefile.in
                                               adjustable.exp
                                               adjustable.f
                                               ar-exp.exp
                                               ar-exp.f
                                               assumedsiz.exp
                                               assumedsiz.f
                                               automatic.exp
                                               automatic.f
                                               btype.exp
                                               btype.f
                                               common.exp
                                               common1.f
                                               common2.exp
                                               common2.f
                                               common3.exp
                                               common3.f
                                               configure
                                               configure.in
                                               entry1.exp
                                               entry1.f
                                               entry2.exp
                                               entry2.f
                                               exprs2.exp
                                               frames.exp
                                               frames.f
                                               ftypes.exp
                                               ftypes.f
                                               intrinsics.exp
                                               intrinsics.f
                                               keytypes.exp
                                               keytypes.f
                                               local.exp
                                               local.f
                                               local1.exp
                                               local1.f
                                               local2.exp
                                               local2.f
                                               main.exp
                                               noprog_main.f
                                               noprogormain.f
                                               params.exp
                                               params.f
                                               params1.exp
                                               params1.f
                                               prog_main.f
                                               prog_nomain.f
                                               rtypes.exp
                                               rtypes.f
                                               solibf.exp
                                               solibf.f
                                               solibf1.f
                                               solibf2.f
                                               stepnext.exp
                                               stepnext.f
                                               strings.exp
                                               strings.f
                                               strings_a.f

- Jimmy Guo, guo@cup.hp.com

/opt/gnu/bin/diff -c -N  ../gdb-19990719/gdb/testsuite/gdb.fortran gdb/testsuite/gdb.fortran
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/Makefile.in gdb/testsuite/gdb.fortran/Makefile.in
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/Makefile.in	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/Makefile.in	Thu Jul 22 17:49:51 1999
***************
*** 0 ****
--- 1,32 ----
+ VPATH = @srcdir@
+ srcdir = @srcdir@
+ 
+ EXECUTABLES = ar-exp adjustable assumedsiz automatic btype \
+ 	common common1 common2 common3 \
+ 	entry1 entry2 frames ftypes intrinsics keytypes local local1 local2 \
+ 	noprog_main noprogormain prog_main prog_nomain \
+ 	params params1 rtypes solibf stepnext strings
+ 
+ MISCELLANEOUS = solibf1.sl solibf2.sl
+ 
+ all:
+ 	@echo "Nothing to be done for all..."
+ 
+ info:
+ install-info:
+ dvi:
+ install:
+ uninstall: force
+ installcheck:
+ check:
+ 
+ clean mostlyclean:
+ 	-rm -f *~ *.o *.ci
+ 	-rm -f core $(EXECUTABLES)
+ 	-rm -f $(MISCELLANEOUS)
+ 
+ distclean maintainer-clean realclean: clean
+ 	-rm -f Makefile config.status config.log
+ 
+ Makefile : $(srcdir)/Makefile.in $(srcdir)/configure.in
+ 	$(SHELL) ./config.status --recheck
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/adjustable.exp gdb/testsuite/gdb.fortran/adjustable.exp
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/adjustable.exp	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/adjustable.exp	Thu Jul 22 17:50:02 1999
***************
*** 0 ****
--- 1,51 ----
+ # Author: Sue Kimura <srk@cup.hp.com>, June, 1999 #
+ # Test a simple adjustable array
+ 
+ if { ![istarget "hppa*-*-hpux*"] } {
+     return 0
+ }
+ 
+ if $tracelevel {
+     strace $tracelevel
+ }
+ 
+ set testfile "adjustable"
+ set srcfile $testfile.f
+ set binfile ${objdir}/${subdir}/$testfile
+ 
+ if [get_compiler_info ${binfile} f77] {
+     return -1
+ }
+ 
+ if { ! $hp_f77_compiler && ! $hp_f90_compiler } {
+     return 0
+ }
+ 
+ if {[gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" executable {debug f77}] != ""} {
+     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+ }
+ 
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+ 
+ if ![runto subr] {
+     perror "couldn't run to breakpoint subr"
+     continue
+ }
+ 
+ gdb_test "ptype list1" "integer\\*4( |)\\(5\\)"
+ for {set i 1} {$i <= 5} {incr i} {
+     gdb_test "print list1($i)" ".*= $i"
+ }
+ 
+ 
+ gdb_test "ptype list2" "integer\\*4( |)\\(0:2,-3:-1\\)"
+ set cnt 10
+ for {set j -3} {$j <= -1} {incr j} {
+     for {set i 0} {$i <= 2} {incr i} {
+ 	gdb_test "print list2($i,$j)" ".*= $cnt"
+ 	set cnt [expr $cnt + 10]
+     }
+ }
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/adjustable.f gdb/testsuite/gdb.fortran/adjustable.f
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/adjustable.f	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/adjustable.f	Thu Jul 22 17:50:03 1999
***************
*** 0 ****
--- 1,20 ----
+ C  Explicit-shape Arrays with non-constant bounds
+       program adjustable
+ 
+       integer one_dimen(5)
+       data one_dimen / 1, 2, 3, 4, 5/
+ 
+       integer two_dimen(3,3)
+       data two_dimen / 10, 20, 30, 40, 50, 60, 70, 80, 90 /
+ 
+       call subr (one_dimen, two_dimen, 5, 3)
+ 
+       end
+ 
+ C list1 and list2 are adjustable arrays -- dummy argument with at least
+ C one non-constant bound
+       subroutine subr(list1, list2, m, n)
+         integer m, n
+         integer list1(m)
+         integer list2(0:n-1,-n:-n+2)
+       end subroutine subr
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/ar-exp.exp gdb/testsuite/gdb.fortran/ar-exp.exp
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/ar-exp.exp	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/ar-exp.exp	Thu Jul 22 17:50:04 1999
***************
*** 0 ****
--- 1,122 ----
+ # This file was written by Sue Kimura. (sue_kimura@hp.com)
+ #
+ # Fortran test for simple explicit arrays 
+ #
+ # Source file: ar-exp.f
+ 
+ if { ![istarget "hppa*-*-hpux*"] } {
+     return 0
+ }
+ 
+ if $tracelevel {
+     strace $tracelevel
+ }
+ 
+ #
+ # test running programs
+ #
+ set prms_id 0
+ set bug_id 0
+ 
+ set testfile "ar-exp"
+ set srcfile ${testfile}.f
+ set binfile ${objdir}/${subdir}/${testfile}
+ 
+ if [get_compiler_info ${binfile} f77] {
+     return -1
+ }
+ 
+ if { ! $hp_f77_compiler && ! $hp_f90_compiler } {
+     return 0
+ }
+ 
+ if { [gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" executable {debug f77}] != "" } {
+     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+ }
+ 
+ set MAIN "main"
+ if {[istarget "hppa*-*-hpux*"]} { set MAIN "_MAIN_"}
+ 
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+ 
+ #
+ # set it up at a breakpoint so we can play with the variable values
+ #
+ 
+ if ![runto $MAIN ] {
+     perror "couldn't run to breakpoint $MAIN"
+     continue
+ }
+ 
+ gdb_test "break 48"
+ gdb_test "continue" \
+     "Continuing.*Breakpoint $decimal, $MAIN.* max_dimen \\(1,2,1,2,1,2,1\\) = 10" \
+     "continue to line 48"
+ 
+ # verify contents and types of arrays
+ 
+ gdb_test "print one_dimen"  \
+     "= \\(1.10000002, 2.20000005, 3.29999995, 4.4000001, 5.5, 6.5999999, 6.5999999, 6.5999999, 6.5999999, 6.5999999\\)"
+ 
+ gdb_test "print double_dimen" \
+     " = \\(\\( 1, 5, 9\\) \\( 2, 6, 10\\) \\( 3, 7, 11\\) \\( 4, 8, 12\\) \\)"
+ 
+ gdb_test "print double_dimen1" \
+     " = \\(\\( 1, 2, 3\\) \\( 4, 5, 6\\) \\( 7, 8, 9\\) \\( 10, 11, 12\\) \\)"
+ 
+ gdb_test "print cplx_arr" \
+     " = \\(\\(1.20000005,2.29999995\\), \\(3.4000001,4.5\\), \\(5.5999999,6.69999981\\)\\)"
+ 
+ gdb_test "print bounds_arr"  " = \\(-2, -1, 0, 1, 2, 3\\)"
+ 
+ 
+ #verify types of arrays
+ gdb_test "ptype one_dimen" "type = real\\*4 \\(10\\)"
+ gdb_test "ptype double_dimen" "type = integer\\*4 \\(3,4\\)"
+ gdb_test "ptype double_dimen1" "type = integer\\*4 \\(3,4\\)"
+ gdb_test "ptype three_dimen" "type = integer\\*4 \\(2,3,4\\)"
+ gdb_test "ptype cplx_arr"  "type = complex\\*8 \\(3\\)"
+ gdb_test "ptype bounds_arr"  "type = integer\\*4 \\(-2:3\\)"
+ 
+ # check some indexing
+ gdb_test "print one_dimen(5)"      " = 5.5"
+ gdb_test "print cplx_arr(2)"       " = \\(3.4000001,4.5\\)"
+ gdb_test "print bounds_arr(-2)"    " = -2"
+ gdb_test "print bounds_arr(0)"     " = 0"
+ gdb_test "print bounds_arr(3)"     " = 3"
+ 
+ set cnt 1
+ for {set i 1} {$i <= 3} {incr i} {
+     for {set j 1} {$j <= 4} {incr j} {
+ 	gdb_test "print double_dimen($i,$j)" ".*= $cnt"
+ 	incr cnt
+     }
+ }
+ 
+ set cnt 1
+ for {set j 1} {$j <= 4} {incr j} {
+     for {set i 1} {$i <= 3} {incr i} {
+ 	gdb_test "print double_dimen1($i,$j)" ".*= $cnt"
+ 	incr cnt
+     }
+ }
+ 
+ set cnt 10
+ for {set k 1} {$k <= 4} {incr k} {
+     for {set j 1} {$j <= 3} {incr j} {
+ 	for {set i 1} {$i <= 2} {incr i} {
+ 	    gdb_test "print three_dimen($i,$j,$k)" ".*= $cnt"
+ 	    set cnt [expr $cnt+10]
+ 	}
+     }
+ }
+ 
+ gdb_test "break 50"
+ gdb_test "continue" \
+     "Continuing.*Breakpoint $decimal, $MAIN.*end" "continue to end"
+ gdb_test "print max_dimen(1,2,1,2,1,2,1)"  " = 10"
+ gdb_test "print max_dimen(1,2,1,2,1,2,1,2)"  \
+     "Too many subscripts for Fortran \\(7 Max\\)"
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/ar-exp.f gdb/testsuite/gdb.fortran/ar-exp.f
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/ar-exp.f	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/ar-exp.f	Thu Jul 22 17:50:04 1999
***************
*** 0 ****
--- 1,51 ----
+ C explicit bound arrays
+ 
+       integer double_dimen(3,4)
+       data ((double_dimen(i,j),j=1,4),i=1,3) 
+      1       /1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12/
+       
+       integer double_dimen1(3,4)
+       data double_dimen1 /1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12/
+ 
+       integer three_dimen(2,3,4)
+       data three_dimen /10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110,
+      1                  120, 130, 140, 150, 160, 170, 180, 190, 200,
+      1                  210, 220, 230, 240/
+       
+       real one_dimen(10)
+       data one_dimen /1.1,2.2,3.3,4.4,5.5,5*6.6/
+       
+       complex cplx_arr (3)
+       data cplx_arr / (1.2,2.3), (3.4,4.5),(5.6,6.7) /
+ 
+       integer, dimension (-2:3) :: bounds_arr
+       data bounds_arr  /-2, -1, 0, 1, 2, 3/
+ 
+       integer max_dimen (2,2,2,2,2,2,2)
+       data max_dimen / 128*2/
+ 
+       integer i,j,k
+ 
+       print *, "double_dimen = ", double_dimen
+       print *, "double_dimen1 = ", double_dimen1
+       print *, "one_dimen = ", one_dimen
+       print *, "cplx_arr = ", cplx_arr
+       print *, "bounds_arr = ", bounds_arr
+       print *, "max_dimen = ", max_dimen 
+ 
+       print *, "double_dim(4,1)", double_dimen(4,1)
+       print *, "double_dim1(4,1)", double_dimen1(4,1)
+ 
+       do k = 1, 4
+         do j = 1, 3
+           do i = 1, 2
+             print *, "three_dimen(", i, ",", j, ",", k, ") = ",
+      1            three_dimen(i,j,k)
+           enddo
+         enddo
+       enddo
+ 
+       max_dimen (1,2,1,2,1,2,1) = 10
+       print *, "max_dimen(1,2,1,2,1,2,1)", max_dimen(1,2,1,2,1,2,1)
+ 
+       end
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/assumedsiz.exp gdb/testsuite/gdb.fortran/assumedsiz.exp
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/assumedsiz.exp	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/assumedsiz.exp	Thu Jul 22 17:50:05 1999
***************
*** 0 ****
--- 1,61 ----
+ # Author: Ovidiu Predescu <ovidiu@cup.hp.com>, November, 1998
+ #
+ # Test a simple assumed-size array
+ 
+ if { ![istarget "hppa*-*-hpux*"] } {
+     return 0
+ }
+ 
+ set testfile "assumedsiz"
+ set srcfile $testfile.f
+ set binfile ${objdir}/${subdir}/$testfile
+ 
+ if [get_compiler_info ${binfile} f77] {
+     return -1
+ }
+ 
+ if { ! $hp_f77_compiler && ! $hp_f90_compiler } {
+     return 0
+ }
+ 
+ if {[gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" executable {debug f77}] != ""} {
+     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+ }
+ 
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+ 
+ if ![runto subr] then {
+     perror "couldn't run to breakpoint subr"
+     continue
+ }
+ 
+ gdb_test "ptype arr" "integer\\*4 \\(\\*\\)"
+ for {set i 1} {$i <= 6} {incr i} {
+     gdb_test "print arr($i)" ".*= $i"
+ }
+ 
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+ 
+ if ![runto subr3] then {
+     perror "couldn't run to breakpoint subr3"
+     continue
+ }
+ 
+ gdb_test "ptype arr3" "type = integer\\*4 \\(2,-2:-1,3:\\*\\)"
+ set cnt 1
+ for {set k 3} {$k <= 4} {incr k} {
+     for {set j -2} {$j <= -1} {incr j} {
+ 	for {set i 1} {$i <= 2} {incr i} {
+ 	    gdb_test "print arr3($i,$j,$k)" ".*= $cnt"
+ 	    incr cnt
+ 	}
+     }
+ }
+ 
+ 
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/assumedsiz.f gdb/testsuite/gdb.fortran/assumedsiz.f
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/assumedsiz.f	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/assumedsiz.f	Thu Jul 22 17:50:05 1999
***************
*** 0 ****
--- 1,31 ----
+       program assumedsiz
+ 
+       integer a(2,3)
+       data a/1, 2, 3, 4, 5, 6/
+ 
+       integer a3(2,2,2)
+       data a3 / 1,  2,  3,  4,  5,  6,  7,  8 /
+ 
+       call subr (a)
+       call subr3 (a3, 2)
+ 
+       end
+ 
+       subroutine subr (arr)
+       integer arr (*)
+       end
+ 
+       subroutine subr3 (arr3, n)
+       integer, dimension(n, -n:-n+1, 3:*) :: arr3
+       integer n
+       integer i, j, k
+ 
+       do k = 3, 4
+         do j = -n, -n+1
+           do i = 1, n
+             print *, i, ",", j, ",", k, ": ", arr3(i,j,k)
+           enddo
+         enddo
+       enddo
+ 
+       end
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/automatic.exp gdb/testsuite/gdb.fortran/automatic.exp
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/automatic.exp	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/automatic.exp	Thu Jul 22 17:50:03 1999
***************
*** 0 ****
--- 1,68 ----
+ # Author: Sue Kimura <srk@cup.hp.com>, June, 1999 #
+ # Test automatic arrays
+ 
+ if { ![istarget "hppa*-*-hpux*"] } {
+     return 0
+ }
+ 
+ if $tracelevel {
+     strace $tracelevel
+ }
+ 
+ set testfile "automatic"
+ set srcfile $testfile.f
+ set binfile ${objdir}/${subdir}/$testfile
+ 
+ if [get_compiler_info ${binfile} f77] {
+     return -1
+ }
+ 
+ if { ! $hp_f77_compiler && ! $hp_f90_compiler } {
+     return 0
+ }
+ 
+ # skip this test for f90 until "warning: hpread_type_lookup: unsupported 
+ # type (52)" is fixed
+ if {$hp_f90_compiler} {
+     unsupported "unimplemented dntt kind 52"
+     continue
+ }
+ 
+ if {[gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" executable {debug f77}] != ""} {
+     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+ }
+ 
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+ 
+ if ![runto subr] then {
+     perror "couldn't run to breakpoint subr"
+     continue
+ }
+ 
+ gdb_test "break 38" "Breakpoint $decimal at $hex: file .*$srcfile, line 38."
+ gdb_test "continue" ".*Breakpoint $decimal,.*$srcfile:38.*end subroutine subr"
+ 
+ gdb_test "ptype list1" "PTR TO -> \\( integer\\*4 \\(2\\)\\)"
+ gdb_test "print list1" ".*=.*\\(1, 2\\)"
+ for {set i 1} {$i <= 2} {incr i} {
+     gdb_test "print list1($i)" ".*= $i"
+ }
+ 
+ gdb_test "ptype list2" "PTR TO -> \\( integer\\*4 \\(2,5\\)\\)"
+ gdb_test "print list2" ".*=.*\\( 2, 3\\) \\( 3, 4\\) \\( 4, 5\\) \\( 5, 6\\) \\( 6, 7\\) \\)"
+ for {set j 1} {$j <= 5} {incr j} {
+     for {set i 1} {$i <= 2} {incr i} {
+ 	gdb_test "print list2($i,$j)" ".*= [expr $i+$j]"
+     }
+ }
+ 
+ gdb_test "ptype list3" "PTR TO -> \\( integer\\*4 \\(0:1,-2:1\\)\\)"
+ gdb_test "print list3" ".*=.*\\(\\( 2, 3\\) \\( 1, 2\\) \\( 0, 1\\) \\( -1, 0\\) \\)"
+ for {set j -2} {$j <= 1} {incr j} {
+     for {set i 0} {$i <= 1} {incr i} {
+ 	gdb_test "print list3($i,$j)" ".*= [expr $i-$j]"
+     }
+ }
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/automatic.f gdb/testsuite/gdb.fortran/automatic.f
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/automatic.f	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/automatic.f	Thu Jul 22 17:50:03 1999
***************
*** 0 ****
--- 1,38 ----
+ C  Explicit-shape Arrays with non-constant bounds
+       program automatic
+ 
+       call subr (2,2)
+ 
+       end
+ 
+ C list1, list2 and list3  are automatic arrays -- non-dummy argument with 
+ C a non-constant bound
+ 
+       subroutine subr(m, n)
+         integer list1 (n)
+         integer list2 (n,5)
+         integer list3 (0:m-1,-m:n-1)
+ 
+ 
+         do i = 1,n
+           list1(i) = i
+           print *, "list1(", i, " ):", list1(i)
+         enddo
+ 
+         do j = 1,5
+           do i = 1,n
+             list2(i,j) = i+j
+             print *, "list2(", i, ",", j, " ):", list2(i,j)
+           enddo
+         enddo
+         print *, "list2: ", list2
+ 
+         do j = -m, n-1
+           do i = 0, m-1
+             list3(i,j) = i-j
+             print *, "list3(", i, ",", j, " ):", list3(i,j)
+           enddo
+         enddo
+         print *, "list3: ", list3
+ 
+       end subroutine subr
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/btype.exp gdb/testsuite/gdb.fortran/btype.exp
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/btype.exp	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/btype.exp	Thu Jul 22 17:49:52 1999
***************
*** 0 ****
--- 1,91 ----
+ #   Copyright (C) 1988, 1990, 1991, 1992, 1994 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 2 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, write to the Free Software
+ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+ 
+ # Please email any bugs, comments, and/or additions to this file to:
+ # bug-gdb@prep.ai.mit.edu
+ 
+ # This file was written by Sue Kimura. (sue_kimura@hp.com)
+ 
+ #Byte type is an HP-extension so only test only on hpux systems.
+ if { ![istarget "hppa*-*-hpux*"] } {
+     return 0
+ }
+ 
+ if $tracelevel {
+     strace $tracelevel
+ }
+ 
+ #
+ # test running programs
+ #
+ set prms_id 0
+ set bug_id 0
+ 
+ set testfile "btype"
+ set srcfile ${testfile}.f
+ set binfile ${objdir}/${subdir}/${testfile}
+ 
+ if [get_compiler_info ${binfile} f77] {
+     return -1
+ }
+ 
+ if { ! $hp_f77_compiler && ! $hp_f90_compiler } {
+     return 0
+ }
+ 
+ if {[gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" executable {debug f77}] != ""} {
+     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+ }
+ 
+ if {$hp_f77_compiler} {
+     set ptype_b        " = logical\\*1"
+     set print_b_first  " = .TRUE."
+     set print_b_second " = .TRUE."
+     set print_b_third  " = .FALSE."
+ } else {
+     set ptype_b        " = integer\\*1"
+     set print_b_first  " = -128"
+     set print_b_second " = 127"
+     set print_b_third  " = 0"
+ }
+ 
+ set MAIN "main"
+ if {[istarget "hppa*-*-hpux*"]} { set MAIN "_MAIN_"}
+ 
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+ 
+ #
+ # set it up at a breakpoint so we can play with the variable values
+ #
+ 
+ if ![runto $MAIN ] then {
+     perror "couldn't run to breakpoint $MAIN"
+     continue
+ }
+ 
+ #test byte type variables
+ 
+ gdb_test "ptype b"   "$ptype_b"         "ptype b"
+ gdb_test "print b"   "$print_b_first"   "print b"
+ gdb_test "x /x \&b"  ".*:.*0x80000000"  "hex value of b"
+ 
+ gdb_test "print b = 127" "$print_b_second"  "print b = 127"
+ gdb_test "x /x \&b"      ".*:.*0x7f000000"  "hex value of b = 127"
+ gdb_test "p b = 0 "      "$print_b_third"   "print b = 0"
+ gdb_test "x /x \&b"      ".*:.*0x00000000"  "hex value of b  = 0"
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/btype.f gdb/testsuite/gdb.fortran/btype.f
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/btype.f	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/btype.f	Thu Jul 22 17:49:52 1999
***************
*** 0 ****
--- 1,5 ----
+          program byte_type
+ 
+          byte  ::b = -128
+  
+          end
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/common.exp gdb/testsuite/gdb.fortran/common.exp
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/common.exp	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/common.exp	Thu Jul 22 17:49:52 1999
***************
*** 0 ****
--- 1,146 ----
+ # This file was written by Sue Kimura. (sue_kimura@hp.com)
+ #
+ # Fortran common test
+ #
+ # Source file: common.f
+ 
+ if { ![istarget "hppa*-*-hpux*"] } {
+     return 0
+ }
+ 
+ if $tracelevel {
+     strace $tracelevel
+ }
+ 
+ #
+ # test running programs
+ #
+ set prms_id 0
+ set bug_id 0
+ 
+ set testfile "common"
+ set srcfile ${testfile}.f
+ set binfile ${objdir}/${subdir}/${testfile}
+ 
+ if [get_compiler_info ${binfile} f77] {
+     return -1
+ }
+ 
+ if { ! $hp_f77_compiler && ! $hp_f90_compiler } {
+     return 0
+ }
+ 
+ if {[gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" executable {debug f77}] != ""} {
+     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+ }
+ 
+ set MAIN "main"
+ if {[istarget "hppa*-*-hpux*"]} { set MAIN "_MAIN_"}
+ 
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+ 
+ #
+ # set it up at a breakpoint so we can play with the variable values
+ #
+ 
+ if ![runto $MAIN ] {
+     perror "couldn't run to breakpoint $MAIN"
+     continue
+ }
+ 
+ # set up break points and get to first breakpoint
+ 
+ gdb_test "break 7" \
+     "Breakpoint $decimal at $hex: file .*$srcfile, line 7." \
+     "break in $MAIN:7"
+ 
+ gdb_test "break 9" \
+     "Breakpoint $decimal at $hex: file .*$srcfile, line 9." \
+     "break in $MAIN:9"
+ 
+ gdb_test "break 18" \
+     "Breakpoint $decimal at $hex: file .*$srcfile, line 18." \
+     "break in subf:18"
+ 
+ gdb_test "break 20" \
+     "Breakpoint $decimal at $hex: file .*$srcfile, line 20." \
+     "break in subf:20"
+ 
+ gdb_test "break 28" \
+     "Breakpoint $decimal at $hex: file .*$srcfile, line 28." \
+     "break in subg:28"
+ 
+ gdb_test "break 30" \
+     "Breakpoint $decimal at $hex: file .*$srcfile, line 30." \
+     "break in subg:30"
+ 
+ # verify contents of variable a
+ gdb_test "continue" \
+     "Continuing.*Breakpoint $decimal, $MAIN \\(.*\\) at .*$srcfile:7.*" \
+     "continue to $MAIN:7"
+ 
+ gdb_test "print a" \
+     " = 3" \
+     "print a after assignment"
+ 
+ gdb_test "continue" \
+     "Continuing.*Breakpoint $decimal, subf \\(\\) at .*$srcfile:18.*" \
+     "continue to subf:18"
+ 
+ # start testing info common command
+ 
+ gdb_test "info common" \
+     "All COMMON blocks visible at this level:\r\n\r\n_BLNK" \
+     "subf: info common"
+ 
+ gdb_test "info common _BLNK" \
+     "Contents of COMMON block '_BLNK':\r\n\r\n.*a = 4" \
+     "subf: info common _BLNK"
+ 
+ gdb_test "info common notaname" \
+     "Cannot locate the common block notaname in function 'subf'" \
+     "subf: info common notaname"
+ 
+ # continue to subg
+ 
+ gdb_test "continue" \
+     "Continuing.*Breakpoint $decimal, subg \\(\\) at .*$srcfile:28.*" \
+     "continue to subg:28"
+ 
+ gdb_test "info common" \
+     "All COMMON blocks visible at this level:\r\n\r\n_BLNK" \
+     "subg: info common"
+ 
+ gdb_test "info common _BLNK" \
+     "Contents of COMMON block '_BLNK':\r\n\r\n.*a = 4" \
+     "subg: info common _BLNK prior to modifying a"
+ 
+ gdb_test "continue" \
+     "Continuing.*Breakpoint $decimal, subg \\(\\) at .*$srcfile:30.*" \
+     "continue to subg:30"
+ 
+ gdb_test "info common _BLNK" \
+     "Contents of COMMON block '_BLNK':\r\n\r\n.*a = 5" \
+     "subg: info common _BLNK after modifying a"
+ 
+ # return to subf
+ gdb_test "continue" \
+     "Continuing.*Breakpoint $decimal, subf \\(\\) at .*$srcfile:20.*" \
+     "continue to subf:20"
+ 
+ gdb_test "info common _BLNK" \
+     "Contents of COMMON block '_BLNK':\r\n\r\n.*a = 5" \
+     "subf: info common _BLNK after call to subg"
+ 
+ # return to main
+ gdb_test "continue" \
+     "Continuing.*Breakpoint $decimal, $MAIN \\(.*\\) at .*$srcfile:9.*" \
+     "continue to $MAIN:9"
+ 
+ gdb_test "print a" \
+     " = 3" \
+     "print a after call to subf"
+ 
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/common.f gdb/testsuite/gdb.fortran/common.f
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/common.f	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/common.f	Thu Jul 22 17:49:53 1999
***************
*** 0 ****
--- 1,32 ----
+ C Test for common -- a in main is not in the same common block as are the 
+ C a's in subf and subg
+ 
+        integer ::a = 0
+ 
+        a=3
+        print *, "main::a =", a
+        call subf()
+        print *, "main::a =", a
+        end
+ 
+ 
+        subroutine subf()
+        integer a
+        common a
+ 
+        a=4
+        print *, "subf::a =", a
+        call subg()
+        print *, "subf::a =", a
+        return
+        end
+ 
+        subroutine subg()
+        integer a
+        common a
+ 
+        print *, "subg::a =", a
+        a=5
+        print *, "subg::a =", a
+        return
+        end
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/common1.exp gdb/testsuite/gdb.fortran/common1.exp
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/common1.exp	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/common1.exp	Thu Jul 22 17:49:53 1999
***************
*** 0 ****
--- 1,147 ----
+ # This file was written by Sue Kimura. (sue_kimura@hp.com)
+ #
+ # Fortran common test
+ #
+ # Source file: common1.f
+ 
+ if { ![istarget "hppa*-*-hpux*"] } {
+     return 0
+ }
+ 
+ if $tracelevel {
+     strace $tracelevel
+ }
+ 
+ #
+ # test running programs
+ #
+ set prms_id 0
+ set bug_id 0
+ 
+ set testfile "common1"
+ set srcfile ${testfile}.f
+ set binfile ${objdir}/${subdir}/${testfile}
+ 
+ if {[gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" executable {debug f77}] != ""} {
+     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+ }
+ 
+ set MAIN "main"
+ if {[istarget "hppa*-*-hpux*"]} { set MAIN "_MAIN_"}
+ 
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+ 
+ #
+ # set it up at a breakpoint so we can play with the variable values
+ #
+ 
+ if ![runto $MAIN ] {
+     perror "couldn't run to breakpoint $MAIN"
+     continue
+ }
+ 
+ # set up break points and get to first breakpoint
+ 
+ gdb_test "break 8" \
+     "Breakpoint $decimal at $hex: file .*$srcfile, line 8." \
+     "break in $MAIN:8"
+ 
+ gdb_test "break 10" \
+     "Breakpoint $decimal at $hex: file .*$srcfile, line 10." \
+     "break in $MAIN:10"
+ 
+ gdb_test "break 18" \
+     "Breakpoint $decimal at $hex: file .*$srcfile, line 18." \
+     "break in subf:18"
+ 
+ gdb_test "break 20" \
+     "Breakpoint $decimal at $hex: file .*$srcfile, line 20." \
+     "break in subf:20"
+ 
+ gdb_test "break 22" \
+     "Breakpoint $decimal at $hex: file .*$srcfile, line 22." \
+     "break in subf:22"
+ 
+ gdb_test "break 31" \
+     "Breakpoint $decimal at $hex: file .*$srcfile, line 31." \
+     "break in subg:31"
+ 
+ gdb_test "break 33" \
+     "Breakpoint $decimal at $hex: file .*$srcfile, line 33." \
+     "break in subg:33"
+ 
+ # try info command in $MAIN
+ gdb_test "continue" \
+     "Continuing.*Breakpoint $decimal, $MAIN \\(.*\\) at .*$srcfile:8.*" \
+     "continue to $MAIN:8"
+ 
+ gdb_test "info common" \
+     "All COMMON blocks visible at this level:\r\n\r\n_BLNK" \
+     "$MAIN: info common"
+ 
+ gdb_test "info common _BLNK" \
+     "Contents of COMMON block '_BLNK':\r\n\r\n.*a = 3" \
+     "$MAIN: info common _BLNK"
+ 
+ # continue to subf
+ 
+ gdb_test "continue" \
+     "Continuing.*Breakpoint $decimal, subf \\(\\) at .*$srcfile:18.*" \
+     "continue to subf:18"
+ 
+ gdb_test "info common" \
+     "All COMMON blocks visible at this level:\r\n\r\n_BLNK" \
+     "subf: info common"
+ 
+ gdb_test "info common _BLNK" \
+     "Contents of COMMON block '_BLNK':\r\n\r\n.*a = 3" \
+     "subf: info common _BLNK on entering subf"
+ 
+ gdb_test "continue" \
+     "Continuing.*Breakpoint $decimal, subf \\(\\) at .*$srcfile:20.*" \
+     "continue to subf:20"
+ 
+ gdb_test "info common _BLNK" \
+     "Contents of COMMON block '_BLNK':\r\n\r\n.*a = 4" \
+     "subf: info common _BLNK after assignment"
+ 
+ # continue to subg
+ 
+ gdb_test "continue" \
+     "Continuing.*Breakpoint $decimal, subg \\(\\) at .*$srcfile:31.*" \
+     "continue to subg:31"
+ 
+ gdb_test "info common" \
+     "All COMMON blocks visible at this level:\r\n\r\n_BLNK" \
+     "subg: info common on entering subg"
+ 
+ gdb_test "continue" \
+     "Continuing.*Breakpoint $decimal, subg \\(\\) at .*$srcfile:33.*" \
+     "continue to subg:33"
+ 
+ gdb_test "info common _BLNK" \
+     "Contents of COMMON block '_BLNK':\r\n\r\n.*a = 5" \
+     "subg: info common _BLNK after modifying a"
+ 
+ # return to subf
+ gdb_test "continue" \
+     "Continuing.*Breakpoint $decimal, subf \\(\\) at .*$srcfile:22.*" \
+     "continue to subf:22"
+ 
+ gdb_test "info common _BLNK" \
+     "Contents of COMMON block '_BLNK':\r\n\r\n.*a = 5" \
+     "subf: info common _BLNK after call to subg"
+ 
+ # return to main
+ 
+ gdb_test "continue" \
+     "Continuing.*Breakpoint $decimal, $MAIN \\(.*\\) at .*$srcfile:10.*" \
+     "continue to $MAIN:10"
+ 
+ gdb_test "info common _BLNK" \
+     "Contents of COMMON block '_BLNK':\r\n\r\n.*a = 5" \
+     "$MAIN: info common _BLNK after call to subf"
+ 
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/common1.f gdb/testsuite/gdb.fortran/common1.f
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/common1.f	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/common1.f	Thu Jul 22 17:49:53 1999
***************
*** 0 ****
--- 1,35 ----
+ C Similar test to common.f, but here a in _MAIN_ is also in the
+ C same common block as the a's in subf and subg
+ 
+        integer a
+        common a
+ 
+        a=3
+        print *, "main::a =", a
+        call subf()
+        print *, "main::a =", a
+        end
+ 
+ 
+        subroutine subf()
+        integer a
+        common a
+ 
+        print *, "subf::a =", a
+        a=4
+        print *, "subf::a =", a
+        call subg()
+        print *, "subf::a =", a
+        return
+        end
+ 
+ 
+        subroutine subg()
+        integer a
+        common a
+ 
+        print *, "subg::a =", a
+        a=5
+        print *, "subg::a =", a
+        return
+        end
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/common2.exp gdb/testsuite/gdb.fortran/common2.exp
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/common2.exp	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/common2.exp	Thu Jul 22 17:49:53 1999
***************
*** 0 ****
--- 1,147 ----
+ # This file was written by Sue Kimura. (sue_kimura@hp.com)
+ #
+ # Fortran common test
+ #
+ # Source file: common2.f
+ 
+ if { ![istarget "hppa*-*-hpux*"] } {
+     return 0
+ }
+ 
+ if $tracelevel {
+     strace $tracelevel
+ }
+ 
+ #
+ # test running programs
+ #
+ set prms_id 0
+ set bug_id 0
+ 
+ set testfile "common2"
+ set srcfile ${testfile}.f
+ set binfile ${objdir}/${subdir}/${testfile}
+ 
+ if [get_compiler_info ${binfile} f77] {
+     return -1
+ }
+ 
+ if { ! $hp_f77_compiler && ! $hp_f90_compiler } {
+     return 0
+ }
+ 
+ if {[gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" executable {debug f77}] != ""} {
+     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+ }
+ 
+ set MAIN "main"
+ if {[istarget "hppa*-*-hpux*"]} { set MAIN "_MAIN_"}
+ 
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+ 
+ #
+ # set it up at a breakpoint so we can play with the variable values
+ #
+ 
+ if ![runto $MAIN ] {
+     perror "couldn't run to breakpoint $MAIN"
+     continue
+ }
+ 
+ # set up break points and get to first breakpoint
+ 
+ gdb_test "break 7" \
+     "Breakpoint $decimal at $hex: file .*$srcfile, line 7." \
+     "break in $MAIN:7"
+ 
+ gdb_test "break 9" \
+     "Breakpoint $decimal at $hex: file .*$srcfile, line 9." \
+     "break in $MAIN:9"
+ 
+ gdb_test "break 18" \
+     "Breakpoint $decimal at $hex: file .*$srcfile, line 18." \
+     "break in subh:18"
+ 
+ gdb_test "break 20" \
+     "Breakpoint $decimal at $hex: file .*$srcfile, line 20." \
+     "break in subh:20"
+ 
+ gdb_test "break 29" \
+     "Breakpoint $decimal at $hex: file .*$srcfile, line 29." \
+     "break in subi:29"
+ 
+ gdb_test "break 31" \
+     "Breakpoint $decimal at $hex: file .*$srcfile, line 31." \
+     "break in subi:31"
+ 
+ # try info command in $MAIN
+ gdb_test "continue" \
+     "Continuing.*Breakpoint $decimal, $MAIN \\(.*\\) at .*$srcfile:7.*" \
+     "continue to $MAIN:7"
+ 
+ gdb_test "info common" \
+     "All COMMON blocks visible at this level:\r\n\r\n_BLNK" \
+     "$MAIN: info common"
+ 
+ gdb_test "info common _BLNK" \
+     "Contents of COMMON block '_BLNK':\r\n\r\n.*a = 3" \
+     "$MAIN: info common _BLNK"
+ 
+ # continue to subh
+ 
+ gdb_test "continue" \
+     "Continuing.*Breakpoint $decimal, subh \\(\\) at .*$srcfile:18.*" \
+     "continue to subh:18"
+ 
+ gdb_test "info common" \
+     "All COMMON blocks visible at this level:\r\n\r\nc" \
+     "subh: info common"
+ 
+ gdb_test "info common c" \
+     "Contents of COMMON block 'c':\r\n\r\n.*a = 6" \
+     "subh: info common c"
+ 
+ # continue to subi
+ 
+ gdb_test "continue" \
+     "Continuing.*Breakpoint $decimal, subi \\(\\) at .*$srcfile:29.*" \
+     "continue to subi:29"
+ 
+ gdb_test "info common" \
+     "All COMMON blocks visible at this level:\r\n\r\nc" \
+     "subi: info common"
+ 
+ gdb_test "info common c" \
+     "Contents of COMMON block 'c':\r\n\r\n.*a = 8.40779079e-45" \
+     "subh: info common c on entering subi"
+ 
+ gdb_test "continue" \
+     "Continuing.*Breakpoint $decimal, subi \\(\\) at .*$srcfile:31.*" \
+     "continue to subi:31"
+ 
+ gdb_test "info common c" \
+     "Contents of COMMON block 'c':\r\n\r\n.*a = 7.5" \
+     "subh: info common c after assignment"
+ 
+ # return to subh
+ 
+ gdb_test "continue" \
+     "Continuing.*Breakpoint $decimal, subh \\(\\) at .*$srcfile:20.*" \
+     "continue to subh:20"
+ 
+ gdb_test "info common c" \
+     "Contents of COMMON block 'c':\r\n\r\n.*a = 1089470464" \
+     "subh: info common c after call to subi"
+ 
+ # return to main
+ 
+ gdb_test "continue" \
+     "Continuing.*Breakpoint $decimal, $MAIN \\(.*\\) at .*$srcfile:9.*" \
+     "continue to $MAIN:9"
+ 
+ gdb_test "info common _BLNK" \
+     "Contents of COMMON block '_BLNK':\r\n\r\n.*a = 3" \
+     "$MAIN: info common _BLNK after call to subh"
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/common2.f gdb/testsuite/gdb.fortran/common2.f
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/common2.f	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/common2.f	Thu Jul 22 17:49:54 1999
***************
*** 0 ****
--- 1,33 ----
+ C subh and subi use common "c" but with different types for a
+ 
+        integer a
+        common a
+ 
+        a=3
+        print *, "main::a =", a
+        call subh()
+        print *, "main::a =", a
+        end
+ 
+ 
+        subroutine subh()
+        integer a
+        common /c/ a
+ 
+        a=6
+        print *, "subh::a =", a
+        call subi()
+        print *, "subh::a =", a
+        return
+        end
+ 
+ 
+        subroutine subi()
+        real a
+        common /c/ a
+ 
+        print *, "subi::a =", a
+        a=7.5
+        print *, "subi::a =", a
+        return
+        end
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/common3.exp gdb/testsuite/gdb.fortran/common3.exp
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/common3.exp	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/common3.exp	Thu Jul 22 17:49:54 1999
***************
*** 0 ****
--- 1,120 ----
+ # This file was written by Sue Kimura. (sue_kimura@hp.com)
+ #
+ # Fortran common test
+ #
+ # Source file: common3.f
+ 
+ if { ![istarget "hppa*-*-hpux*"] } {
+     return 0
+ }
+ 
+ if $tracelevel {
+     strace $tracelevel
+ }
+ 
+ #
+ # test running programs
+ #
+ set prms_id 0
+ set bug_id 0
+ 
+ set testfile "common3"
+ set srcfile ${testfile}.f
+ set binfile ${objdir}/${subdir}/${testfile}
+ 
+ if [get_compiler_info ${binfile} f77] {
+     return -1
+ }
+ 
+ if { ! $hp_f77_compiler && ! $hp_f90_compiler } {
+     return 0
+ }
+ 
+ if {[gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" executable {debug f77}] != ""} {
+     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+ }
+ 
+ set MAIN "main"
+ if {[istarget "hppa*-*-hpux*"]} { set MAIN "_MAIN_"}
+ 
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+ 
+ #
+ # set it up at a breakpoint so we can play with the variable values
+ #
+ 
+ if ![runto $MAIN ] {
+     perror "couldn't run to breakpoint $MAIN"
+     continue
+ }
+ 
+ # set up break points and get to first breakpoint
+ 
+ gdb_test "break 9" \
+     "Breakpoint $decimal at $hex: file .*$srcfile, line 9." \
+     "break in $MAIN:9"
+ 
+ gdb_test "break 12" \
+     "Breakpoint $decimal at $hex: file .*$srcfile, line 12." \
+     "break in $MAIN:12"
+ 
+ gdb_test "break 34" \
+     "Breakpoint $decimal at $hex: file .*$srcfile, line 34." \
+     "break in f:34"
+ 
+ gdb_test "break 43" \
+     "Breakpoint $decimal at $hex: file .*$srcfile, line 43." \
+     "break in f:43"
+ 
+ # try info command in $MAIN
+ 
+ gdb_test "continue" \
+     "Continuing.*Breakpoint $decimal, $MAIN \\(.*\\) at .*$srcfile:9.*" \
+     "continue to $MAIN:9"
+ 
+ gdb_test "info common" \
+     "All COMMON blocks visible at this level:\r\n\r\n_BLNK" \
+     "$MAIN: info common"
+ 
+ gdb_test "info common _BLNK" \
+     "Contents of COMMON block '_BLNK':\r\n\r\na = 3\r\nb = 4" \
+     "$MAIN: info common _BLNK"
+ 
+ # continue to function f
+ 
+ gdb_test "continue" \
+     "Continuing.*Breakpoint $decimal, f \\(\\) at .*$srcfile:34.*" \
+     "continue to f:34"
+ 
+ gdb_test "info common" \
+     "All COMMON blocks visible at this level:\r\n\r\n(_BLNK\r\nbcommon|bcommon\r\n_BLNK)" \
+   "f: info common"
+ 
+ gdb_test "info common _BLNK" \
+     "Contents of COMMON block '_BLNK':\r\n\r\n.*a = 3" \
+     "f: info common _BLNK"
+ 
+ gdb_test "continue" \
+     "Continuing.*Breakpoint $decimal, f \\(\\) at .*$srcfile:43.*" \
+     "continue to f:43"
+ 
+ gdb_test "info common _BLNK" \
+     "Contents of COMMON block '_BLNK':\r\n\r\na = 5" \
+     "f: info common _BLNK after assignments "
+ 
+ gdb_test "info common bcommon" \
+     "Contents of COMMON block 'bcommon':\r\n\r\nb1 = 55\r\nb2 = 66" \
+     "f: info common bcommon"
+ 
+ # return to main
+ 
+ gdb_test "continue" \
+     "Continuing.*Breakpoint $decimal, $MAIN \\(.*\\) at .*$srcfile:12.*" \
+     "continue to main:12"
+ 
+ gdb_test "info common _BLNK" \
+     "Contents of COMMON block '_BLNK':\r\n\r\na = 5\r\nb = 4" \
+     "$MAIN: info common _BLNK after call to f"
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/common3.f gdb/testsuite/gdb.fortran/common3.f
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/common3.f	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/common3.f	Thu Jul 22 17:49:54 1999
***************
*** 0 ****
--- 1,48 ----
+ C Test with multiple variables in a common block
+ 
+        integer a
+        integer b
+        common a, b
+ 
+        a=3
+        b=4
+        print *, 'main: a=', a
+        print *, 'main: b=', b
+        call f()
+        print *, 'main: a=', a
+        print *, 'main: b=', b
+        end
+ 
+ 
+        subroutine f()
+        integer z
+ 
+        integer a
+        common a
+ 
+        integer b
+        integer y
+ 
+        integer b1
+        common /bcommon/ b1
+ 
+        integer x 
+ 
+        integer b2 
+        common /bcommon/ b2 
+ 
+        print *, 'f: a=', a
+        print *, 'f: b=', b
+        z  = 100
+        a  = 5
+        b  = 6
+        y  = 200
+        b1 = 55
+        x  = 100
+        b2 = 66
+        print *, 'f: a=', a
+        print *, 'f: b=', b
+        print *, 'f: b1=', b1
+        print *, 'f: b2=', b2
+        return
+        end
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/configure gdb/testsuite/gdb.fortran/configure
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/configure	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/configure	Thu Jul 22 17:49:54 1999
***************
*** 0 ****
--- 1,899 ----
+ #! /bin/sh
+ 
+ # Guess values for system-dependent variables and create Makefiles.
+ # Generated automatically using autoconf version 2.12.1 
+ # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+ #
+ # This configure script is free software; the Free Software Foundation
+ # gives unlimited permission to copy, distribute and modify it.
+ 
+ # Defaults:
+ ac_help=
+ ac_default_prefix=/usr/local
+ # Any additions from configure.in:
+ 
+ # Initialize some variables set by options.
+ # The variables have the same names as the options, with
+ # dashes changed to underlines.
+ build=NONE
+ cache_file=./config.cache
+ exec_prefix=NONE
+ host=NONE
+ no_create=
+ nonopt=NONE
+ no_recursion=
+ prefix=NONE
+ program_prefix=NONE
+ program_suffix=NONE
+ program_transform_name=s,x,x,
+ silent=
+ site=
+ srcdir=
+ target=NONE
+ verbose=
+ x_includes=NONE
+ x_libraries=NONE
+ bindir='${exec_prefix}/bin'
+ sbindir='${exec_prefix}/sbin'
+ libexecdir='${exec_prefix}/libexec'
+ datadir='${prefix}/share'
+ sysconfdir='${prefix}/etc'
+ sharedstatedir='${prefix}/com'
+ localstatedir='${prefix}/var'
+ libdir='${exec_prefix}/lib'
+ includedir='${prefix}/include'
+ oldincludedir='/usr/include'
+ infodir='${prefix}/info'
+ mandir='${prefix}/man'
+ 
+ # Initialize some other variables.
+ subdirs=
+ MFLAGS= MAKEFLAGS=
+ SHELL=${CONFIG_SHELL-/bin/sh}
+ # Maximum number of lines to put in a shell here document.
+ ac_max_here_lines=12
+ 
+ ac_prev=
+ for ac_option
+ do
+ 
+   # If the previous option needs an argument, assign it.
+   if test -n "$ac_prev"; then
+     eval "$ac_prev=\$ac_option"
+     ac_prev=
+     continue
+   fi
+ 
+   case "$ac_option" in
+   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+   *) ac_optarg= ;;
+   esac
+ 
+   # Accept the important Cygnus configure options, so we can diagnose typos.
+ 
+   case "$ac_option" in
+ 
+   -bindir | --bindir | --bindi | --bind | --bin | --bi)
+     ac_prev=bindir ;;
+   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+     bindir="$ac_optarg" ;;
+ 
+   -build | --build | --buil | --bui | --bu)
+     ac_prev=build ;;
+   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+     build="$ac_optarg" ;;
+ 
+   -cache-file | --cache-file | --cache-fil | --cache-fi \
+   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+     ac_prev=cache_file ;;
+   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+     cache_file="$ac_optarg" ;;
+ 
+   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+     ac_prev=datadir ;;
+   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+   | --da=*)
+     datadir="$ac_optarg" ;;
+ 
+   -disable-* | --disable-*)
+     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+     # Reject names that are not valid shell variable names.
+     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+     fi
+     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+     eval "enable_${ac_feature}=no" ;;
+ 
+   -enable-* | --enable-*)
+     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+     # Reject names that are not valid shell variable names.
+     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+     fi
+     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+     case "$ac_option" in
+       *=*) ;;
+       *) ac_optarg=yes ;;
+     esac
+     eval "enable_${ac_feature}='$ac_optarg'" ;;
+ 
+   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+   | --exec | --exe | --ex)
+     ac_prev=exec_prefix ;;
+   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+   | --exec=* | --exe=* | --ex=*)
+     exec_prefix="$ac_optarg" ;;
+ 
+   -gas | --gas | --ga | --g)
+     # Obsolete; use --with-gas.
+     with_gas=yes ;;
+ 
+   -help | --help | --hel | --he)
+     # Omit some internal or obsolete options to make the list less imposing.
+     # This message is too long to be a string in the A/UX 3.1 sh.
+     cat << EOF
+ Usage: configure [options] [host]
+ Options: [defaults in brackets after descriptions]
+ Configuration:
+   --cache-file=FILE       cache test results in FILE
+   --help                  print this message
+   --no-create             do not create output files
+   --quiet, --silent       do not print \`checking...' messages
+   --version               print the version of autoconf that created configure
+ Directory and file names:
+   --prefix=PREFIX         install architecture-independent files in PREFIX
+                           [$ac_default_prefix]
+   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                           [same as prefix]
+   --bindir=DIR            user executables in DIR [EPREFIX/bin]
+   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
+   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
+   --datadir=DIR           read-only architecture-independent data in DIR
+                           [PREFIX/share]
+   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
+   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
+                           [PREFIX/com]
+   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
+   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
+   --includedir=DIR        C header files in DIR [PREFIX/include]
+   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
+   --infodir=DIR           info documentation in DIR [PREFIX/info]
+   --mandir=DIR            man documentation in DIR [PREFIX/man]
+   --srcdir=DIR            find the sources in DIR [configure dir or ..]
+   --program-prefix=PREFIX prepend PREFIX to installed program names
+   --program-suffix=SUFFIX append SUFFIX to installed program names
+   --program-transform-name=PROGRAM
+                           run sed PROGRAM on installed program names
+ EOF
+     cat << EOF
+ Host type:
+   --build=BUILD           configure for building on BUILD [BUILD=HOST]
+   --host=HOST             configure for HOST [guessed]
+   --target=TARGET         configure for TARGET [TARGET=HOST]
+ Features and packages:
+   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+   --x-includes=DIR        X include files are in DIR
+   --x-libraries=DIR       X library files are in DIR
+ EOF
+     if test -n "$ac_help"; then
+       echo "--enable and --with options recognized:$ac_help"
+     fi
+     exit 0 ;;
+ 
+   -host | --host | --hos | --ho)
+     ac_prev=host ;;
+   -host=* | --host=* | --hos=* | --ho=*)
+     host="$ac_optarg" ;;
+ 
+   -includedir | --includedir | --includedi | --included | --include \
+   | --includ | --inclu | --incl | --inc)
+     ac_prev=includedir ;;
+   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+   | --includ=* | --inclu=* | --incl=* | --inc=*)
+     includedir="$ac_optarg" ;;
+ 
+   -infodir | --infodir | --infodi | --infod | --info | --inf)
+     ac_prev=infodir ;;
+   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+     infodir="$ac_optarg" ;;
+ 
+   -libdir | --libdir | --libdi | --libd)
+     ac_prev=libdir ;;
+   -libdir=* | --libdir=* | --libdi=* | --libd=*)
+     libdir="$ac_optarg" ;;
+ 
+   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+   | --libexe | --libex | --libe)
+     ac_prev=libexecdir ;;
+   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+   | --libexe=* | --libex=* | --libe=*)
+     libexecdir="$ac_optarg" ;;
+ 
+   -localstatedir | --localstatedir | --localstatedi | --localstated \
+   | --localstate | --localstat | --localsta | --localst \
+   | --locals | --local | --loca | --loc | --lo)
+     ac_prev=localstatedir ;;
+   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+     localstatedir="$ac_optarg" ;;
+ 
+   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+     ac_prev=mandir ;;
+   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+     mandir="$ac_optarg" ;;
+ 
+   -nfp | --nfp | --nf)
+     # Obsolete; use --without-fp.
+     with_fp=no ;;
+ 
+   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+   | --no-cr | --no-c)
+     no_create=yes ;;
+ 
+   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+     no_recursion=yes ;;
+ 
+   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+   | --oldin | --oldi | --old | --ol | --o)
+     ac_prev=oldincludedir ;;
+   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+     oldincludedir="$ac_optarg" ;;
+ 
+   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+     ac_prev=prefix ;;
+   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+     prefix="$ac_optarg" ;;
+ 
+   -program-prefix | --program-prefix | --program-prefi | --program-pref \
+   | --program-pre | --program-pr | --program-p)
+     ac_prev=program_prefix ;;
+   -program-prefix=* | --program-prefix=* | --program-prefi=* \
+   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+     program_prefix="$ac_optarg" ;;
+ 
+   -program-suffix | --program-suffix | --program-suffi | --program-suff \
+   | --program-suf | --program-su | --program-s)
+     ac_prev=program_suffix ;;
+   -program-suffix=* | --program-suffix=* | --program-suffi=* \
+   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+     program_suffix="$ac_optarg" ;;
+ 
+   -program-transform-name | --program-transform-name \
+   | --program-transform-nam | --program-transform-na \
+   | --program-transform-n | --program-transform- \
+   | --program-transform | --program-transfor \
+   | --program-transfo | --program-transf \
+   | --program-trans | --program-tran \
+   | --progr-tra | --program-tr | --program-t)
+     ac_prev=program_transform_name ;;
+   -program-transform-name=* | --program-transform-name=* \
+   | --program-transform-nam=* | --program-transform-na=* \
+   | --program-transform-n=* | --program-transform-=* \
+   | --program-transform=* | --program-transfor=* \
+   | --program-transfo=* | --program-transf=* \
+   | --program-trans=* | --program-tran=* \
+   | --progr-tra=* | --program-tr=* | --program-t=*)
+     program_transform_name="$ac_optarg" ;;
+ 
+   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+   | -silent | --silent | --silen | --sile | --sil)
+     silent=yes ;;
+ 
+   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+     ac_prev=sbindir ;;
+   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+   | --sbi=* | --sb=*)
+     sbindir="$ac_optarg" ;;
+ 
+   -sharedstatedir | --sharedstatedir | --sharedstatedi \
+   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+   | --sharedst | --shareds | --shared | --share | --shar \
+   | --sha | --sh)
+     ac_prev=sharedstatedir ;;
+   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+   | --sha=* | --sh=*)
+     sharedstatedir="$ac_optarg" ;;
+ 
+   -site | --site | --sit)
+     ac_prev=site ;;
+   -site=* | --site=* | --sit=*)
+     site="$ac_optarg" ;;
+ 
+   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+     ac_prev=srcdir ;;
+   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+     srcdir="$ac_optarg" ;;
+ 
+   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+   | --syscon | --sysco | --sysc | --sys | --sy)
+     ac_prev=sysconfdir ;;
+   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+     sysconfdir="$ac_optarg" ;;
+ 
+   -target | --target | --targe | --targ | --tar | --ta | --t)
+     ac_prev=target ;;
+   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+     target="$ac_optarg" ;;
+ 
+   -v | -verbose | --verbose | --verbos | --verbo | --verb)
+     verbose=yes ;;
+ 
+   -version | --version | --versio | --versi | --vers)
+     echo "configure generated by autoconf version 2.12.1"
+     exit 0 ;;
+ 
+   -with-* | --with-*)
+     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+     # Reject names that are not valid shell variable names.
+     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+     fi
+     ac_package=`echo $ac_package| sed 's/-/_/g'`
+     case "$ac_option" in
+       *=*) ;;
+       *) ac_optarg=yes ;;
+     esac
+     eval "with_${ac_package}='$ac_optarg'" ;;
+ 
+   -without-* | --without-*)
+     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+     # Reject names that are not valid shell variable names.
+     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+     fi
+     ac_package=`echo $ac_package| sed 's/-/_/g'`
+     eval "with_${ac_package}=no" ;;
+ 
+   --x)
+     # Obsolete; use --with-x.
+     with_x=yes ;;
+ 
+   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+   | --x-incl | --x-inc | --x-in | --x-i)
+     ac_prev=x_includes ;;
+   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+     x_includes="$ac_optarg" ;;
+ 
+   -x-libraries | --x-libraries | --x-librarie | --x-librari \
+   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+     ac_prev=x_libraries ;;
+   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+     x_libraries="$ac_optarg" ;;
+ 
+   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+     ;;
+ 
+   *)
+     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+       echo "configure: warning: $ac_option: invalid host type" 1>&2
+     fi
+     if test "x$nonopt" != xNONE; then
+       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+     fi
+     nonopt="$ac_option"
+     ;;
+ 
+   esac
+ done
+ 
+ if test -n "$ac_prev"; then
+   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+ fi
+ 
+ trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+ 
+ # File descriptor usage:
+ # 0 standard input
+ # 1 file creation
+ # 2 errors and warnings
+ # 3 some systems may open it to /dev/tty
+ # 4 used on the Kubota Titan
+ # 6 checking for... messages and results
+ # 5 compiler messages saved in config.log
+ if test "$silent" = yes; then
+   exec 6>/dev/null
+ else
+   exec 6>&1
+ fi
+ exec 5>./config.log
+ 
+ echo "\
+ This file contains any messages produced by compilers while
+ running configure, to aid debugging if configure makes a mistake.
+ " 1>&5
+ 
+ # Strip out --no-create and --no-recursion so they do not pile up.
+ # Also quote any args containing shell metacharacters.
+ ac_configure_args=
+ for ac_arg
+ do
+   case "$ac_arg" in
+   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+   | --no-cr | --no-c) ;;
+   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+   *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+   esac
+ done
+ 
+ # NLS nuisances.
+ # Only set these to C if already set.  These must not be set unconditionally
+ # because not all systems understand e.g. LANG=C (notably SCO).
+ # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+ # Non-C LC_CTYPE values break the ctype check.
+ if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
+ if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+ if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+ if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
+ 
+ # confdefs.h avoids OS command line length limits that DEFS can exceed.
+ rm -rf conftest* confdefs.h
+ # AIX cpp loses on an empty file, so make sure it contains at least a newline.
+ echo > confdefs.h
+ 
+ # A filename unique to this package, relative to the directory that
+ # configure is in, which we can look for to find out if srcdir is correct.
+ ac_unique_file=types.exp
+ 
+ # Find the source files, if location was not specified.
+ if test -z "$srcdir"; then
+   ac_srcdir_defaulted=yes
+   # Try the directory containing this script, then its parent.
+   ac_prog=$0
+   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+   srcdir=$ac_confdir
+   if test ! -r $srcdir/$ac_unique_file; then
+     srcdir=..
+   fi
+ else
+   ac_srcdir_defaulted=no
+ fi
+ if test ! -r $srcdir/$ac_unique_file; then
+   if test "$ac_srcdir_defaulted" = yes; then
+     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+   else
+     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+   fi
+ fi
+ srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+ 
+ # Prefer explicitly selected file to automatically selected ones.
+ if test -z "$CONFIG_SITE"; then
+   if test "x$prefix" != xNONE; then
+     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+   else
+     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+   fi
+ fi
+ for ac_site_file in $CONFIG_SITE; do
+   if test -r "$ac_site_file"; then
+     echo "loading site script $ac_site_file"
+     . "$ac_site_file"
+   fi
+ done
+ 
+ if test -r "$cache_file"; then
+   echo "loading cache $cache_file"
+   . $cache_file
+ else
+   echo "creating cache $cache_file"
+   > $cache_file
+ fi
+ 
+ ac_ext=c
+ # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ ac_cpp='$CPP $CPPFLAGS'
+ ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+ cross_compiling=$ac_cv_prog_cc_cross
+ 
+ if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+     ac_n= ac_c='
+ ' ac_t='	'
+   else
+     ac_n=-n ac_c= ac_t=
+   fi
+ else
+   ac_n= ac_c='\c' ac_t=
+ fi
+ 
+ 
+ 
+ CC=${CC-cc}
+ 
+ ac_aux_dir=
+ for ac_dir in `cd $srcdir;pwd`/../../.. $srcdir/`cd $srcdir;pwd`/../../..; do
+   if test -f $ac_dir/install-sh; then
+     ac_aux_dir=$ac_dir
+     ac_install_sh="$ac_aux_dir/install-sh -c"
+     break
+   elif test -f $ac_dir/install.sh; then
+     ac_aux_dir=$ac_dir
+     ac_install_sh="$ac_aux_dir/install.sh -c"
+     break
+   fi
+ done
+ if test -z "$ac_aux_dir"; then
+   { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../../.. $srcdir/`cd $srcdir;pwd`/../../.." 1>&2; exit 1; }
+ fi
+ ac_config_guess=$ac_aux_dir/config.guess
+ ac_config_sub=$ac_aux_dir/config.sub
+ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+ 
+ 
+ # Do some error checking and defaulting for the host and target type.
+ # The inputs are:
+ #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
+ #
+ # The rules are:
+ # 1. You are not allowed to specify --host, --target, and nonopt at the
+ #    same time.
+ # 2. Host defaults to nonopt.
+ # 3. If nonopt is not specified, then host defaults to the current host,
+ #    as determined by config.guess.
+ # 4. Target and build default to nonopt.
+ # 5. If nonopt is not specified, then target and build default to host.
+ 
+ # The aliases save the names the user supplied, while $host etc.
+ # will get canonicalized.
+ case $host---$target---$nonopt in
+ NONE---*---* | *---NONE---* | *---*---NONE) ;;
+ *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
+ esac
+ 
+ 
+ # Make sure we can run config.sub.
+ if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
+ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+ fi
+ 
+ echo $ac_n "checking host system type""... $ac_c" 1>&6
+ echo "configure:573: checking host system type" >&5
+ 
+ host_alias=$host
+ case "$host_alias" in
+ NONE)
+   case $nonopt in
+   NONE)
+     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
+     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+     fi ;;
+   *) host_alias=$nonopt ;;
+   esac ;;
+ esac
+ 
+ host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
+ host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+ host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+ echo "$ac_t""$host" 1>&6
+ 
+ echo $ac_n "checking target system type""... $ac_c" 1>&6
+ echo "configure:594: checking target system type" >&5
+ 
+ target_alias=$target
+ case "$target_alias" in
+ NONE)
+   case $nonopt in
+   NONE) target_alias=$host_alias ;;
+   *) target_alias=$nonopt ;;
+   esac ;;
+ esac
+ 
+ target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
+ target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+ target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+ echo "$ac_t""$target" 1>&6
+ 
+ echo $ac_n "checking build system type""... $ac_c" 1>&6
+ echo "configure:612: checking build system type" >&5
+ 
+ build_alias=$build
+ case "$build_alias" in
+ NONE)
+   case $nonopt in
+   NONE) build_alias=$host_alias ;;
+   *) build_alias=$nonopt ;;
+   esac ;;
+ esac
+ 
+ build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
+ build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+ build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+ build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+ echo "$ac_t""$build" 1>&6
+ 
+ test "$host_alias" != "$target_alias" &&
+   test "$program_prefix$program_suffix$program_transform_name" = \
+     NONENONEs,x,x, &&
+   program_prefix=${target_alias}-
+ 
+ 
+ trap '' 1 2 15
+ cat > confcache <<\EOF
+ # This file is a shell script that caches the results of configure
+ # tests run on this system so they can be shared between configure
+ # scripts and configure runs.  It is not useful on other systems.
+ # If it contains results you don't want to keep, you may remove or edit it.
+ #
+ # By default, configure uses ./config.cache as the cache file,
+ # creating it if it does not exist already.  You can give configure
+ # the --cache-file=FILE option to use a different cache file; that is
+ # what configure does when it calls configure scripts in
+ # subdirectories, so they share the cache.
+ # Giving --cache-file=/dev/null disables caching, for debugging configure.
+ # config.status only pays attention to the cache file if you give it the
+ # --recheck option to rerun configure.
+ #
+ EOF
+ # The following way of writing the cache mishandles newlines in values,
+ # but we know of no workaround that is simple, portable, and efficient.
+ # So, don't put newlines in cache variables' values.
+ # Ultrix sh set writes to stderr and can't be redirected directly,
+ # and sets the high bit in the cache file unless we assign to the vars.
+ (set) 2>&1 |
+   case `(ac_space=' '; set) 2>&1 | grep ac_space` in
+   *ac_space=\ *)
+     # `set' does not quote correctly, so add quotes (double-quote substitution
+     # turns \\\\ into \\, and sed turns \\ into \).
+     sed -n \
+       -e "s/'/'\\\\''/g" \
+       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+     ;;
+   *)
+     # `set' quotes correctly as required by POSIX, so do not add quotes.
+     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+     ;;
+   esac >> confcache
+ if cmp -s $cache_file confcache; then
+   :
+ else
+   if test -w $cache_file; then
+     echo "updating cache $cache_file"
+     cat confcache > $cache_file
+   else
+     echo "not updating unwritable cache $cache_file"
+   fi
+ fi
+ rm -f confcache
+ 
+ trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+ 
+ test "x$prefix" = xNONE && prefix=$ac_default_prefix
+ # Let make expand exec_prefix.
+ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+ 
+ # Any assignment to VPATH causes Sun make to only execute
+ # the first set of double-colon rules, so remove it if not needed.
+ # If there is a colon in the path, we need to keep it.
+ if test "x$srcdir" = x.; then
+   ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
+ fi
+ 
+ trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+ 
+ # Transform confdefs.h into DEFS.
+ # Protect against shell expansion while executing Makefile rules.
+ # Protect against Makefile macro expansion.
+ cat > conftest.defs <<\EOF
+ s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
+ s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
+ s%\[%\\&%g
+ s%\]%\\&%g
+ s%\$%$$%g
+ EOF
+ DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
+ rm -f conftest.defs
+ 
+ 
+ # Without the "./", some shells look in PATH for config.status.
+ : ${CONFIG_STATUS=./config.status}
+ 
+ echo creating $CONFIG_STATUS
+ rm -f $CONFIG_STATUS
+ cat > $CONFIG_STATUS <<EOF
+ #! /bin/sh
+ # Generated automatically by configure.
+ # Run this file to recreate the current configuration.
+ # This directory was configured as follows,
+ # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+ #
+ # $0 $ac_configure_args
+ #
+ # Compiler output produced by configure, useful for debugging
+ # configure, is in ./config.log if it exists.
+ 
+ ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+ for ac_option
+ do
+   case "\$ac_option" in
+   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+     echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
+     exit 0 ;;
+   -help | --help | --hel | --he | --h)
+     echo "\$ac_cs_usage"; exit 0 ;;
+   *) echo "\$ac_cs_usage"; exit 1 ;;
+   esac
+ done
+ 
+ ac_given_srcdir=$srcdir
+ 
+ trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+ EOF
+ cat >> $CONFIG_STATUS <<EOF
+ 
+ # Protect against being on the right side of a sed subst in config.status.
+ sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+ $ac_vpsub
+ $extrasub
+ s%@SHELL@%$SHELL%g
+ s%@CFLAGS@%$CFLAGS%g
+ s%@CPPFLAGS@%$CPPFLAGS%g
+ s%@CXXFLAGS@%$CXXFLAGS%g
+ s%@DEFS@%$DEFS%g
+ s%@LDFLAGS@%$LDFLAGS%g
+ s%@LIBS@%$LIBS%g
+ s%@exec_prefix@%$exec_prefix%g
+ s%@prefix@%$prefix%g
+ s%@program_transform_name@%$program_transform_name%g
+ s%@bindir@%$bindir%g
+ s%@sbindir@%$sbindir%g
+ s%@libexecdir@%$libexecdir%g
+ s%@datadir@%$datadir%g
+ s%@sysconfdir@%$sysconfdir%g
+ s%@sharedstatedir@%$sharedstatedir%g
+ s%@localstatedir@%$localstatedir%g
+ s%@libdir@%$libdir%g
+ s%@includedir@%$includedir%g
+ s%@oldincludedir@%$oldincludedir%g
+ s%@infodir@%$infodir%g
+ s%@mandir@%$mandir%g
+ s%@CC@%$CC%g
+ s%@host@%$host%g
+ s%@host_alias@%$host_alias%g
+ s%@host_cpu@%$host_cpu%g
+ s%@host_vendor@%$host_vendor%g
+ s%@host_os@%$host_os%g
+ s%@target@%$target%g
+ s%@target_alias@%$target_alias%g
+ s%@target_cpu@%$target_cpu%g
+ s%@target_vendor@%$target_vendor%g
+ s%@target_os@%$target_os%g
+ s%@build@%$build%g
+ s%@build_alias@%$build_alias%g
+ s%@build_cpu@%$build_cpu%g
+ s%@build_vendor@%$build_vendor%g
+ s%@build_os@%$build_os%g
+ 
+ CEOF
+ EOF
+ 
+ cat >> $CONFIG_STATUS <<\EOF
+ 
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ ac_file=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=""
+ while $ac_more_lines; do
+   if test $ac_beg -gt 1; then
+     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+   else
+     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+   fi
+   if test ! -s conftest.s$ac_file; then
+     ac_more_lines=false
+     rm -f conftest.s$ac_file
+   else
+     if test -z "$ac_sed_cmds"; then
+       ac_sed_cmds="sed -f conftest.s$ac_file"
+     else
+       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+     fi
+     ac_file=`expr $ac_file + 1`
+     ac_beg=$ac_end
+     ac_end=`expr $ac_end + $ac_max_sed_cmds`
+   fi
+ done
+ if test -z "$ac_sed_cmds"; then
+   ac_sed_cmds=cat
+ fi
+ EOF
+ 
+ cat >> $CONFIG_STATUS <<EOF
+ 
+ CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
+ EOF
+ cat >> $CONFIG_STATUS <<\EOF
+ for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+   case "$ac_file" in
+   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+   *) ac_file_in="${ac_file}.in" ;;
+   esac
+ 
+   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+ 
+   # Remove last slash and all that follows it.  Not all systems have dirname.
+   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+     # The file is in a subdirectory.
+     test ! -d "$ac_dir" && mkdir "$ac_dir"
+     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+     # A "../" for each directory in $ac_dir_suffix.
+     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+   else
+     ac_dir_suffix= ac_dots=
+   fi
+ 
+   case "$ac_given_srcdir" in
+   .)  srcdir=.
+       if test -z "$ac_dots"; then top_srcdir=.
+       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+   *) # Relative path.
+     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+     top_srcdir="$ac_dots$ac_given_srcdir" ;;
+   esac
+ 
+ 
+   echo creating "$ac_file"
+   rm -f "$ac_file"
+   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+   case "$ac_file" in
+   *Makefile*) ac_comsub="1i\\
+ # $configure_input" ;;
+   *) ac_comsub= ;;
+   esac
+ 
+   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+   sed -e "$ac_comsub
+ s%@configure_input@%$configure_input%g
+ s%@srcdir@%$srcdir%g
+ s%@top_srcdir@%$top_srcdir%g
+ " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+ fi; done
+ rm -f conftest.s*
+ 
+ EOF
+ cat >> $CONFIG_STATUS <<EOF
+ 
+ EOF
+ cat >> $CONFIG_STATUS <<\EOF
+ 
+ exit 0
+ EOF
+ chmod +x $CONFIG_STATUS
+ rm -fr confdefs* $ac_clean_files
+ test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+ 
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/configure.in gdb/testsuite/gdb.fortran/configure.in
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/configure.in	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/configure.in	Thu Jul 22 17:49:54 1999
***************
*** 0 ****
--- 1,15 ----
+ dnl Process this file file with autoconf to produce a configure script.
+ dnl This file is a shell script fragment that supplies the information
+ dnl necessary to tailor a template configure script into the configure
+ dnl script appropriate for this directory.  For more information, check
+ dnl any existing configure script.
+ 
+ AC_PREREQ(2.5)
+ AC_INIT(types.exp)
+ 
+ CC=${CC-cc}
+ AC_SUBST(CC)
+ AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../../..)
+ AC_CANONICAL_SYSTEM
+ 
+ AC_OUTPUT(Makefile)
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/entry1.exp gdb/testsuite/gdb.fortran/entry1.exp
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/entry1.exp	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/entry1.exp	Thu Jul 22 17:49:55 1999
***************
*** 0 ****
--- 1,145 ----
+ # This file was written by Sue Kimura. (sue_kimura@hp.com)
+ #
+ # Fortran test to verify that entry points work
+ #
+ # Source file: entry1.f
+ 
+ if { ![istarget "hppa*-*-hpux*"] } {
+     return 0
+ }
+ 
+ if $tracelevel {
+     strace $tracelevel
+ }
+ 
+ #
+ # test running programs
+ #
+ set prms_id 0
+ set bug_id 0
+ 
+ set testfile "entry1"
+ set srcfile ${testfile}.f
+ set binfile ${objdir}/${subdir}/${testfile}
+ 
+ if {[istarget "hppa2.0*-*-hpux*"]} {
+     untested "test ignored -- see JAGab14095"
+     continue
+ }
+ 
+ if [get_compiler_info ${binfile} f77] {
+     return -1
+ }
+ 
+ if { ! $hp_f77_compiler && ! $hp_f90_compiler } {
+     return 0
+ }
+ 
+ if {[gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" executable {debug f77}] != ""} {
+     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+ }
+ 
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+ 
+ #
+ # set it up at a breakpoint a manipulate stack
+ gdb_test "break manipulate_stack"
+ if {$hp_f90_compiler} {setup_xfail "hppa*-*-hpux*" JAGab14095}
+ gdb_test "run" \
+     "Starting program:.*$binfile.*Breakpoint $decimal, push \\(value=10\\) at.*$srcfile:$decimal.*IF \\(TOP .EQ. SIZE\\) STOP 'STACK OVERFLOW'" \
+     "run to manipulate_stack"
+ if {$hp_f90_compiler} {setup_xfail "hppa*-*-hpux*" JAGab14095}
+ gdb_test "continue" \
+     "Continuing.*Breakpoint $decimal, push \\(value=15\\) at .*$srcfile:$decimal.*IF \\(TOP .EQ. SIZE\\) STOP 'STACK OVERFLOW'" \
+     "second stop at manipulate_stack"
+ if {$hp_f90_compiler} {setup_xfail "hppa*-*-hpux*" JAGab14095}
+ gdb_test "continue" \
+     "Continuing.*I =  15.*J =  10.*Program exited normally." \
+     "continue from manipulate stack to end of program"
+  
+ # rerun test using entry point PUSH for breakpoint
+ delete_breakpoints
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+ gdb_test "break push"
+ gdb_test "run" \
+     "Starting program:.*$binfile.*Breakpoint $decimal, push \\(value=10\\) at.*$srcfile:$decimal.*IF \\(TOP .EQ. SIZE\\) STOP 'STACK OVERFLOW'" \
+     "run to push"
+ gdb_test "continue" \
+     "Continuing.*Breakpoint $decimal, push \\(value=15\\) at .*$srcfile:$decimal.*IF \\(TOP .EQ. SIZE\\) STOP 'STACK OVERFLOW'" \
+     "second stop at push"
+ gdb_test "break 25" \
+      "Breakpoint $decimal at $hex: file .*$srcfile, line 25." \
+      "break at end of push"
+ gdb_test "continue" \
+      "Continuing.*Breakpoint $decimal, push \\(value=15\\) at .*$srcfile:$decimal.*RETURN" \
+      "continue to end of push"
+ gdb_test "info locals" \
+     "(stack = \\(10, 15.*\\).*top = 2|top = 2.*stack = \\(10, 15.*\\))" \
+     "info locals in push"
+ gdb_test "continue" \
+     "Continuing.*I =  15.*J =  10.*Program exited normally." \
+     "continue from push to end of program"
+  
+ # rerun test using entry point POP for breakpoint
+ delete_breakpoints
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+ gdb_test "break pop"
+ gdb_test "run" \
+     "Starting program:.*$binfile.*Breakpoint $decimal, pop \\(value=.*\\) at.*$srcfile:$decimal.*IF \\(TOP .EQ. 0\\) STOP 'STACK UNDERFLOW'" \
+     "run to pop"
+ gdb_test "continue" \
+     "Continuing.*Breakpoint $decimal, pop \\(value=.*\\) at .*$srcfile:$decimal.*IF \\(TOP .EQ. 0\\) STOP 'STACK UNDERFLOW'" \
+     "second stop at pop"
+ gdb_test "break 32" \
+      "Breakpoint $decimal at $hex: file .*$srcfile, line 32." \
+      "break at end of pop"
+ gdb_test "continue" \
+      "Continuing.*Breakpoint $decimal, pop \\(value=10\\) at .*$srcfile:$decimal.*RETURN" \
+      "continue to end of pop"
+ gdb_test "info locals" \
+     "(stack = \\(10, 15.*\\).*top = 0|top = 0.*stack = \\(10, 15.*\\))" \
+     "info locals in pop"
+ gdb_test "continue" \
+     "Continuing.*I =  15.*J =  10.*Program exited normally." \
+     "continue from pop to end of program"
+ 
+ # rerun test to verify stepping out of entry point functions work
+ # try a breakpoint in entry push
+ delete_breakpoints
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+ gdb_test "break 25" \
+     "Breakpoint $decimal at $hex: file .*$srcfile, line 25." \
+     "break on return in push"
+ gdb_test "run" \
+     "Starting program: $binfile.*Breakpoint $decimal, push \\(value=10\\) at .*$srcfile:25.*RETURN" \
+     "run to return in push"
+ gdb_test "next" ".*END SUBROUTINE MANIPULATE_STACK" "end of push"
+ gdb_test "next" ".*CALL PUSH\\(15\\)" "return to caller from push"
+ 
+ # try a breakpoint in the entry pop
+ delete_breakpoints
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+ 
+ gdb_test "break 32" \
+     "Breakpoint $decimal at $hex: file .*$srcfile, line 32." \
+     "break on return in pop"
+ gdb_test "run" \
+     "Starting program: $binfile.*Breakpoint $decimal, pop \\(value=15\\) at .*$srcfile:32.*RETURN" \
+     "run to return in pop"
+ gdb_test "next" ".*END SUBROUTINE MANIPULATE_STACK" "end of pop"
+ gdb_test "next" ".*CALL POP\\(J\\)" "return to caller from pop"
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/entry1.f gdb/testsuite/gdb.fortran/entry1.f
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/entry1.f	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/entry1.f	Thu Jul 22 17:49:55 1999
***************
*** 0 ****
--- 1,34 ----
+ C Example from HP Fortran/9000 programmer's reference manual
+ 
+       PROGRAM STACK_EXAMPLE
+       CALL PUSH(10)
+       CALL PUSH(15)
+       CALL POP(I)
+       CALL POP(J)
+       PRINT *, "I = ", I
+       PRINT *, "J = ", J
+       END PROGRAM STACK_EXAMPLE
+ 
+       SUBROUTINE MANIPULATE_STACK
+         IMPLICIT NONE
+         INTEGER SIZE, TOP, VALUE
+         PARAMETER (SIZE = 5)
+         INTEGER STACK(SIZE)
+         SAVE STACK, TOP
+         DATA TOP /0/
+ 
+ C PUSH VALUE ONTO THE STACK
+       ENTRY PUSH (VALUE)
+         IF (TOP .EQ. SIZE) STOP 'STACK OVERFLOW'
+         TOP = TOP + 1
+         STACK(TOP) = VALUE
+         RETURN
+ 
+ C POP THE TOP OF THE STACK AND PLACE IN VALUE
+       ENTRY POP (VALUE)
+         IF (TOP .EQ. 0) STOP 'STACK UNDERFLOW'
+         VALUE = STACK(TOP)
+         TOP = TOP - 1
+         RETURN
+       
+       END SUBROUTINE MANIPULATE_STACK
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/entry2.exp gdb/testsuite/gdb.fortran/entry2.exp
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/entry2.exp	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/entry2.exp	Thu Jul 22 17:49:55 1999
***************
*** 0 ****
--- 1,73 ----
+ # This file was written by Sue Kimura. (sue_kimura@hp.com)
+ #
+ # Fortran test to verify that entry points work
+ #
+ # Source file: entry2.f
+ 
+ if { ![istarget "hppa*-*-hpux*"] } {
+     return 0
+ }
+ 
+ if $tracelevel {
+     strace $tracelevel
+ }
+ 
+ #
+ # test running programs
+ #
+ set prms_id 0
+ set bug_id 0
+ 
+ set testfile "entry2"
+ set srcfile ${testfile}.f
+ set binfile ${objdir}/${subdir}/${testfile}
+ 
+ if [get_compiler_info ${binfile} f77] {
+     return -1
+ }
+ 
+ if { ! $hp_f77_compiler && ! $hp_f90_compiler } {
+     return 0
+ }
+ 
+ if {[gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" executable {debug f77}] != ""} {
+     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+ }
+ 
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+ 
+ #
+ # set up a breakpoint at divby
+ gdb_test "break divby"
+ 
+ if {$hp_f90_compiler} {setup_xfail "hppa*-*-hpux*" JAGab14092} 
+ gdb_test "run" \
+     "Starting program:.*$binfile.*Breakpoint $decimal, divby \\(x=12, y=4\\) at.*$srcfile:$decimal.*y = x/y" \
+     "run to divby"
+ gdb_test "info local"  "No locals."  "info local in divby"
+ gdb_test "continue" \
+     "Continuing.*Program exited normally." \
+     "continue to end of program from divby"
+ delete_breakpoints
+  
+ # rerun test using entry point add2 for breakpoint
+ 
+ gdb_test "break add2"
+ setup_xfail "hppa2.0*-*-hpux11*" JAGab14095
+ gdb_test "run" \
+     "Starting program:.*$binfile.*Breakpoint $decimal, add2 \\(x=12\\) at.*$srcfile:$decimal.*x = x\\+2" \
+     "run to add2"
+ # y is local to the subroutine, but probably has a garbage address, so
+ # avoid printing the value; use ptype to show that y is known to the debugger
+ gdb_test "ptype y"  "type = (real\\*8|PTR TO -> \\( real\\*8 \\))"  "ptype of y in add2"
+ setup_xfail "hppa2.0*-*-hpux11*" JAGab14095
+ gdb_test "continue" \
+     "Continuing.*Breakpoint $decimal, add2 \\(x=3\\) at .*$srcfile:$decimal.*x = x\\+2" \
+     "second stop at add2"
+ setup_xfail "hppa2.0*-*-hpux11*" JAGab14095
+ gdb_test "continue" \
+     "Continuing.*Program exited normally." \
+     "continue to end of program from add2"
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/entry2.f gdb/testsuite/gdb.fortran/entry2.f
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/entry2.f	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/entry2.f	Thu Jul 22 17:49:55 1999
***************
*** 0 ****
--- 1,17 ----
+        program entry_point_test
+        real*8 x,y
+        x = 12.0
+        y = 4.0
+        call divby (x,y)
+        write (*,*) 'y = ',y
+        call add2(y)
+        write (*,*) 'y = ',y
+        end
+ 
+        SUBROUTINE divby (x,y)
+        real*8  x,y
+        y = x/y
+        ENTRY add2(x)
+        x = x+2
+        RETURN
+        END
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/exprs.exp gdb/testsuite/gdb.fortran/exprs.exp
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/exprs.exp	Thu Mar  6 14:32:14 1997
--- gdb/testsuite/gdb.fortran/exprs.exp	Thu Jul 22 17:49:51 1999
***************
*** 188,194 ****
      gdb_test "print \$0"	"\\\$8 = 102" \
  	"Print value-history\[MAX\] using explicit index \$0"
  
!     gdb_test "print 108"	"\\\$9 = 108" ""
  
      gdb_test "print \$\$0"	"\\\$10 = 108" \
  	"Print value-history\[MAX\] using explicit index \$\$0"
--- 188,194 ----
      gdb_test "print \$0"	"\\\$8 = 102" \
  	"Print value-history\[MAX\] using explicit index \$0"
  
!     gdb_test "print 108"	"\\\$9 = 108"
  
      gdb_test "print \$\$0"	"\\\$10 = 108" \
  	"Print value-history\[MAX\] using explicit index \$\$0"
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/exprs2.exp gdb/testsuite/gdb.fortran/exprs2.exp
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/exprs2.exp	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/exprs2.exp	Thu Jul 22 17:50:05 1999
***************
*** 0 ****
--- 1,102 ----
+ # Author: Ovidiu Predescu <ovidiu@cup.hp.com>, September, 1998
+ #
+ # Check simple expressions using intrinsic Fortran data types
+ 
+ set testfile "exprs2"
+ set srcfile intrinsics.f
+ set binfile ${objdir}/${subdir}/intrinsics
+ 
+ if [get_compiler_info ${binfile} f77] {
+     return -1
+ }
+ 
+ if { ! $hp_f77_compiler && ! $hp_f90_compiler } {
+     return 0
+ }
+ 
+ proc check_expr {expr type value} {
+     check_expr_expect $expr $type $value pass
+ }
+ 
+ proc check_expr_expect {expr type value expect} {
+     global prompt
+ 
+     gdb_test "print $expr" ".*= $value"
+ 
+ #     send "ptype $expr\n"
+ #     expect {
+ # 	-re "$type\r\n$prompt $" {$expect "type of '$expr'"}
+ # 	-re "type = (.*)\r\n$prompt $" {fail "type of '$expr' (expect '$type', got '$expect_out(1,string)')"}
+ #    }
+ }
+ 
+ if {[gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" executable {debug f77}] != ""} {
+     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+ }
+ 
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+ 
+ if ![runto _MAIN_ ] then {
+     perror "couldn't run to breakpoint _MAIN_"
+    continue
+ }
+ 
+ check_expr "i2 * j2" "integer\\*2" 8
+ 
+ # Check the exponentiation operator on various types
+ check_expr "i2 ** j2" "integer\\*2" 16
+ check_expr "i4 ** j4" "integer\\*4" 16
+ check_expr "r4 ** s4" "real\\*4" 16
+ check_expr "r8 ** s8" "real\\*8" 16
+ check_expr "r16 ** s16" "real\\*16" 16
+ # Mixed types
+ check_expr "i2 ** s4" "real\\*4" 16
+ check_expr "i2 ** s16" "real\\*16" 16
+ 
+ # Check the precedence of the exponentiation operator
+ check_expr "4 ** 3 ** 2" ".*" 262144
+ check_expr "4 * 3 ** 2" ".*" 36
+ check_expr "9 / 3 ** 2" ".*" 1
+ check_expr "1 + 3 ** 2" ".*" 10
+ check_expr "10 - 3 ** 2" ".*" 1
+ check_expr "-3 ** 2" ".*" "-9"
+ 
+ 
+ # Check the .eqv. and .neqv. operators on various logical types
+ check_expr "l1 .eqv. m1" "logical\\*1" ".FALSE."
+ check_expr "l1 .eqv. (.not. m1)" "logical\\*1" ".TRUE."
+ check_expr "l2 .eqv. m2" "logical\\*2" ".FALSE."
+ check_expr "l2 .eqv. (.not. m2)" "logical\\*2" ".TRUE."
+ check_expr "l4 .eqv. m4" "logical\\*4" ".FALSE."
+ check_expr "l4 .eqv. (.not. m4)" "logical\\*4" ".TRUE."
+ 
+ check_expr "l1 .neqv. m1" "logical\\*1" ".TRUE."
+ check_expr "l1 .neqv. (.not. m1)" "logical\\*1" ".FALSE."
+ check_expr "l2 .neqv. m2" "logical\\*2" ".TRUE."
+ check_expr "l2 .neqv. (.not. m2)" "logical\\*2" ".FALSE."
+ check_expr "l4 .neqv. m4" "logical\\*4" ".TRUE."
+ check_expr "l4 .neqv. (.not. m4)" "logical\\*4" ".FALSE."
+ 
+ # Check the precedence of .eqv. and .neqv.
+ check_expr ".false. .and. .false. .eqv. .false." "logical*" ".TRUE."
+      # if .eqv. is executed first in the above expression the result
+      # would be false.
+ check_expr ".true. .or. .true. .eqv. .false." "logical" ".FALSE."
+      # if .eqv. is executed first in the above expression the result
+      # would be true.
+ 
+ 
+ # Check the relational operators
+ foreach pair {{i2 j2} {i4 j4} {r4 s4} {r8 s8} {r16 s16} {ch2 ch1} {str2 str1}} {
+     set e1 [lindex $pair 0]
+     set e2 [lindex $pair 1]
+     check_expr "$e1 < $e2" "logical*" ".FALSE."
+     check_expr "$e1 > $e2" "logical*" ".TRUE."
+     check_expr "$e1 <= $e2" "logical*" ".FALSE."
+     check_expr "$e1 >= $e2" "logical*" ".TRUE."
+     check_expr "$e1 == $e2" "logical*" ".FALSE."
+     check_expr "$e1 /= $e2" "logical*" ".TRUE."
+ }
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/frames.exp gdb/testsuite/gdb.fortran/frames.exp
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/frames.exp	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/frames.exp	Thu Jul 22 17:49:55 1999
***************
*** 0 ****
--- 1,123 ----
+ # This file was written by Sue Kimura. (sue_kimura@hp.com)
+ 
+ # This file tests the up, down, backtrace and finish commands on Fortran 
+ # programs.
+ #
+ # Source file: frames.f
+ 
+ if { ![istarget "hppa*-*-hpux*"] } {
+     return 0
+ }
+ 
+ if $tracelevel {
+     strace $tracelevel
+ }
+ 
+ #
+ # test running programs
+ #
+ set prms_id 0
+ set bug_id 0
+ 
+ set testfile "frames"
+ set srcfile ${testfile}.f
+ set binfile ${objdir}/${subdir}/${testfile}
+ 
+ if [get_compiler_info ${binfile} f77] {
+     return -1
+ }
+ 
+ if { ! $hp_f77_compiler && ! $hp_f90_compiler } {
+     return 0
+ }
+ 
+ if {[gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" executable {debug f77}] != ""} {
+     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+ }
+ 
+ set MAIN "main"
+ if { [istarget "hppa*-*-hpux*"] } { set MAIN "_MAIN_" }
+ 
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+ 
+ #
+ # set it up a breakpoint 
+ #
+ if ![runto ftn4 ] {
+    perror "couldn't run to breakpoint ftn4"
+    return -1
+ }
+ 
+ # test the up command
+ 
+ gdb_test "up" \
+     "#1.*$hex in ftn3 \\(three=2\\) at .*$srcfile.*call ftn4 \\(three\\)" \
+     "up once in ftn4 "
+ 
+ gdb_test "up" \
+     "#2.*$hex in ftn2 \\(two=2\\) at .*$srcfile.*call ftn3 \\(dble \\(two\\)\\)" \
+     "up twice in ftn4 "
+ 
+ gdb_test "up" \
+     "#3.*$hex in ftn1 \\(one=2\\) at .*$srcfile.*call ftn2 \\(float \\(one\\)\\)" \
+     "up three times in ftn4 "
+ 
+ gdb_test "up" \
+     "#4.*$hex in $MAIN \\(.*\\) at .*$srcfile.*call ftn1 \\(int \\(i2\\)\\)" \
+     "up four times in ftn4 "
+ 
+ gdb_test "up" \
+     "Initial frame selected; you cannot go up." \
+     "up five times in ftn4 "
+ 
+ # test the down command
+ gdb_test "down" \
+     "#3.*$hex in ftn1 \\(one=2\\) at .*$srcfile.*call ftn2 \\(float \\(one\\)\\)" \
+     "down once from $MAIN in ftn4 "
+ 
+ gdb_test "down" \
+     "#2.*$hex in ftn2 \\(two=2\\) at .*$srcfile.*call ftn3 \\(dble \\(two\\)\\)" \
+     "down twice from $MAIN in ftn4 "
+ 
+ gdb_test "down" \
+     "#1.*$hex in ftn3 \\(three=2\\) at .*$srcfile.*call ftn4 \\(three\\)" \
+     "down three times from $MAIN in ftn4 "
+ 
+ gdb_test "down" \
+     "#0.*ftn4 \\(four=\\(2,0\\)\\) at .*$srcfile.*print \\*, four" \
+     "down four times from $MAIN in ftn4"
+ 
+ gdb_test "down" \
+     "Bottom \\(i.e., innermost\\) frame selected; you cannot go down." \
+     "down five times from $MAIN in ftn4"
+ 
+ #test backtrace command
+ 
+ gdb_test "backtrace" \
+     "#0  ftn4 \\(four=\\(2,0\\)\\) at .*$srcfile.*#1  $hex in ftn3 \\(three=2\\) at .*$srcfile.*#2  $hex in ftn2 \\(two=2\\) at .*$srcfile.*#3  $hex in ftn1 \\(one=2\\) at .*$srcfile.*#4  $hex in $MAIN \\(.*\\) at .*$srcfile.*" \
+     "backtrace from ftn4"
+ 
+ #test finish command
+ 
+ gdb_test "finish" \
+     "Run till exit from #0  ftn4 \\(four=\\(2,0\\)\\) at .*$srcfile.*ftn3 \\(three=2\\) at .*$srcfile.*(print \\*, three|call ftn4 \\(three\\)).*" \
+     "finish from ftn4"
+ 
+ gdb_test "finish" \
+     "Run till exit from #0  ($hex in |)ftn3 \\(three=2\\) at .*$srcfile.*ftn2 \\(two=2\\) at .*$srcfile.*(print \\*, two|call ftn3 \\(dble \\(two\\)\\)).*" \
+     "finish from ftn3"
+ 
+ gdb_test "finish" \
+     "Run till exit from #0  ($hex in |)ftn2 \\(two=2\\) at .*$srcfile.*ftn1 \\(one=2\\) at .*$srcfile.*(print \\*, one|call ftn2 \\(float \\(one\\)\\)).*" \
+     "finish from ftn2"
+ 
+ gdb_test "finish" \
+     "Run till exit from #0  ($hex in |)ftn1 \\(one=2\\) at .*$srcfile.*$MAIN \\(.*\\) at .*$srcfile.*(print \\*, i2|call ftn1 \\(int \\(i2\\)\\)).*" \
+     "finish from ftn1"
+ 
+ gdb_test "finish" \
+     ".*finish.* not meaningful in the outermost frame." \
+     "finish from $MAIN"
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/frames.f gdb/testsuite/gdb.fortran/frames.f
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/frames.f	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/frames.f	Thu Jul 22 17:49:56 1999
***************
*** 0 ****
--- 1,33 ----
+ C
+ C  FORTRAN language test program for the debugger - level 2
+ C
+ 
+        program main
+        integer*2 i2 
+        i2 = 2
+        call ftn1 (int (i2))
+        print *, i2
+        end
+ 
+        subroutine ftn1 ( one )
+        integer*4 one
+        call ftn2 (float (one))
+        print *, one
+        end
+ 
+        subroutine ftn2 ( two )
+        real*4 two
+        call ftn3 (dble (two))
+        print *, two
+        end
+ 
+        subroutine ftn3 ( three )
+        real*8 three
+        call ftn4 (three)
+        print *, three
+        end
+ 
+        subroutine ftn4 ( four )
+        complex*8 four
+        print *, four
+        end
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/ftypes.exp gdb/testsuite/gdb.fortran/ftypes.exp
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/ftypes.exp	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/ftypes.exp	Thu Jul 22 17:49:56 1999
***************
*** 0 ****
--- 1,144 ----
+ #   Copyright (C) 1988, 1990, 1991, 1992, 1994 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 2 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, write to the Free Software
+ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+ 
+ # Please email any bugs, comments, and/or additions to this file to:
+ # bug-gdb@prep.ai.mit.edu
+ 
+ # This file was written by Sue Kimura. (sue_kimura@hp.com)
+ 
+ if { ![istarget "hppa*-*-hpux*"] } {
+     return 0
+ }
+ 
+ if $tracelevel {
+     strace $tracelevel
+ }
+ 
+ #
+ # test running programs
+ #
+ set prms_id 0
+ set bug_id 0
+ 
+ set testfile "ftypes"
+ set srcfile ${testfile}.f
+ set binfile ${objdir}/${subdir}/${testfile}
+ 
+ if [get_compiler_info ${binfile} f77] {
+     return -1
+ }
+ 
+ if { ! $hp_f77_compiler && ! $hp_f90_compiler } {
+     return 0
+ }
+ 
+ if {[gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" executable {debug f77}] != ""} {
+     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+ }
+ 
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+ 
+ #
+ # set it up at a breakpoint so we can play with the variable values
+ #
+ 
+ if ![runto _MAIN_ ] {
+     perror "couldn't run to breakpoint _MAIN_"
+     continue
+ }
+ 
+ # test integer type variables
+ 
+ gdb_test "ptype i"      "type = integer\\*4" "ptype i"
+ gdb_test "print i"      " = 2147483647"      "print i"
+ gdb_test "p i = -1"     " = -1"              "modify i"
+ 
+ gdb_test "ptype i2"     "type = integer\\*2" "ptype i2"
+ gdb_test "print i2"     " = 2"               "print i2"
+ gdb_test "p i2 = -2"    " = -2"              "modify i2"
+ 
+ gdb_test "ptype i4"     "type = integer\\*4" "ptype i4"
+ gdb_test "print i4"     " = 4"               "print i4"
+ gdb_test "p i4 = -4"    " = -4"              "modify i4"
+ 
+ gdb_test "p i2 + 2"  " = 0" "print i2 + 2" 
+ gdb_test "p i4 + 4"  " = 0" "print i4 + 4" 
+ 
+ # test logical type variables
+ 
+ gdb_test "ptype l1"    " = logical\\*1"   "ptype l1"
+ gdb_test "print l1"    " = .TRUE."        "print l1"
+ gdb_test "x /x \&l1"   ".*:.*0x01.*"      "hex value of l1"
+ gdb_test "p l1 = -128" " = .TRUE."        "modify l1"
+ gdb_test "x /x \&l1"   ".*:.*0x80.*"      "hex value of l1 after assignment"
+ 
+ gdb_test "ptype l2"     " = logical\\*2"   "ptype l2"
+ gdb_test "print l2"     " = .TRUE."        "print l2"
+ gdb_test "x /x \&l2"    ".*:.*0x0002.*"    "hex value of l2"
+ 
+ gdb_test "ptype l4"  " = logical\\*4"      "ptype l4"
+ gdb_test "print l4"  " = .TRUE."           "print l4"
+ gdb_test "x /x \&l4" ".*:.*0x00000004"     "hex value of l4"
+ 
+ gdb_test "p l1 = -128"   " = .TRUE."     "print l1 = -128"
+ gdb_test "x /x \&l1"  ".*:.*0x80.*"      "hex value of l1 = -128"
+ gdb_test "p l1 = 0"   " = .FALSE."       "print l1 = .FALSE"
+ gdb_test "x /x \&l1"  ".*:.*0x00.*"      "hex value of l1 = .FALSE"
+ 
+ gdb_test "p l2 = 32767"   " = .TRUE."    "print l2 = 32767"
+ gdb_test "x /x \&l2"  ".*:.*0x7fff.*"    "hex value of l2 = 32767"
+ gdb_test "p l2 = 0"   " = .FALSE."       "print l2 = 0"
+ gdb_test "x /x \&l2"  ".*:.*0x0000.*"    "hex value of l2 = 0"
+ 
+ gdb_test "p l4 = 2147483647"  " = .TRUE."  "print l4 = 2147483647"
+ gdb_test "x /x \&l4" ".*:.*0x7fffffff"     "hex value of l4 = 2147483647"
+ gdb_test "p l4 = 0"  " = .FALSE."          "print l4 = 0"
+ gdb_test "x /x \&l4" ".*:.*0x00000000"     "hex value of l4  = 0"
+ 
+ #test character type variables
+ #
+ gdb_test "ptype c"       " = character\\*1"  "ptype c"
+ gdb_test "print c"       " = 'a'"            "print c"
+ gdb_test "ptype one_c"   " = character\\*1"  "ptype one_c"
+ gdb_test "print one_c"   " = 'b'"            "print one_c"
+ gdb_test "ptype two_c"   " = character\\*2"  "ptype two_c"
+ gdb_test "print two_c"   " = 'cc'"           "print two_c"
+ gdb_test "ptype four_c"  " = character\\*4"  "ptype four_c"
+ gdb_test "print four_c"  " = 'dddd'"         "print four_c"
+ 
+ # test assignment of literal <= declared length
+ #
+ gdb_test "print c = '1'"       " = '1'"     "print c = '1' "
+ gdb_test "print one_c = '1'"   " = '1'"     "print one_c = '1'"
+ gdb_test "print two_c = '1'"   " = '1 '"    "print two_c = '1 '"
+ gdb_test "print four_c = '1'"  " = '1   '"  "print four_c = '1   '"
+ 
+ # test assignment of literal > declared length of variable
+ #
+ gdb_test "print c      = '222222222'"  " = '2'"  "print c =      '2'"
+ gdb_test "print one_c  = '333333333'"  " = '3'"  "print one_c =  '3'"
+ gdb_test "print two_c  = '444444444'"  " = '44'" "print two_c =  '44'"
+ gdb_test "print four_c = '555555555'"  " = '5555'"  "print four_c = '5555'"
+ 
+ # test assignment of null string literal -- commented out because
+ # assignment of null string literal  doesn't currently work
+ #gdb_test "print c      = ''"  " = ' '"    "print c =      ' '"
+ #gdb_test "print one_c  = ''"  " = ' '"    "print one_c =  ' '"
+ #gdb_test "print two_c  = ''"  " = '  '"   "print two_c =  '  '"
+ #gdb_test "print four_c = ''"  " = '    '  "  "print four_c = '    '"
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/ftypes.f gdb/testsuite/gdb.fortran/ftypes.f
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/ftypes.f	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/ftypes.f	Thu Jul 22 17:49:56 1999
***************
*** 0 ****
--- 1,17 ----
+          program fundamental_types
+ 
+          integer   ::i  = 2147483647
+          integer * 2 ::i2 = 2
+          integer * 4 ::i4 = 4
+  
+          logical     ::l  = 0
+          logical * 1 ::l1 = 1
+          logical * 2 ::l2 = 2
+          logical * 4 ::l4 = 4
+  
+          character     ::c = "a"
+          character (1) ::one_c = "b"
+          character (2) ::two_c = "cc"
+          character (4) ::four_c = "dddd"
+ 
+          end
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/intrinsics.exp gdb/testsuite/gdb.fortran/intrinsics.exp
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/intrinsics.exp	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/intrinsics.exp	Thu Jul 22 17:49:56 1999
***************
*** 0 ****
--- 1,76 ----
+ # Author: Ovidiu Predescu <ovidiu@cup.hp.com>, Sept 2, 1998
+ #
+ # Check how the intrinsic Fortran types and values are displayed
+ 
+ if { ![istarget "hppa*-*-hpux*"] } {
+     return 0
+ }
+ 
+ if $tracelevel {
+     strace $tracelevel
+ }
+ 
+ set testfile "intrinsics"
+ set srcfile ${testfile}.f
+ set binfile ${objdir}/${subdir}/${testfile}
+ 
+ if [get_compiler_info ${binfile} f77] {
+     return -1
+ }
+ 
+ if { ! $hp_f77_compiler && ! $hp_f90_compiler } {
+     return 0
+ }
+ 
+ proc check_variable {name type value} {
+     gdb_test "ptype $name" "$type" "type of $name"
+     gdb_test "print $name" "$value" "value of $name"
+ }
+ 
+ if {[gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" executable {debug f77}] != ""} {
+     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+ }
+ 
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+ 
+ if ![runto _MAIN_ ] {
+     perror "couldn't run to breakpoint _MAIN_"
+     continue
+ }
+ 
+ check_variable i2 "integer\\*2" 4
+ check_variable j2 "integer\\*2" 2
+ 
+ check_variable i4 "integer\\*4" 4
+ check_variable j4 "integer\\*4" 2
+ 
+ check_variable r4 "real\\*4" "4.*"
+ check_variable s4 "real\\*4" "2.*"
+ 
+ check_variable r8 "real\\*8" "4.*"
+ check_variable s8 "real\\*8" "2.*"
+ 
+ check_variable r16 "real\\*16" "4.*"
+ check_variable s16 "real\\*16" "2.*"
+ 
+ check_variable c4 "complex\\*8" "\\(1,[ ]*2\\)"
+ check_variable d4 "complex\\*8" "\\(2,[ ]*3\\)"
+ 
+ check_variable c8 "complex\\*16" "\\(1,[ ]*2\\)"
+ check_variable d8 "complex\\*16" "\\(2,[ ]*3\\)"
+ 
+ check_variable ch1 "character\\*1" "'1'"
+ check_variable ch2 "character\\*1" "'2'"
+ 
+ check_variable l1 "logical\\*1" ".FALSE."
+ check_variable m1 "logical\\*1" ".TRUE."
+ 
+ check_variable l2 "logical\\*2" ".FALSE."
+ check_variable m2 "logical\\*2" ".TRUE."
+ 
+ check_variable l4 "logical\\*4" ".FALSE."
+ check_variable m4 "logical\\*4" ".TRUE."
+ 
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/intrinsics.f gdb/testsuite/gdb.fortran/intrinsics.f
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/intrinsics.f	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/intrinsics.f	Thu Jul 22 17:49:57 1999
***************
*** 0 ****
--- 1,23 ----
+ ! The commented out lines below should be tested in the Fortran 90 case too
+ !      integer(kind=1) :: i1 = 1, j1 = 2
+       integer(kind=2) :: i2 = 4, j2 = 2
+       integer(kind=4) :: i4 = 4, j4 = 2
+ !      integer(kind=8) :: i8 = 1, j8 = 2
+ 
+       real(kind=4) :: r4 = 4, s4 = 2
+       real(kind=8) :: r8 = 4, s8 = 2
+       real(kind=16) :: r16 = 4, s16 = 2
+ 
+       complex(kind=4) :: c4 = (1, 2), d4 = (2, 3)
+       complex(kind=8) :: c8 = (1, 2), d8 = (2, 3)
+ 
+       character :: ch1 = '1', ch2 = '2'
+       character*3 :: str1 = '123'
+       character*4 :: str2 = '1234'
+ 
+       logical(kind=1) :: l1 = .FALSE., m1 = .TRUE.
+       logical(kind=2) :: l2 = .FALSE., m2 = .TRUE.
+       logical(kind=4) :: l4 = .FALSE., m4 = .TRUE.
+ !      logical(kind=8) :: l8 = .FALSE., m8 = .TRUE.
+ 
+       end
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/keytypes.exp gdb/testsuite/gdb.fortran/keytypes.exp
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/keytypes.exp	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/keytypes.exp	Thu Jul 22 17:50:01 1999
***************
*** 0 ****
--- 1,84 ----
+ # Author: Sue Kimura <srk@cup.hp.com>
+ #
+ # Verify that variable names that start with type keywords do not confuse gdb
+ # Verify that types such as (real*8) are recognized as keywords
+ # Defect filed as CLLbs15079/JAGaa80455
+ 
+ if { ![istarget "hppa*-*-hpux*"] } {
+     return 0
+ }
+ 
+ if $tracelevel {
+     strace $tracelevel
+ }
+ 
+ set testfile "keytypes"
+ set srcfile ${testfile}.f
+ set binfile ${objdir}/${subdir}/${testfile}
+ 
+ if [get_compiler_info ${binfile} f77] {
+     return -1
+ }
+ 
+ if { ! $hp_f77_compiler && ! $hp_f90_compiler } {
+     return 0
+ }
+ 
+ proc check_type {type value size} {
+     gdb_test "print $type" \
+              "Attempt to use a type name as an expression" \
+              "print $type"
+ #   gdb_test "print ($type)" \
+ #            "A syntax error in expression, near `'." \
+ #            "print ($type)"
+     gdb_test "ptype $type"        "$value" "ptype $type"
+ #   gdb_test "ptype ($type)"      "$value" "ptype ($type)"
+     gdb_test "p sizeof ($type)"   "$size"  "p sizeof ($type)" 
+     gdb_test "p sizeof ( $type )" "$size"  "p sizeof ( $type )" 
+ 
+ }
+ 
+ proc check_variable {name value type size} {
+     gdb_test "print $name"            "$value" "print $name"
+     gdb_test "print ($name)"          "$value" "print ($name)"
+     gdb_test "print ( $name )"        "$value" "print ( $name )"
+     gdb_test "ptype $name"            "$type"  "ptype $name"
+     gdb_test "ptype ($name)"          "$type"  "ptype ($name)"
+     gdb_test "ptype ( $name )"        "$type"  "ptype ( $name )"
+     gdb_test "print sizeof ($name)"   "$size"  "print sizeof ($name)"
+     gdb_test "print sizeof ( $name )" "$size"  "print sizeof ( $name )"
+ }
+ 
+ if {[gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" executable {debug f77}] != ""} {
+     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+ }
+ 
+ set MAIN "main"
+ if {[istarget "hppa*-*-hpux*"]} { set MAIN "_MAIN_"}
+ 
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+ 
+ if ![runto $MAIN ] {
+     perror "couldn't run to breakpoint $MAIN"
+     continue
+ }
+ 
+ check_type "integer"    "integer"       4
+ check_type "integer*4"  "integer"       4
+ check_type "logical"    "logical\\*4"   4
+ check_type "logical*1"  "logical\\*1"   1
+ check_type "real"       "real\\*4"      4
+ check_type "real*8"     "real\\*8"      8
+ check_type "complex"    "complex\\*8"   8
+ check_type "complex*16" "complex\\*16" 16 
+ check_type "character"  "character"     1
+ 
+ check_variable integer_v  "2147483647"     "integer\\*4"          4
+ check_variable logical_v  "\\.FALSE\\."    "logical\\*4"          4
+ check_variable real_v     "1.20000005"     "real\\*4"             4
+ check_variable complex_v  "\\(9,8\\)"      "complex\\*8"          8
+ check_variable character_v "'a'"           "character\\*1"        1
+ check_variable integer_arr "\\(1, 2, 3\\)" "integer\\*4 \\(3\\)" 12
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/keytypes.f gdb/testsuite/gdb.fortran/keytypes.f
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/keytypes.f	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/keytypes.f	Thu Jul 22 17:50:01 1999
***************
*** 0 ****
--- 1,14 ----
+        program bs15079
+ 
+        integer   ::integer_v  = 2147483647
+        logical   ::logical_v  = 0
+ 
+        character ::character_v = "a"
+          
+        real        ::real_v   = 1.2
+        complex ::complex_v   =  (9.0, 8.0)
+ 
+        integer  ::integer_arr(3)
+        data integer_arr / 1, 2, 3/
+ 
+        end
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/local.exp gdb/testsuite/gdb.fortran/local.exp
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/local.exp	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/local.exp	Thu Jul 22 17:49:57 1999
***************
*** 0 ****
--- 1,71 ----
+ # This file was written by Sue Kimura. (sue_kimura@hp.com)
+ #
+ # Fortran test to verify that local variables in main can be viewed.
+ # Also verify that breakpoint on first executable statement works properly
+ #
+ # Source file: local.f
+ 
+ if { ![istarget "hppa*-*-hpux*"] } {
+     return 0
+ }
+ 
+ if $tracelevel {
+     strace $tracelevel
+ }
+ 
+ #
+ # test running programs
+ #
+ set prms_id 0
+ set bug_id 0
+ 
+ set testfile "local"
+ set srcfile ${testfile}.f
+ set binfile ${objdir}/${subdir}/${testfile}
+ 
+ if [get_compiler_info ${binfile} f77] {
+     return -1
+ }
+ 
+ if { ! $hp_f77_compiler && ! $hp_f90_compiler } {
+     return 0
+ }
+ 
+ if {[gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" executable {debug f77}] != ""} {
+     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+ }
+ 
+ set MAIN "main"
+ if {[istarget "hppa*-*-hpux*"]} { set MAIN "_MAIN_"}
+ 
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+ 
+ #
+ # set it up at a breakpoint at first executable statemetn so we can play 
+ # with the variable values
+ #
+ gdb_test "break 14" "Breakpoint $decimal at $hex: file .*$srcfile, line 14."
+ gdb_test "break 20" "Breakpoint $decimal at $hex: file .*$srcfile, line 20."
+ gdb_test "break 24" "Breakpoint $decimal at $hex: file .*$srcfile, line 24."
+ gdb_test "run"      "Starting program: $binfile.*i = 0"
+ gdb_test "continue" \
+     "Continuing.*Breakpoint $decimal, $MAIN \\(.*\\) at .*$srcfile.*do i=3D1,N" \
+     "continue to $MAIN:20"
+ 
+ # verify contents of local variables
+ 
+ gdb_test "print n"  " = 30"               "before loop: print n"
+ 
+ # continue to the next breakpoint  and verify contents of variables again
+ gdb_test "continue" \
+     "Continuing.*Breakpoint $decimal, $MAIN \\(.*\\) at .*$srcfile.*after loop: N =.*" \
+     "continue to $MAIN:24*"
+ 
+ gdb_test "print n"  " = 30"               "after loop: print n"
+ gdb_test "print i"  " = 31"               "after loop: print i"
+ gdb_test "print x" \
+     " = \\(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\\)" \
+     "after loop: print x"
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/local.f gdb/testsuite/gdb.fortran/local.f
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/local.f	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/local.f	Thu Jul 22 17:49:57 1999
***************
*** 0 ****
--- 1,27 ----
+ C This is a modified version (the orginal did not compile) of code from a 
+ C customer in Norway who's complained to support@norway.hp.com in May, 1998
+ C that we can't deal with a simple fortran90 program.  This program is used 
+ C as a sanity check to verify that this customer's code can be debugged.  
+ C
+ C It is also used to verify that we can correctly print local variables 
+ C in the main program.
+ 
+         program norway
+         integer, parameter :: N=3D1
+         integer i
+         double precision, dimension(N) :: x
+ 
+         i = 0
+         x = 0
+         print *, 'before loop: N = ', N
+         print *, 'before loop: i = ', i
+         print *, 'before loop: x = ', x
+ 
+         do i=3D1,N
+           x = i/dble(N)
+         enddo
+ 
+         print *, 'after loop: N = ', N
+         print *, 'after loop: i = ', i
+         print *, 'after loop: x = ', x
+         end
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/local1.exp gdb/testsuite/gdb.fortran/local1.exp
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/local1.exp	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/local1.exp	Thu Jul 22 17:49:58 1999
***************
*** 0 ****
--- 1,65 ----
+ # This file was written by Sue Kimura. (sue_kimura@hp.com)
+ #
+ # Another fortran test to verify that local variables in main can be viewed.
+ #
+ # Source file: local1.f
+ 
+ if { ![istarget "hppa*-*-hpux*"] } {
+     return 0
+ }
+ 
+ if $tracelevel {
+     strace $tracelevel
+ }
+ 
+ #
+ # test running programs
+ #
+ set prms_id 0
+ set bug_id 0
+ 
+ set testfile "local1"
+ set srcfile ${testfile}.f
+ set binfile ${objdir}/${subdir}/${testfile}
+ 
+ if [get_compiler_info ${binfile} f77] {
+     return -1
+ }
+ 
+ if { ! $hp_f77_compiler && ! $hp_f90_compiler } {
+     return 0
+ }
+ 
+ if {[gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" executable {debug f77}] != ""} {
+     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+ }
+ 
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+ 
+ #
+ # set it up at a breakpoint
+ #
+ gdb_test "break 45" "Breakpoint $decimal at $hex: file .*$srcfile, line 45."
+ gdb_test "run"      "Starting program: $binfile.*Breakpoint.*stop"
+ 
+ # verify contents of local variables (except for lmax which is a global)
+ 
+ gdb_test "print gi1"  " = 255"
+ gdb_test "print gi2"  " = -1"
+ gdb_test "print gx1"  " = \\(255,4095\\)"
+ gdb_test "print lmax"  " = 10"
+ gdb_test "print strings(1)" \
+     " = '    the', ' ' <repeats 24 times>"
+ gdb_test "print strings(2)" \
+     " = 'art', ' ' <repeats 28 times>"
+ gdb_test "print strings(3)" \
+     " = ' ' <repeats 16 times>, 'of', ' ' <repeats 13 times>"
+ gdb_test "print strings(4)" \
+     " = 'scientific computing', ' ' <repeats 11 times>"
+ gdb_test "print strings(5)" \
+     " = 'the art of  scientific computin'"
+ gdb_test "print rarray1" \
+     "\\(2.23606801, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\\)"
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/local1.f gdb/testsuite/gdb.fortran/local1.f
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/local1.f	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/local1.f	Thu Jul 22 17:49:58 1999
***************
*** 0 ****
--- 1,47 ----
+       program test_l1
+ 
+       real  hypot, area
+ 
+       integer           gi1
+       integer*2         gi2
+       complex           gx1
+ 
+       real              rarray1
+       dimension         rarray1(20)
+       data rarray1 /20*0/
+ 
+       character*31  strings(5)
+       data strings /' ', ' ', ' ', ' ', ' '/
+ 
+       integer     LMAX
+       common /priority_queue/ LMAX
+ 
+       hypot(a, b) = sqrt(a**2 + b**2)
+       area(a, b) = a*b/2.0
+ 
+  
+ 
+ **********************************************************
+ *                       BEGIN                            *
+ **********************************************************
+ 
+       LMAX = 10
+ 
+       gi1 = O'377'
+       gi2 = Z'FFFF'
+       
+       gx1 = (255, 4095)
+ 
+       strings(1)(5:8) = 'the '
+       strings(2)(1:4) = 'art '
+       strings(3)(17:20) = 'of '
+       strings(4)(1:20) = 'scientific ' // 'computing'
+       strings(5) = strings(1)(5:8)   // strings(2)(1:4)  // 
+      *             strings(3)(17:20) // strings(4)(1:20)
+       
+       rarray1(1) = hypot(1.0,2.0)   
+       rarray1(2) = area(1.0,2.0)
+ 
+       stop
+ 
+       end
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/local2.exp gdb/testsuite/gdb.fortran/local2.exp
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/local2.exp	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/local2.exp	Thu Jul 22 17:50:01 1999
***************
*** 0 ****
--- 1,83 ----
+ #   Copyright (C) 1997 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 2 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, write to the Free Software
+ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+ 
+ # This file was written by Sue Kimura  (sue_kimura@hp.com)
+ #
+ # This tests verifies that large number of local variables are correctly
+ # read in 
+ 
+ if { ![istarget "hppa*-*-hpux*"] } {
+     return 0
+ }
+ 
+ if $tracelevel {
+     strace $tracelevel
+ }
+ 
+ set prms_id 0
+ set bug_id 0
+ 
+ # are we on a target board
+ if ![isnative] {
+     return
+ }
+ 
+ # This test is presently only valid on HP-UX, since it requires
+ # that we use HP-UX-specific compiler & linker options to build
+ # the testcase.
+ #
+ setup_xfail "*-*-*"
+ clear_xfail "hppa*-*-*hpux*"
+ 
+ set prototypes 0
+ set testfile "local2"
+ set srcfile ${testfile}.f
+ set binfile ${objdir}/${subdir}/${testfile}
+ 
+ if [get_compiler_info ${binfile} f77] {
+     return -1
+ }
+ 
+ if { ! $hp_f77_compiler && ! $hp_f90_compiler } {
+     return 0
+ }
+ 
+ # Build the test case
+ if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f77 }] != ""} {
+     perror "Couldn't build ${binfile}"
+     return -1
+ }
+ 
+ # Start with a fresh gdb
+ 
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+ 
+ if ![runto subr ] then { fail "runto subr" }
+ 
+ gdb_test "print l00"  "= -1"
+ gdb_test "print l01"  "= 100"
+ gdb_test "print l49"  "= 4900"
+ gdb_test "print l50"  "= 5000"
+ gdb_test "print l51"  "= 5100"
+ gdb_test "print l52"  "= 5200"
+ gdb_test "print l149" "= 14900"
+ gdb_test "print l150" "= 15000"
+ gdb_test "print l151" "= 15100"
+ gdb_test "print l152" "= 15200"
+ gdb_test "print l250" "= 25000"
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/local2.f gdb/testsuite/gdb.fortran/local2.f
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/local2.f	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/local2.f	Thu Jul 22 17:50:01 1999
***************
*** 0 ****
--- 1,288 ----
+          program fundamental_types
+ 
+          call subr
+ 
+          end
+ 
+ 
+          subroutine subr ()
+ 
+ 
+          integer  ::l00 = -1
+          integer  ::l01 = 100
+          integer  ::l02 = 0
+          integer  ::l03 = 0
+          integer  ::l04 = 0
+          integer  ::l05 = 0
+          integer  ::l06 = 0
+          integer  ::l07 = 0
+          integer  ::l08 = 0
+          integer  ::l09 = 0
+ 
+          integer  ::l10 = 0
+          integer  ::l11 = 0
+          integer  ::l12 = 0
+          integer  ::l13 = 0
+          integer  ::l14 = 0
+          integer  ::l15 = 0
+          integer  ::l16 = 0
+          integer  ::l17 = 0
+          integer  ::l18 = 0
+          integer  ::l19 = 0
+ 
+          integer  ::l20 = 0
+          integer  ::l21 = 0
+          integer  ::l22 = 0
+          integer  ::l23 = 0
+          integer  ::l24 = 0
+          integer  ::l25 = 0
+          integer  ::l26 = 0
+          integer  ::l27 = 0
+          integer  ::l28 = 0
+          integer  ::l29 = 0
+ 
+          integer  ::l30 = 0
+          integer  ::l31 = 0
+          integer  ::l32 = 0
+          integer  ::l33 = 0
+          integer  ::l34 = 0
+          integer  ::l35 = 0
+          integer  ::l36 = 0
+          integer  ::l37 = 0
+          integer  ::l38 = 0
+          integer  ::l39 = 0
+ 
+          integer  ::l40 = 0
+          integer  ::l41 = 0
+          integer  ::l42 = 0
+          integer  ::l43 = 0
+          integer  ::l44 = 0
+          integer  ::l45 = 0
+          integer  ::l46 = 0
+          integer  ::l47 = 0
+          integer  ::l48 = 0
+          integer  ::l49 = 4900
+ 
+          integer  ::l50 = 5000
+          integer  ::l51 = 5100
+          integer  ::l52 = 5200
+          integer  ::l53 = 0
+          integer  ::l54 = 0
+          integer  ::l55 = 0
+          integer  ::l56 = 0
+          integer  ::l57 = 0
+          integer  ::l58 = 0
+          integer  ::l59 = 0
+ 
+          integer  ::l60 = 0
+          integer  ::l61 = 0
+          integer  ::l62 = 0
+          integer  ::l63 = 0
+          integer  ::l64 = 0
+          integer  ::l65 = 0
+          integer  ::l66 = 0
+          integer  ::l67 = 0
+          integer  ::l68 = 0
+          integer  ::l69 = 0
+ 
+          integer  ::l70 = 0
+          integer  ::l71 = 0
+          integer  ::l72 = 0
+          integer  ::l73 = 0
+          integer  ::l74 = 0
+          integer  ::l75 = 0
+          integer  ::l76 = 0
+          integer  ::l77 = 0
+          integer  ::l78 = 0
+          integer  ::l79 = 0
+ 
+          integer  ::l80 = 0
+          integer  ::l81 = 0
+          integer  ::l82 = 0
+          integer  ::l83 = 0
+          integer  ::l84 = 0
+          integer  ::l85 = 0
+          integer  ::l86 = 0
+          integer  ::l87 = 0
+          integer  ::l88 = 0
+          integer  ::l89 = 0
+ 
+          integer  ::l90 = 0
+          integer  ::l91 = 0
+          integer  ::l92 = 0
+          integer  ::l93 = 0
+          integer  ::l94 = 0
+          integer  ::l95 = 0
+          integer  ::l96 = 0
+          integer  ::l97 = 0
+          integer  ::l98 = 0
+          integer  ::l99 = 0
+ 
+          integer  ::l100 = 10000
+          integer  ::l101 = 0
+          integer  ::l102 = 0
+          integer  ::l103 = 0
+          integer  ::l104 = 0
+          integer  ::l105 = 0
+          integer  ::l106 = 0
+          integer  ::l107 = 0
+          integer  ::l108 = 0
+          integer  ::l109 = 0
+ 
+          integer  ::l110 = 0
+          integer  ::l111 = 0
+          integer  ::l112 = 0
+          integer  ::l113 = 0
+          integer  ::l114 = 0
+          integer  ::l115 = 0
+          integer  ::l116 = 0
+          integer  ::l117 = 0
+          integer  ::l118 = 0
+          integer  ::l119 = 0
+ 
+          integer  ::l120 = 0
+          integer  ::l121 = 0
+          integer  ::l122 = 0
+          integer  ::l123 = 0
+          integer  ::l124 = 0
+          integer  ::l125 = 0
+          integer  ::l126 = 0
+          integer  ::l127 = 0
+          integer  ::l128 = 0
+          integer  ::l129 = 0
+ 
+          integer  ::l130 = 0
+          integer  ::l131 = 0
+          integer  ::l132 = 0
+          integer  ::l133 = 0
+          integer  ::l134 = 0
+          integer  ::l135 = 0
+          integer  ::l136 = 0
+          integer  ::l137 = 0
+          integer  ::l138 = 0
+          integer  ::l139 = 0
+ 
+          integer  ::l140 = 0
+          integer  ::l141 = 0
+          integer  ::l142 = 0
+          integer  ::l143 = 0
+          integer  ::l144 = 0
+          integer  ::l145 = 0
+          integer  ::l146 = 0
+          integer  ::l147 = 0
+          integer  ::l148 = 0
+          integer  ::l149 = 14900
+ 
+          integer  ::l150 = 15000
+          integer  ::l151 = 15100
+          integer  ::l152 = 15200
+          integer  ::l153 = 0
+          integer  ::l154 = 0
+          integer  ::l155 = 0
+          integer  ::l156 = 0
+          integer  ::l157 = 0
+          integer  ::l158 = 0
+          integer  ::l159 = 0
+ 
+          integer  ::l160 = 0
+          integer  ::l161 = 0
+          integer  ::l162 = 0
+          integer  ::l163 = 0
+          integer  ::l164 = 0
+          integer  ::l165 = 0
+          integer  ::l166 = 0
+          integer  ::l167 = 0
+          integer  ::l168 = 0
+          integer  ::l169 = 0
+ 
+          integer  ::l170 = 0
+          integer  ::l171 = 0
+          integer  ::l172 = 0
+          integer  ::l173 = 0
+          integer  ::l174 = 0
+          integer  ::l175 = 0
+          integer  ::l176 = 0
+          integer  ::l177 = 0
+          integer  ::l178 = 0
+          integer  ::l179 = 0
+ 
+          integer  ::l180 = 0
+          integer  ::l181 = 0
+          integer  ::l182 = 0
+          integer  ::l183 = 0
+          integer  ::l184 = 0
+          integer  ::l185 = 0
+          integer  ::l186 = 0
+          integer  ::l187 = 0
+          integer  ::l188 = 0
+          integer  ::l189 = 0
+ 
+          integer  ::l190 = 0
+          integer  ::l191 = 0
+          integer  ::l192 = 0
+          integer  ::l193 = 0
+          integer  ::l194 = 0
+          integer  ::l195 = 0
+          integer  ::l196 = 0
+          integer  ::l197 = 0
+          integer  ::l198 = 0
+          integer  ::l199 = 19900
+ 
+          integer  ::l200 = 20000
+          integer  ::l201 = 20100
+          integer  ::l202 = 0
+          integer  ::l203 = 0
+          integer  ::l204 = 0
+          integer  ::l205 = 0
+          integer  ::l206 = 0
+          integer  ::l207 = 0
+          integer  ::l208 = 0
+          integer  ::l209 = 0
+ 
+          integer  ::l210 = 0
+          integer  ::l211 = 0
+          integer  ::l212 = 0
+          integer  ::l213 = 0
+          integer  ::l214 = 0
+          integer  ::l215 = 0
+          integer  ::l216 = 0
+          integer  ::l217 = 0
+          integer  ::l218 = 0
+          integer  ::l219 = 0
+ 
+          integer  ::l220 = 0
+          integer  ::l221 = 0
+          integer  ::l222 = 0
+          integer  ::l223 = 0
+          integer  ::l224 = 0
+          integer  ::l225 = 0
+          integer  ::l226 = 0
+          integer  ::l227 = 0
+          integer  ::l228 = 0
+          integer  ::l229 = 0
+ 
+          integer  ::l230 = 0
+          integer  ::l231 = 0
+          integer  ::l232 = 0
+          integer  ::l233 = 0
+          integer  ::l234 = 0
+          integer  ::l235 = 0
+          integer  ::l236 = 0
+          integer  ::l237 = 0
+          integer  ::l238 = 0
+          integer  ::l239 = 0
+ 
+          integer  ::l240 = 0
+          integer  ::l241 = 0
+          integer  ::l242 = 0
+          integer  ::l243 = 0
+          integer  ::l244 = 0
+          integer  ::l245 = 0
+          integer  ::l246 = 0
+          integer  ::l247 = 0
+          integer  ::l248 = 0
+          integer  ::l249 = 0
+ 
+          integer  ::l250 = 25000
+ 
+          end
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/main.exp gdb/testsuite/gdb.fortran/main.exp
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/main.exp	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/main.exp	Thu Jul 22 17:49:58 1999
***************
*** 0 ****
--- 1,188 ----
+ # This file was written by Sue Kimura. (sue_kimura@hp.com)
+ 
+ # This file tests Fortran programs with/without a program name and 
+ # with/without a function called main and verifies that the breakpoint is 
+ # set in the correct location.  For HP gdb, the default name for the Fortran
+ # main program is set to "_MAIN_", in order to distinguish it from the
+ # function/subroutine "main" which does not have any special significance 
+ # in Fortran.
+ #
+ # The test sources are named:
+ #   prog_nomain.f    [program name, no function main]
+ #   prog_main.f      [program name, function called main]
+ #   noprogormain.f  [no program name, no function main]
+ #   noprog_main.f    [no program name, function called main]
+ #
+ 
+ if { ![istarget "hppa*-*-hpux*"] } {
+     return 0
+ }
+ 
+ if $tracelevel {
+     strace $tracelevel
+ }
+ 
+ #
+ # test running programs
+ #
+ set prms_id 0
+ set bug_id 0
+ 
+ # set default name for Fortran main
+ set default_main "_MAIN_"
+ 
+ #
+ # Test program with program name and with no function called "main"
+ #
+ 
+ set testfile "prog_nomain"
+ set srcfile ${testfile}.f
+ set binfile ${objdir}/${subdir}/${testfile}
+ 
+ if [get_compiler_info ${binfile} f77] {
+     return -1
+ }
+ 
+ if { ! $hp_f77_compiler && ! $hp_f90_compiler } {
+     return 0
+ }
+ 
+ if {[gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" executable {debug f77}] != ""} {
+     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+ }
+ 
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+ 
+ # test if program name "foo" is recognized; in this it case should be recognized
+ gdb_test "break foo" \
+     "Breakpoint $decimal at $hex: file .*$srcfile, line 6." \
+     "break on program foo in $srcfile"
+ 
+ # first see if main is recognized; in this case it shouldn't be recognized.
+ gdb_test "break main" \
+     "Function \"main\" not defined\.|Breakpoint .* (deferred).*\"main\".*" \
+     "attempt to break on non-existent main in $srcfile"
+ 
+ # should run to first executable line in program foo
+ gdb_test "run" \
+     "Starting program: .*$testfile.*Breakpoint $decimal, _MAIN_ .* at .*$srcfile:.*in program foo.*" \
+     "run in $srcfile"
+ 
+ # should continue to end of program foo
+ gdb_test "continue" \
+  "Continuing.*in program foo.*in function subr.*Program exited normally.*" \
+  "continue in $srcfile" 
+ 
+ #
+ # Test program with program name and with function called "main"
+ #
+ 
+ set testfile "prog_main"
+ set srcfile ${testfile}.f
+ set binfile ${objdir}/${subdir}/${testfile}
+ 
+ if {[gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" executable {debug f77}] != ""} {
+     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+ }
+ 
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+ 
+ # test if program name "foo" is recognized; in this case should be recognized.
+ gdb_test "break foo" \
+     "Breakpoint $decimal at $hex: file .*$srcfile, line 6." \
+     "break on program foo in $srcfile"
+ 
+ # first see if main is recognized; in this case it should also be recognized.
+ gdb_test "break main" \
+     "Breakpoint $decimal at $hex: file .*$srcfile, line 13." \
+     "break on function main in $srcfile"
+ 
+ # should run to first executable line in program foo
+ gdb_test "run" \
+     "Starting program: .*$testfile.*Breakpoint $decimal, _MAIN_ .* at .*$srcfile:.*in program foo.*" \
+     "run to foo in $srcfile"
+ 
+ # should continue to first executable line in function main
+ gdb_test "continue" \
+     "Continuing.*Breakpoint $decimal, main \\(i=1\\) at .*$srcfile.*in function main.*" \
+     "continue to main in $srcfile" 
+ 
+ #
+ # Test program with no program name and with no function called "main"
+ #
+ 
+ set testfile "noprogormain"
+ set srcfile ${testfile}.f
+ set binfile ${objdir}/${subdir}/${testfile}
+ 
+ if {[gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" executable {debug f77}] != ""} {
+     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+ }
+ 
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+ 
+ # first see if main is recognized; in this case it shouldn't be recognized.
+ gdb_test "break main" \
+     "Function \"main\" not defined\.|Breakpoint .* (deferred).*\"main\".*" \
+     "attempt to break on non-existent main in $srcfile"
+ 
+ # see if default_main is recognized; it should be recognized.
+ gdb_test "break $default_main" \
+     "Breakpoint $decimal at $hex: file .*$srcfile, line 5." \
+     "break on $default_main in $srcfile"
+ 
+ # should run to first executable line in implied main
+ gdb_test "run" \
+     "Starting program: .*$testfile.*Breakpoint $decimal, _MAIN_ .* at .*$srcfile:.*in implied main.*" \
+     "run in $srcfile"
+ 
+ # should continue to end of program foo
+ gdb_test "continue" \
+  "Continuing.*in implied main.*in function subr.*Program exited normally.*" \
+  "continue in $srcfile" 
+ 
+ #
+ # Test program with no program name and with function called "main"
+ #
+ 
+ set testfile "noprog_main"
+ set srcfile ${testfile}.f
+ set binfile ${objdir}/${subdir}/${testfile}
+ 
+ if {[gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" executable {debug f77}] != ""} {
+     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+ }
+ 
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+ 
+ # first see if main is recognized; in this case it should be recognized.
+ gdb_test "break main" \
+     "Breakpoint $decimal at $hex: file .*$srcfile, line 12." \
+     "break on function main in $srcfile"
+ 
+ # see if default_main is recognized; it should also be recognized
+ gdb_test "break $default_main" \
+     "Breakpoint $decimal at $hex: file .*$srcfile, line 5." \
+     "break on $default_main in $srcfile"
+ 
+ # should run to first executable line in implied main
+ gdb_test "run" \
+     "Starting program: .*$testfile.*Breakpoint $decimal, _MAIN_ .* at .*$srcfile:.*in implied main.*" \
+     "run in $srcfile"
+ 
+ # should continue to first executable line in function main
+ gdb_test "continue" \
+     "Continuing.*Breakpoint $decimal, main \\(i=1\\) at .*$srcfile.*in function main.*" \
+     "continue to main in $srcfile" 
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/noprog_main.f gdb/testsuite/gdb.fortran/noprog_main.f
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/noprog_main.f	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/noprog_main.f	Thu Jul 22 17:49:58 1999
***************
*** 0 ****
--- 1,14 ----
+ C no program name, "main" subroutine
+ 
+ 	integer i
+ 	integer iarr(10)
+         print *, "in implied main"
+ 	i = 1
+ 	iarr(1) = main(1)
+ 	end
+ 
+ 	integer function main(i)
+ 	integer i
+         print *, "in function main"
+ 	main = i*2
+ 	end
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/noprogormain.f gdb/testsuite/gdb.fortran/noprogormain.f
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/noprogormain.f	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/noprogormain.f	Thu Jul 22 17:50:05 1999
***************
*** 0 ****
--- 1,14 ----
+ C no program name, no "main" subroutine
+ 
+ 	integer i
+ 	integer iarr(10)
+         print *, "in implied main"
+ 	i = 1
+ 	iarr(1) = subr(1)
+ 	end
+ 
+ 	integer function subr(i)
+ 	integer i
+         print *, "in function subr"
+ 	subr = i*2
+ 	end
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/params.exp gdb/testsuite/gdb.fortran/params.exp
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/params.exp	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/params.exp	Thu Jul 22 17:50:06 1999
***************
*** 0 ****
--- 1,75 ----
+ # This file was written by Sue Kimura. (sue_kimura@hp.com)
+ #
+ # Fortran named constants test
+ #
+ # Source file: params.f
+ 
+ if { ![istarget "hppa*-*-hpux*"] } {
+     return 0
+ }
+ 
+ if $tracelevel {
+     strace $tracelevel
+ }
+ 
+ #
+ # test running programs
+ #
+ set prms_id 0
+ set bug_id 0
+ 
+ set testfile "params"
+ set srcfile ${testfile}.f
+ set binfile ${objdir}/${subdir}/${testfile}
+ 
+ if [get_compiler_info ${binfile} f77] {
+     return -1
+ }
+ 
+ if { ! $hp_f77_compiler && ! $hp_f90_compiler } {
+     return 0
+ }
+ 
+ if { [gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" executable {debug f77}] != "" } {
+     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+ }
+ 
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+ 
+ #
+ # set it up at a breakpoint so we can play with the variable values
+ #
+ 
+ if ![runto parameters ] {
+     perror "couldn't run to breakpoint named_constants"
+     continue
+ }
+ 
+ # verify contents and types of named constants
+ 
+ gdb_test "print ch"  " = 'GUESS MY LENGTH'"   "print ch"
+ gdb_test "ptype ch"  "type = character\\*15"  "ptype ch"
+ 
+ gdb_test "print name1"  " = 'WILLIAM'"          "print name1"
+ gdb_test "ptype name1"  "type = character\\*7"  "ptype name1"
+ 
+ gdb_test "print name2"  " = 'DAVID'"            "print name2"
+ gdb_test "ptype name2"  "type = character\\*5"  "ptype name2"
+ 
+ gdb_test "print length"  " = 15"               "print length"
+ gdb_test "ptype length"  "type = integer\\*4"  "ptype length"
+ 
+ gdb_test "print first_name_greater" " = .TRUE." "print first_name_greater"
+ gdb_test "ptype first_name_greater" \
+     "type = logical\\*4" "ptype first_name_greater"
+ 
+ gdb_test "print scnd_name_greater" " = .FALSE." "print scnd_name_greater"
+ gdb_test "ptype scnd_name_greater" \
+     "type = logical\\*4" "ptype scnd_name_greater"
+ 
+ # gdb allows modification of character constants
+ gdb_test "set name1=name2" "" "modification of character constants"
+ gdb_test "print name1"     " = 'DAVID  '"  "name1 modified"
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/params.f gdb/testsuite/gdb.fortran/params.f
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/params.f	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/params.f	Thu Jul 22 17:50:06 1999
***************
*** 0 ****
--- 1,27 ----
+ C HP f77 example from /opt/fortran/lib/demos/Reference
+ 
+       PROGRAM PARAMETERS
+   
+       LOGICAL      FIRST_NAME_GREATER, SCND_NAME_GREATER
+       CHARACTER    CH*(*), NAME1*(*), NAME2*(*)
+       INTEGER      LENGTH
+   
+       PARAMETER    (CH     = 'GUESS MY LENGTH')
+       PARAMETER    (NAME1  = 'WILLIAM',
+      +              NAME2  = 'DAVID')
+   
+       PARAMETER    (LENGTH = LEN(CH))
+   
+       PARAMETER    (FIRST_NAME_GREATER = NAME1 .GT. NAME2,
+      +              SCND_NAME_GREATER  = NAME2 .GT. NAME1)
+   
+       WRITE (6,10) CH, LENGTH
+       IF (FIRST_NAME_GREATER) THEN
+       WRITE (6,*) NAME1, ' IS LEXICALLY GREATER THAN ', NAME2
+       ELSE IF (SCND_NAME_GREATER) THEN
+       WRITE (6,*) NAME2, ' IS LEXICALLY GREATER THAN ', NAME1
+       ELSE
+       WRITE (6,*) NAME1, 'AND', NAME 2, 'HAVE THE SAME NAME'
+       END IF
+   10  FORMAT (' THE LENGTH OF ''',(A),''' IS ',I2)
+       END
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/params1.exp gdb/testsuite/gdb.fortran/params1.exp
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/params1.exp	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/params1.exp	Thu Jul 22 17:50:06 1999
***************
*** 0 ****
--- 1,80 ----
+ # This file was written by Sue Kimura. (sue_kimura@hp.com)
+ #
+ # Fortran named constants test
+ #
+ # Source file: params1.f
+ 
+ if { ![istarget "hppa*-*-hpux*"] } {
+     return 0
+ }
+ 
+ if $tracelevel {
+     strace $tracelevel
+ }
+ 
+ #
+ # test running programs
+ #
+ set prms_id 0
+ set bug_id 0
+ 
+ proc check_expr {name value type} {
+    gdb_test "print $name"  "= $value"  "print $name"
+    gdb_test "ptype $name"  "$type"     "ptype $name"
+ }
+ 
+ set testfile "params1"
+ set srcfile ${testfile}.f
+ set binfile ${objdir}/${subdir}/${testfile}
+ 
+ if [get_compiler_info ${binfile} f77] {
+     return -1
+ }
+ 
+ if { ! $hp_f77_compiler && ! $hp_f90_compiler } {
+     return 0
+ }
+ 
+ if {[gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" executable {debug f77}] != ""} {
+     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+ }
+ 
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+ 
+ #
+ # set it up at a breakpoint so we can play with the variable values
+ #
+ 
+ if ![runto named_constants ] then {
+     perror "couldn't run to breakpoint named_constants"
+     continue
+ }
+ 
+ # verify contents and types of named constants
+ 
+ check_expr "gi1" "14"               "integer\\*4"
+ check_expr "gi2" "12"               "integer\\*2"
+ check_expr "gi3" "-1"               "integer\\*4"
+ check_expr "gi4" "74"               "integer\\*4"
+ check_expr "gi5" "11"               "integer\\*4"
+ check_expr "gi6" "10"               "integer\\*4"
+ if {$hp_f90_compiler} {setup_xfail "hppa*-*-hpux10.20"}
+ check_expr "gr1" "100"              "real\\*4"
+ if {$hp_f90_compiler} {setup_xfail "hppa*-*-hpux10.20"}
+ check_expr "gr2" "2000"             "real\\*4"
+ check_expr "gr3" "30000"            "real\\*8"
+ check_expr "gr4" "400000"           "real\\*8"
+ check_expr "gr5" "60000000"         "real\\*16"
+ check_expr "gb1" ".TRUE."           "logical\\*4"
+ check_expr "gb2" ".FALSE."          "logical\\*1"
+ check_expr "gb3" ".TRUE."           "logical\\*2"
+ check_expr "gb4" ".FALSE."          "logical\\*4"
+ check_expr "gc1" "'a'"              "character\\*1"
+ check_expr "gc2" "'hfhhf'"          "character\\*5"
+ check_expr "gx1" "\\(3.5,400\\)"    "complex\\*8"
+ check_expr "gx2" "\\(4.5,5000\\)"   "complex\\*8"
+ check_expr "gx3" "\\(5.5,60000\\)"  "complex\\*16"
+ check_expr "gx4" "\\(6.5,700000\\)" "complex\\*16"
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/params1.f gdb/testsuite/gdb.fortran/params1.f
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/params1.f	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/params1.f	Thu Jul 22 17:50:06 1999
***************
*** 0 ****
--- 1,66 ----
+ C Fortran names constants test
+ C Gets compile-time errors with f90 compiler
+ 
+       program named_constants
+ 
+       integer           GI1
+       integer*2         GI2
+       integer*4         GI3
+       integer		GI4
+       integer		GI5
+       integer		GI6
+ 
+       real              GR1
+       real*4            GR2
+       real*8            GR3
+       double precision  GR4
+       real*16           GR5
+ 
+       logical           GB1
+       logical*1         GB2
+       logical*2         GB3
+       logical*4         GB4
+ 
+       character         GC1
+       character(5)      GC2
+       complex           GX1
+       complex*8         GX2
+       complex*16        GX3
+       double complex    GX4
+ 
+       parameter( GI1 = 14, GI2 = 12, GI3 = -1 )
+       parameter( GI4 = B'01001010', GI5 = O'13', GI6 = Z'A' )
+ 
+       parameter( GR1 = 1E2, GR2 = 2E3, GR3 = 3D4, GR5 = 6Q7, GR4 = 4d5 )
+ 
+       parameter( GB1 = .TRUE., GB2 = .FALSE. )
+       parameter( GB3 = .TRUE., GB4 = .FALSE. )
+ 
+       parameter(GC1 = 'a', GC2 = "hfhhf" )
+ 
+       parameter( GX1 = (3.5, 4E2), GX2 = (4.5, 5E3) )
+       parameter( GX3 = (5.5, 6E4), GX4 = (6.5, 7E5) )
+ 
+       print *, "GI1 = ",  GI1
+       print *, "GI2 = ",  GI2
+       print *, "GI3 = ",  GI3
+       print *, "GI4 = ",  GI4
+       print *, "GI5 = ",  GI5
+       print *, "GI6 = ",  GI6
+       print *, "GR1 = ",  GR1
+       print *, "GR2 = ",  GR2
+       print *, "GR3 = ",  GR3
+       print *, "GR4 = ",  GR4
+       print *, "GR5 = ",  GR5
+       print *, "GB1 = ",  GB1
+       print *, "GB2 = ",  GB2
+       print *, "GB3 = ",  GB3
+       print *, "GB4 = ",  GB4
+       print *, "GC1 = ",  GC1
+       print *, "GC2 = ",  GC2
+       print *, "GX1 = ",  GX1
+       print *, "GX2 = ",  GX2
+       print *, "GX3 = ",  GX3
+       print *, "GX4 = ",  GX4
+ 
+       end
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/prog_main.f gdb/testsuite/gdb.fortran/prog_main.f
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/prog_main.f	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/prog_main.f	Thu Jul 22 17:49:58 1999
***************
*** 0 ****
--- 1,15 ----
+ C program name, "main" subroutine
+ 
+ 	program foo
+ 	integer i
+ 	integer iarr(10)
+         print *, "in program foo"
+ 	i = 1
+ 	iarr(1) = main(1)
+ 	end
+ 
+ 	integer function main(i)
+ 	integer i
+         print *, "in function main"
+ 	main = i*2
+ 	end
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/prog_nomain.f gdb/testsuite/gdb.fortran/prog_nomain.f
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/prog_nomain.f	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/prog_nomain.f	Thu Jul 22 17:49:59 1999
***************
*** 0 ****
--- 1,15 ----
+ C program name, no "main" subroutine
+ 
+ 	program foo
+ 	integer i
+ 	integer iarr(10)
+         print *, "in program foo"
+ 	i = 1
+ 	iarr(1) = subr(1)
+ 	end
+ 
+ 	integer function subr(i)
+ 	integer i
+         print *, "in function subr"
+ 	subr = i*2
+ 	end
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/rtypes.exp gdb/testsuite/gdb.fortran/rtypes.exp
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/rtypes.exp	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/rtypes.exp	Thu Jul 22 17:49:59 1999
***************
*** 0 ****
--- 1,103 ----
+ #   Copyright (C) 1988, 1990, 1991, 1992, 1994 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 2 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, write to the Free Software
+ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+ 
+ # Please email any bugs, comments, and/or additions to this file to:
+ # bug-gdb@prep.ai.mit.edu
+ 
+ # This file was written by Sue Kimura. (sue_kimura@hp.com)
+ 
+ if { ![istarget "hppa*-*-hpux*"] } {
+     return 0
+ }
+ 
+ if $tracelevel {
+     strace $tracelevel
+ }
+ 
+ #
+ # test running programs
+ #
+ set prms_id 0
+ set bug_id 0
+ 
+ set testfile "rtypes"
+ set srcfile ${testfile}.f
+ set binfile ${objdir}/${subdir}/${testfile}
+ 
+ if [get_compiler_info ${binfile} f77] {
+     return -1
+ }
+ 
+ if { ! $hp_f77_compiler && ! $hp_f90_compiler } {
+     return 0
+ }
+ 
+ if {[gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" executable {debug f77}] != ""} {
+     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+ }
+ 
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+ 
+ #
+ # set it up at a breakpoint so we can play with the variable values
+ #
+ 
+ if ![runto _MAIN_ ] {
+     perror "couldn't run to breakpoint _MAIN_"
+     continue
+ }
+ 
+ # test real type variables
+ 
+ gdb_test "ptype r"    "type = real\\*4"  "ptype r"
+ gdb_test "print r"    " = 1.5"    "print r"
+ gdb_test "p r = 2.5"  " = 2.5"     "modify r"
+ 
+ gdb_test "ptype r4"    "type = real\\*4"  "ptype r4"
+ gdb_test "print r4"    " = 3.5"     "print r4"
+ gdb_test "p r4 = 4.5"  " = 4.5"    "modify r4"
+ 
+ gdb_test "ptype r8"    "type = real\\*8"        "ptype r8"
+ gdb_test "print r8"    " = 5.5"  "print r8"
+ gdb_test "p r8 = 6.5"  " = 6.5"                 "modify r8"
+ 
+ 
+ gdb_test "ptype r16"    "type = real\\*16"                        "ptype r16"
+ gdb_test "print r16"    " = 7.5"  "print r16"
+ gdb_test "p r16 = 8.5"  " = 8.5"  "modify r16"
+ 
+ # test some simple expressions
+ 
+ gdb_test "p r = r + 4"    " = 6.5"   "print r + 4" 
+ gdb_test "p r4 = r4 + 4"  " = 8.5"  "print r4 + 4" 
+ gdb_test "p r8 = r8 + 8"  " = 14.5"        "print r8 + 8" 
+ gdb_test "p r16 = r16 + 16" " = 24.5" "print r16 + 16" 
+ 
+ # test complex type variables
+ gdb_test "ptype c"          "type = complex\\*8"      "ptype c"
+ gdb_test "print c"          " = \\(9,0\\)"            "print c"
+ gdb_test "p c = (0.5,9.0)"  " = \\(0.5,9\\)"  "modify c"
+ 
+ gdb_test "ptype c8"          "type = complex\\*8"              "ptype c8"
+ gdb_test "print c8"          " = \\(9.5,0\\)"           "print c8"
+ gdb_test "p c8 = (8.5,9.5)"  " = \\(8.5,9.5\\)"  "modify c8"
+ 
+ gdb_test "ptype c16"          "type = complex\\*16"           "ptype c16"
+ gdb_test "print c16"          " = \\(7.5,0\\)" "print c16"
+ gdb_test "p c16 = (6.5,7.5)"  " = \\(6.5,7.5\\)"  "modify c16"
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/rtypes.f gdb/testsuite/gdb.fortran/rtypes.f
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/rtypes.f	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/rtypes.f	Thu Jul 22 17:49:59 1999
***************
*** 0 ****
--- 1,15 ----
+        program real_types
+        
+        real    ::r   = 1.5
+        real*4  ::r4  = 3.5
+        real*8  ::r8  = 5.5
+        real*16 ::r16 = 7.5
+ 
+        complex      ::c   =  9.0
+        complex * 8  ::c8  =  9.5
+        complex * 16 ::c16 =  7.5
+        
+ C complex*16 and double complex are equivalent
+        double complex ::dc = 5.5
+  
+        end
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/solibf.exp gdb/testsuite/gdb.fortran/solibf.exp
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/solibf.exp	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/solibf.exp	Thu Jul 22 17:50:01 1999
***************
*** 0 ****
--- 1,121 ----
+ #   Copyright (C) 1997 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 2 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, write to the Free Software
+ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+ 
+ # This file was written by Sue Kimura  (sue_kimura@hp.com)
+ #
+ # This tests access to local variables in Fortran shared libraries
+ 
+ # This test is presently only valid on HP-UX, since it requires
+ # that we use HP-UX-specific compiler & linker options to build
+ # the testcase.
+ #
+ if { ![istarget "hppa*-*-hpux*"] } {
+     return 0
+ }
+ 
+ if $tracelevel {
+     strace $tracelevel
+ }
+ 
+ set prms_id 0
+ set bug_id 0
+ 
+ # are we on a target board
+ if ![isnative] {
+     return
+ }
+ 
+ set prototypes 0
+ set testfile "solibf"
+ set srcfile ${testfile}.f
+ set srcfile1 ${testfile}1.f
+ set srcfile2 ${testfile}2.f
+ set binfile ${objdir}/${subdir}/${testfile}
+ set testfile1 ${objdir}/${subdir}/${testfile}1.o
+ set testfile2 ${objdir}/${subdir}/${testfile}2.o
+ set libfile1 ${objdir}/${subdir}/${testfile}1.sl
+ set libfile2 ${objdir}/${subdir}/${testfile}2.sl
+ 
+ if [get_compiler_info ${binfile} f77] {
+     return -1
+ }
+ 
+ if { ! $hp_f77_compiler && ! $hp_f90_compiler } {
+     return 0
+ }
+ 
+ # Build the shared libraries this test case needs.
+ 
+ if {[gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${testfile1}" object {debug f77 additional_flags=+z}] != ""} {
+     perror "Couldn't compile ${srcfile1}"
+     return -1
+ }
+ 
+ if {[gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${testfile2}" object {debug f77 additional_flags=+z}] != ""} {
+     perror "Couldn't compile ${srcfile2}"
+     return -1
+ }
+ 
+ remote_exec build "ld -b ${testfile1} -o ${libfile1}"
+ remote_exec build "ld -b ${testfile2} -o ${libfile2}"
+ 
+ # Build the test case
+ 
+ if {[gdb_compile "${srcdir}/${subdir}/${srcfile} ${libfile1} ${libfile2}" "${binfile}" executable {debug f77}] != ""} {
+     perror "Couldn't build ${binfile}"
+     return -1
+ }
+ 
+ # Start with a fresh gdb
+ 
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+ 
+ if ![runto _MAIN_ ] { fail "runto _MAIN" }
+ 
+ # set breakpoints in shared library functions
+ gdb_test "b s1_func" \
+     "Breakpoint $decimal at $hex: file .*$srcfile1, line 4." 
+ gdb_test "b s2_func" \
+     "Breakpoint $decimal at $hex: file .*$srcfile2, line 3." 
+ 
+ # continue to first breakpoint
+ gdb_test "continue" \
+     "Continuing.*Breakpoint $decimal, s1_func \\(s1_parm=123\\).*s1_loc = 467" \
+     "continue to s1_func"
+ gdb_test "next" ".* call s2_func \\(s1_parm\\)" "step past assn to s1_loc"
+ 
+ # continue to s2_func from s1_func, first call
+ gdb_test "continue" \
+     "Continuing.*Breakpoint $decimal, s2_func \\(s2_parm=123\\).*print.*s2_parm" \
+     "continue to s2_func, calling from s1_func with s1_parm"
+ 
+ gdb_test "continue" \
+     "Continuing.*Breakpoint $decimal, s2_func \\(s2_parm=467\\).*print.*s2_parm" \
+     "continue to s2_func, calling from s1_func with s1_loc"
+ gdb_test "continue" \
+     "Continuing.*Breakpoint $decimal, s2_func \\(s2_parm=5\\).*print.*s2_parm" \
+     "continue to s2_func, calling from s1_func with s1_g"
+ 
+ gdb_test "continue" \
+     "Continuing.*Breakpoint $decimal, s2_func \\(s2_parm=321\\).*print.*s2_parm" \
+     "continue to s2_func, calling from main with solib_i"
+ 
+ gdb_test "continue" \
+     "Continuing.*Program exited normally.*Temporarily disabling shared library breakpoints:.*" \
+     "continue to end"
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/solibf.f gdb/testsuite/gdb.fortran/solibf.f
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/solibf.f	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/solibf.f	Thu Jul 22 17:50:02 1999
***************
*** 0 ****
--- 1,6 ----
+       program solib
+       integer *4 :: solib_i = 123
+       call  s1_func (solib_i)
+       solib_i = 321
+       call  s2_func (solib_i)
+       end
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/solibf1.f gdb/testsuite/gdb.fortran/solibf1.f
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/solibf1.f	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/solibf1.f	Thu Jul 22 17:50:02 1999
***************
*** 0 ****
--- 1,9 ----
+       subroutine s1_func (s1_parm)
+       integer*4 s1_loc, s1_parm
+       integer*4 ::s1_g = 5
+       s1_loc = 467
+       call s2_func (s1_parm)
+       call s2_func (s1_loc)
+       call s2_func (s1_g)
+       return
+       end
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/solibf2.f gdb/testsuite/gdb.fortran/solibf2.f
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/solibf2.f	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/solibf2.f	Thu Jul 22 17:50:02 1999
***************
*** 0 ****
--- 1,5 ----
+       subroutine s2_func (s2_parm)
+       integer*4 s2_parm
+       print *, "s2_parm=", s2_parm
+       return
+       end
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/stepnext.exp gdb/testsuite/gdb.fortran/stepnext.exp
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/stepnext.exp	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/stepnext.exp	Thu Jul 22 17:50:00 1999
***************
*** 0 ****
--- 1,114 ----
+ # This file was written by Sue Kimura. (sue_kimura@hp.com)
+ #
+ # Fortran test to verify that step and next work properly on a f77 program.
+ #
+ # Source file: stepnext.f
+ 
+ if { ![istarget "hppa*-*-hpux*"] } {
+     return 0
+ }
+ 
+ if $tracelevel {
+     strace $tracelevel
+ }
+ 
+ #
+ # test running programs
+ #
+ set prms_id 0
+ set bug_id 0
+ 
+ set testfile "stepnext"
+ set srcfile ${testfile}.f
+ set binfile ${objdir}/${subdir}/${testfile}
+ 
+ if [get_compiler_info ${binfile} f77] {
+     return -1
+ }
+ 
+ if { ! $hp_f77_compiler && ! $hp_f90_compiler } {
+     return 0
+ }
+ 
+ if {[gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" executable {debug f77}] != ""} {
+     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+ }
+ 
+ set MAIN "main"
+ if { [istarget "hppa*-*-hpux*"] } { set MAIN "_MAIN_" }
+ 
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+ 
+ if ![runto step_and_next ] {
+     perror "couldn't run to breakpoint step_and_next"
+     return -1
+ }
+ 
+ #test step
+ gdb_test "step" \
+     "square \\(x=2\\) at .*$srcfile.*square = x \\* x" \
+     "step into square from main"
+ gdb_test "step" \
+     ".*end function square" \
+     "step to end of square first time"
+ # The following test will fail if the problem is fixed in f90 -- 
+ # see JAGab14095
+ if {$hp_f90_compiler} {
+     gdb_test "step" \
+ 	".*end function square" \
+ 	"extra step to end of square first time"
+ }
+ gdb_test "step" \
+     "$MAIN \\(.*\\) at .*$srcfile.*call simple_subroutine\\(\\)" \
+     "step back from square to main"
+ gdb_test "step" \
+     "simple_subroutine \\(\\) at .*$srcfile.*i = 2" \
+     "step into simple_subroutine from main"
+ gdb_test "step 2" \
+     ".*i = square \\(float\\(i\\)\\)" \
+     "2 steps just before call to square from simple_subroutine"
+ gdb_test "step" \
+     "square \\(x=3\\) at .*$srcfile.*square = x \\* x" \
+     "step into square from simple_subroutine"
+ gdb_test "step" \
+     ".*end function square" \
+     "step to end of square second time"
+ # The following test will fail if the problem is fixed in f90 -- 
+ # see JAGab14095
+ if {$hp_f90_compiler} {
+     gdb_test "step" \
+ 	".*end function square" \
+ 	"extra step to end of square second time"
+ }
+ gdb_test "step" \
+     "simple_subroutine \\(\\) at .*$srcfile.*j = j \\+ 1.0" \
+     "step back into simple_subroutine from square"
+ gdb_test "step" \
+     ".*end subroutine simple_subroutine" \
+     "step to end of simple_subroutine"
+ gdb_test "step" \
+     "$MAIN \\(.*\\) at .*$srcfile.*end program step_and_next" \
+     "step back into main from simple_subroutine"
+ 
+ #test next
+ 
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+ 
+ if ![runto step_and_next ] {
+     perror "couldn't run to breakpoint step_and_next"
+     return -1
+ }
+ 
+ gdb_test "next" \
+     "$decimal.*call simple_subroutine\\(\\)" \
+     "next first time"
+ 
+ gdb_test "next" \
+     "$decimal.*end program step_and_next" \
+     "next again"
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/stepnext.f gdb/testsuite/gdb.fortran/stepnext.f
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/stepnext.f	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/stepnext.f	Thu Jul 22 17:50:00 1999
***************
*** 0 ****
--- 1,27 ----
+        program step_and_next
+        
+        real*4 ::r = 2
+        r = square (r)
+        call simple_subroutine()
+ 
+        end program step_and_next
+        
+        
+        real*4 function square( x )
+        real*4 x
+    
+        square = x * x
+ 
+        end function square
+ 
+ 
+        subroutine simple_subroutine()
+        integer*4 i
+        integer*4 j
+         
+        i = 2
+        i = i + 1.0
+        i = square (float(i))
+        j = j + 1.0
+ 
+        end subroutine simple_subroutine
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/strings.exp gdb/testsuite/gdb.fortran/strings.exp
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/strings.exp	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/strings.exp	Thu Jul 22 17:50:00 1999
***************
*** 0 ****
--- 1,123 ----
+ # Author: Ovidiu Predescu <ovidiu@cup.hp.com>, Aug 28, 1998
+ #
+ # Check the Fortran strings
+ 
+ if { ![istarget "hppa*-*-hpux*"] } {
+     return 0
+ }
+ 
+ if $tracelevel {
+     strace $tracelevel
+ }
+ 
+ set testfile "strings"
+ set srcfile ${testfile}.f
+ set srcfile1 ${testfile}_a.f
+ set binfile ${objdir}/${subdir}/${testfile}
+ 
+ if [get_compiler_info ${binfile} f77] {
+     return -1
+ }
+ 
+ if { ! $hp_f77_compiler && ! $hp_f90_compiler } {
+     return 0
+ }
+ 
+ if {[gdb_compile "$srcdir/$subdir/$srcfile $srcdir/$subdir/$srcfile1" "$binfile" executable {debug f77}] != ""} {
+     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+ }
+ 
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+ 
+ # set up break points and get to first breakpoint
+ 
+ gdb_test "break subr1" \
+     "Breakpoint $decimal at $hex: file .*$srcfile.*" \
+     "break in subr1"
+ 
+ gdb_test "break subr2" \
+     "Breakpoint $decimal at $hex: file .*$srcfile.*" \
+     "break in subr2"
+ 
+ gdb_test "break subr3" \
+     "Breakpoint $decimal at $hex: file .*$srcfile.*" \
+     "break in subr3"
+ 
+ gdb_test "break subr4" \
+   "Breakpoint $decimal at $hex: file .*$srcfile1.*" \
+   "break in subr4"
+ 
+ # Run the program and check the output from the first breakpoint
+ gdb_test "run" \
+     "Starting program: \[^\n\]*\r\.*cstring='ab'.*" \
+     "stop in subr1"
+ 
+ gdb_test "ptype cstring" \
+     "type = character\\\*53" \
+     "type of cstring in subr1"
+ 
+ # Continue running the program and check the output from the second
+ # breakpoint
+ 
+ gdb_test "continue" \
+     "Breakpoint.*cstring='cd'.*" \
+     "stop in subr2; called from subr1"
+ 
+ gdb_test "ptype cstring" \
+     "type = character\\\*50" \
+     "type of cstring in subr2"
+ 
+ # Continue to second breakpoint again; called from main this time
+ 
+ gdb_test "continue" \
+     "Breakpoint.*cstring='ef'.*" \
+     "stop in subr2; called from subr1"
+ 
+ gdb_test "ptype cstring" \
+     "type = character\\\*50" \
+     "type of cstring in subr2"
+ 
+ # Continue to third breakpoint -- testing multiple string parameters
+ 
+ gdb_test "continue" \
+     "Breakpoint.*cstring1='ef'.*cstring2='cdefg'.*" \
+     "stop in subr3; called from main"
+ 
+ gdb_test "ptype cstring1" \
+     "type = character\\\*53" \
+     "type of cstring1 in subr3"
+ 
+ gdb_test "ptype cstring2" \
+     "type = character\\\*55" \
+     "type of cstring2 in subr3"
+ 
+ # Continue to fourth breakpoint -- testing string parameters in function
+ # compiled separately
+ 
+ if {[istarget "hppa2.0w*-*-hpux*"]} {
+      xfail  "remaining test points ignored -- see JAGab25245"
+      continue
+ }
+ 
+ gdb_test "continue" \
+     "Breakpoint.*cstring='9876543210', ' ' <repeats 43 times>, cstring_arr=\\(<assumed size array> \\( ' ' <repeats 80 times>, ' ' <repeats 80 times>\\) \\).*" \
+     "stop in subr4; called from main"
+ 
+ gdb_test "ptype cstring" \
+     "type = character\\\*53" \
+     "type of cstring in subr4"
+ 
+ gdb_test "ptype cstring_arr" \
+     "type = character\\\*80 \\(2,\\\*\\)" \
+     "type of cstring_arr in subr4"
+ 
+ gdb_test "until 10" \
+     "subr4.*at.*$srcfile1:10.*end" \
+     "continue until end of subr4"
+ 
+ gdb_test "print cstring_arr(1,2)" \
+     ".*= '98765', ' ' <repeats 75 times>" \
+     "print cstring_arr(1,2) in subr4"
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/strings.f gdb/testsuite/gdb.fortran/strings.f
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/strings.f	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/strings.f	Thu Jul 22 17:50:00 1999
***************
*** 0 ****
--- 1,37 ----
+          integer i
+          character (53) two
+          data two /'ab'/
+          character (55) three
+          data three /'cdefg'/
+          character four (2,2)*80
+          data four /4*' '/
+          
+          i = 1
+          call subr1 (i, two)
+ 	 call subr2 (i, two)
+          call subr3 (two, three, i)
+          call subr4 (two, four)
+          end
+ 
+          subroutine subr1 (i, cstring)
+          integer i
+          character (*) cstring
+          cstring = "cd"
+          j = i*2
+          call subr2 (i, cstring)
+          end
+ 
+          subroutine subr2 (i, cstring)
+          integer i,j
+          character (50) cstring
+          cstring = "ef"
+          j = i*2
+          end
+ 
+          subroutine subr3 (cstring1, cstring2, i)
+          integer i,j
+          character (*) cstring1, cstring2
+          cstring1 = "9876543210"
+          cstring2 = "1234xxx890"
+          j = i*2
+          end
diff -c -N ../gdb-19990719/gdb/testsuite/gdb.fortran/strings_a.f gdb/testsuite/gdb.fortran/strings_a.f
*** ../gdb-19990719/gdb/testsuite/gdb.fortran/strings_a.f	Wed Dec 31 16:00:00 1969
--- gdb/testsuite/gdb.fortran/strings_a.f	Thu Jul 22 17:50:03 1999
***************
*** 0 ****
--- 1,11 ----
+       subroutine subr4 ( cstring, cstring_arr )
+ 
+       character  cstring*(*)
+       character  cstring_arr(2,*)*(*)
+       integer    k1
+  
+       k1 = 5
+       cstring_arr(1,2)(1:k1) = cstring
+ 
+       end
+      


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]