Fortran testsuite?

Kate Hedstrom kate@ahab.rutgers.edu
Sat Sep 13 19:04:00 GMT 1997


It seems to me that one thing that is missing in egcs is a Fortran
testsuite.  Is anyone working on one?  I looked a little at the 
way it is done for gcc and g++ and I have several questions about
it:

1. It seems like the gcc compile/execute split is a good way to go
for Fortran.  Right?  Will we need other directories for other
compiler flags (like one for free format code)?

2. Here is an example of something that once failed in g77:

      program complex_1
      complex      z0, z1, z2

      z0 = cmplx(0.,.5)
      z1 = 1./z0
      if (z1 .ne. cmplx(0.,-2)) stop 1

      z0 = 10.*z0
      if (z0 .ne. cmplx(0.,5.)) stop 2

      z2 = cmplx(1.,2.)
      z1 = z0/z2
      if (z1 .ne. cmplx(2.,1.)) stop 3

      z1 = z0*z2
      if (z1 .ne. cmplx(-10.,5.)) stop 4
      end

If it fails, it will print "STOP 1 statement reached", but the return
code to the OS is zero.  An alternate is to replace "stop 1" with
"call exit(1)" but this uses the library and will fail if the library
isn't built right.  Any comment?

3. I copied lib/gcc.exp to lib/g77.exp and changed gcc to g77, but
libgloss doesn't have a find_g77 in it.  I also looked at g++.exp for
how to find the compiler, but I'm still stuck.

I'm willing to put some time into this, but I'll need some guidance in
order to make it fit in with the existing structure.  I'm rather a
novice at tcl/expect.

Kate



More information about the Gcc mailing list