[comp.unix.ultrix] Block data confuses pixie

pmontgom@euphemia.math.ucla.edu (Peter Montgomery) (05/31/91)

#! /bin/csh -f
#
#		This Fortran program has a block data bd after
#	subroutines sub1 and sub2 but before subroutines sub3 and sub4.
#	If we use pixie and prof -pixie on the program, then
#	the prof output begins
#
#		bd_ and main_ (a.f) synonymous: using latter
#		sub3_ is an alternate entry within sub2_ (a.f)
#		sub4_ is an alternate entry within sub2_ (a.f)
#		blkclr and bzero (../bzero.s) synonymous: using latter
#
#	Later the prof output shows 20000 cycles in sub1 and
#	60000 cycles in sub2, rather than equal amounts (assuming
#	no memory conflicts) in sub1, sub2, sub3, sub4.
#
#		We have ULTRIX V4.0 on a DEC 5000.
#
#		Problem reported May, 1991 by
#
#			Peter L. Montgomery
#			Department of Mathematics
#			University of California
#			Los Angeles, CA 90024-1555
#
#			pmontgom@math.ucla.edu
#
set dir = /tmp/pixdir			# Directory where test files will go
/bin/rm -f -r $dir
mkdir $dir
cd $dir
cat << EndProgram > a.f
	program main
	do i = 1, 10000
	    call sub1
	    call sub2
	    call sub3
	    call sub4
	end do
	stop 'Successful execution'
	end
	subroutine sub1
	end
	subroutine sub2
	end
	block data BD
	common/c/cvar
	data cvar/4.0/
	end	
	subroutine sub3
	end
	subroutine sub4
	end
EndProgram
f77 a.f
pixie -o a.out.pixie a.out
a.out.pixie				# Execute program
prof -pixie
--
        Peter L. Montgomery 
        pmontgom@MATH.UCLA.EDU 
        Department of Mathematics, UCLA, Los Angeles, CA 90024-1555
If I spent as much time on my dissertation as I do reading news, I'd graduate.