[Bug fortran/40638] RTE: Unit number in I/O statement too large -- falls with any low value

2009-07-03 Thread burnus at gcc dot gnu dot org


--- Comment #1 from burnus at gcc dot gnu dot org  2009-07-03 14:19 ---
 gfortran 4.3.1. Attached 15 line  test program reproduces the effect

Can you attach the program?

I assume you compiled it with gfortran -Wall testfile.f and no further option
such a -malign-double or similar?

Can you also show the output of: gfortran -v?

You are not by chance mixing the library of an older gfortran with a binary of 
a newer gfortran or vice versa?

(Not a issue for your single-file test, but combining files compiled with 4.2.x
with 4.3.x/4.4.x compiled files, might also cause problems. 4.3 and 4.4 should
be compatible.)


 stops at line 8 with the error message: 
 At line 8 of file testlun.f
 Fortran runtime error: Unit number in I/O statement too large

 I am guessing this is hardware-related. It is a new system--ASUS MB with
 Intel Core I7 CPU. Identical code runs fine with same gfortran installed
 on a system equipped with an earlier Intel chip.

As GCC/gfortran is continuously tested one a wide range of systems (x86,
x86-64, ia64, sparc, s930, ...), I think it is unlikely that it is a Core i7
problem; I rather think that somehow the installation was messed up or some
strange option was used. After we solved the problem, we will know ...


-- 

burnus at gcc dot gnu dot org changed:

   What|Removed |Added

   Severity|blocker |normal
  GCC build triplet|gfortran -Wall testfile.f   |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40638



[Bug fortran/40638] RTE: Unit number in I/O statement too large -- falls with any low value

2009-07-03 Thread dtprice at shaw dot ca


--- Comment #2 from dtprice at shaw dot ca  2009-07-03 14:20 ---
Created an attachment (id=18134)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18134action=view)
Contains simple demo program and input file. Input file is not really needed
because program never opens it!


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40638



[Bug fortran/40638] RTE: Unit number in I/O statement too large -- falls with any low value

2009-07-03 Thread kargl at gcc dot gnu dot org


--- Comment #3 from kargl at gcc dot gnu dot org  2009-07-03 14:40 ---
Upgrade your compiler.  The bug appears to fixed in at least trunk
while the bug is present in 4.3.3.  I can't test 4.4.0 at the moment.

troutmask:sgk[203] gfc4x -o z testlun.f 
troutmask:sgk[204] ./z
troutmask:sgk[205] gfc43 -o z testlun.f 
troutmask:sgk[206] ./z
At line 8 of file testlun.f
Fortran runtime error: Unit number in I/O statement too large

PS: Your code would work fine with 4.3.x if you use a default
integer kind for the lun instead of an INTEGER(KIND=2)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40638