[comp.sys.sgi] f77 dumped core.

merritt@iris613.gsfc.nasa.gov (John H Merritt) (02/22/90)

f77 could not digest the following program; it handled it fine when
I have the declaration of the character variable.
--------------------   cut   ---------------------------------
      program test
*      character*80 inpfile
*      inpfile = '10-28-86'
      open(1,file="/usr/local/lib/"//inpfile,
     *       status='old',err=111,form='unformatted',
     *access='direct',recl=5752)

      print*,'Open SUCCESSFUL'
      stop

 111  print*,'Open FAILED'
      stop
      end
--------------------   cut   ---------------------------------
Here is the response I received for 'f77 test.f':

Fatal error in: /usr/lib/fcom - core dumped
 Signal 139 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
John H. Merritt                   #  Yesterday I knew nothing,
Applied Research Corporation      #  Today I know that.
merritt@iris613.gsfc.nasa.gov     #

calvin@dinkum.sgi.com (Calvin H. Vu) (02/23/90)

In article <975@dftsrv.gsfc.nasa.gov> merritt@iris613.gsfc.nasa.gov (John H Merritt) writes:


>f77 could not digest the following program; it handled it fine when
>I have the declaration of the character variable.
>--------------------   cut   ---------------------------------
>      program test
>*      character*80 inpfile
>*      inpfile = '10-28-86'
>      open(1,file="/usr/local/lib/"//inpfile,
>     *       status='old',err=111,form='unformatted',
>     *access='direct',recl=5752)

>      print*,'Open SUCCESSFUL'
>      stop

> 111  print*,'Open FAILED'
>      stop
>      end
>--------------------   cut   ---------------------------------
>Here is the response I received for 'f77 test.f':

>Fatal error in: /usr/lib/fcom - core dumped
> Signal 139 
	This has been fixed our next release which will give the appropriate
	error message:

	Error on line 4 of open.f: concatenation of nonchar data

>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>John H. Merritt                   #  Yesterday I knew nothing,
>Applied Research Corporation      #  Today I know that.
>merritt@iris613.gsfc.nasa.gov     #

Sorry about the trouble,

-Calvin Vu

merritt@iris613.gsfc.nasa.gov (John H. Merritt) (05/23/91)

Here is a small fortran program, with an obvious faux pas.
If you use f77 -c to compile you will get a core dump with signal 139.
Have you seen this one Calvin?

---  cut ---
      READ(iunit,end=200)
 200  FORMAT(//,' PROGRAM TERMINATION')
      END
---  cut ---

P.S. Irix 3.3.1
              John H. Merritt --> merritt@climate.gsfc.nasa.gov
              Applied Research Corporation at NASA/GSFC
              "I am generally intolerant of ignorance,
               but I have made an exception in your case."

calvin@dinkum.wpd.sgi.com (Calvin H. Vu) (05/24/91)

In <5393@dftsrv.gsfc.nasa.gov> merritt@iris613.gsfc.nasa.gov (John H. Merritt) writes:

| Here is a small fortran program, with an obvious faux pas.
| If you use f77 -c to compile you will get a core dump with signal 139.
| Have you seen this one Calvin?
| 
| ---  cut ---
|       READ(iunit,end=200)
|  200  FORMAT(//,' PROGRAM TERMINATION')
|       END
| ---  cut ---
| 
	If you compiled with -g then ugen does not coredump and you get
    a semi-intelligible error message from the assembler:

as1: Error: readdump.f, line 6: Not all branch-label symbols were defined

	The problem with catching user errors is that there are millions of
    different permutation of things that might go wrong and no human being
    can predict all of them in advance for proper error recovery.   We just 
    have to fix one at a time as we run into it.  
    At least there is a rule book for correctly written programs but when 
    it comes to all possible combinations of incorrectly written programs 
    I guess everybody is out in the wood.
    Anyway, thanks for letting us know.  I'll fix fcom to give an error
    message for it.

|               John H. Merritt --> merritt@climate.gsfc.nasa.gov
|               Applied Research Corporation at NASA/GSFC
|               "I am generally intolerant of ignorance,
|                but I have made an exception in your case."
--
-----------------------------------------------------------------------------
Calvin H. Vu			   | "We are each of us angels with only one
Silicon Graphics Computer Systems  | wing.  And we can only fly embracing
calvin@sgi.com   (415) 962-3679	   | each other."