This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/40195] ICE when compiling a file located in another directory



------- Comment #2 from francois dot jacq at irsn dot fr  2009-05-21 18:27 -------
(In reply to comment #1)
> It works for me. This sounds like the issue you'd have if you didn't have write
> permission to the current directory.

I have all the permissions to that directory. The same command with g95 or
gfortran-4.3.3 works perfectly. 

Anyway, the compiler itself issued an ICE message ... and this is not normal !

I also got a similar trouble ("Can't delete the module file m.mod")  with the
binary package provided by www.equation.com (gcc-4.5 20090514), but without the
ICE message !

> 
>  What are the permissions and ownership of the bin and source directories? What
> user is trying to compile?

I have all the privileges. I created myself the directory tree d:\test\bin and
d:\test\source\t2.f90 because I met this trouble when installing a much more
complicated software. So I decided to create a simple test cases to try and
reproduce the problem.

However, your remark lead me to the right explanation : the problem is not due
to a change of directory as I suggested initially, but simply to the fact that
a file "m.mod", created by another compiler, was already located in the "bin"
directory !

For instance, in the directory d:\source :

d:\test\source>gfortran -c t2.f90
d:\test\source>g95 -c t2.f90
d:\test\source>gfortran -c t2.f90
Fatal Error: Can't delete module file 'm.mod': Permission denied
d:\test\source> del m.mod
d:\test\source>gfortran -c t2.f90

As you see, the first and third gfortran commands work well but not the second
one because of the presence of the g95 module. Notice that this second
instruction did not issue the ICE message because I was testing again the
"equations" package gcc-4.5-200090514.


-- 


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


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