public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/42848]  New: compiler crashes and asks for this bug report
@ 2010-01-22 16:42 frank dot braun at rz dot uni-regensburg dot de
  2010-01-22 17:44 ` [Bug fortran/42848] " burnus at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: frank dot braun at rz dot uni-regensburg dot de @ 2010-01-22 16:42 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3453 bytes --]

Compiling a file with -c option (no exec)with gfortran lets the compiler output
an internal error message.

The file:

! Demoprogramm:
! Aufrufen einer C-Routine von Fortran aus

! Die C-Routine wird innerhalb eines Modules deklariert
   module cproc
      interface  ! definierte Schnittstelle
         subroutine pythagoras (a, b, res)
                 !DEC$ ATTRIBUTES C :: pythagoras
                 !DEC$ ATTRIBUTES REFERENCE :: res
             real :: a, b, res
         end subroutine
      end interface
        end module


program fmain
    use cproc
        implicit none
        real :: x, y, z

        write(*,*) ' Berechnung der Hypotenusenlaenge eines rechtwickligen
Dreie
cks'
        write(*,*) ' Geben Sie die beiden Seitenlaengen ein, die den rechten
Win
kel'
        write(*,*) ' einschliessen:'

        read(*,*) x, y

        call pythagoras(x,y,z)
        write(*,*) ' Die Laenge der Hypotenuse betraegt: ', z
end program fmain

The error message (translated by hand to english):

Administrator@PC55556 /c/vectra/fortran
$ gfortran -c fmain.f90
Unrecoverable error: Can't delete module file 'cproc.mod': Permission denied
gfortran.exe: Onternal error: Aborted (program f951)
Please send a complete error report in english
...
Administrator@PC55556 /c/vectra/fortran
$ gfortran -v
Target: mingw32
Configured with: ../gcc-4.4.0/configure --enable-languages=c,ada,c++,fortran,ja
va,objc,obj-c++ --disable-sjlj-exceptions --enable-shared --enable-libgcj
--enab
le-libgomp --with-dwarf2 --disable-win32-registry --enable-libstdcxx-debug
--ena
ble-version-specific-runtime-libs --prefix=/mingw
--with-gmp=/mingw/src/gmp/root
 --with-mpfr=/mingw/src/mpfr/root --build=mingw32
Thread-Modell: win32
gcc-Version 4.4.0 (GCC)

Administrator@PC55556 /c/vectra/fortran

The error message (original as it appeared on the screen):

Administrator@PC55556 /c/vectra/fortran
$ gfortran -c fmain.f90
Schwerwiegender Fehler: Can't delete module file 'cproc.mod': Permission denied
gfortran.exe: Interner Fehler: Aborted (Programm f951)
Bitte senden Sie einen vollständigen Fehlerbericht
auf Englisch ein; Fehler in der deutschen Übersetzung
sind an translation-team-de@lists.sourceforge.net zu melden.
Gehen Sie gem&#9500;ñ&#9500;ƒ den Hinweisen in <http://gcc.gnu.org/bugs.html>
vor.

Administrator@PC55556 /c/vectra/fortran
$ gfortran -v
Es werden eingebaute Spezifikationen verwendet.
Ziel: mingw32
Konfiguriert mit: ../gcc-4.4.0/configure
--enable-languages=c,ada,c++,fortran,ja
va,objc,obj-c++ --disable-sjlj-exceptions --enable-shared --enable-libgcj
--enab
le-libgomp --with-dwarf2 --disable-win32-registry --enable-libstdcxx-debug
--ena
ble-version-specific-runtime-libs --prefix=/mingw
--with-gmp=/mingw/src/gmp/root
 --with-mpfr=/mingw/src/mpfr/root --build=mingw32
Thread-Modell: win32
gcc-Version 4.4.0 (GCC)

Administrator@PC55556 /c/vectra/fortran


-- 
           Summary: compiler crashes and asks for this bug report
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: frank dot braun at rz dot uni-regensburg dot de
 GCC build triplet: MSYS full with gcc g++ and gfortran
  GCC host triplet: Dell Intel Windows Mingwin MSYS
GCC target triplet: Dell Intel Windows Mingwin MSYS


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/42848] compiler crashes and asks for this bug report
  2010-01-22 16:42 [Bug fortran/42848] New: compiler crashes and asks for this bug report frank dot braun at rz dot uni-regensburg dot de
@ 2010-01-22 17:44 ` burnus at gcc dot gnu dot org
  2010-01-23 13:25 ` toon at moene dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-01-22 17:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from burnus at gcc dot gnu dot org  2010-01-22 17:44 -------
Thanks for the bug report. However, I think this a duplicate of PR 40195 which
was fixed 2009-05-22.

Thus, the solution is to use any GCC 4.4.x or 4.5.x newer than 22 May 2009 such
as 4.4.1, 4.4.2, or 4.4.3 - or a recent 4.5 experimental version.

Comment from the other bug report:
"If a module file m.mod already exist, we look into it to check if it's ours;
if not, we delete it and write ours. The problem is that the code doing that
actually unlinks the file before closing it, which is not allowed on
Windows"

Thus, a work around is to delete the *.mod file(s) manually before instructing
gfortran to (over)write it.


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|compiler crashes and asks   |compiler crashes and asks
                   |for this bug report         |for this bug report


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/42848] compiler crashes and asks for this bug report
  2010-01-22 16:42 [Bug fortran/42848] New: compiler crashes and asks for this bug report frank dot braun at rz dot uni-regensburg dot de
  2010-01-22 17:44 ` [Bug fortran/42848] " burnus at gcc dot gnu dot org
@ 2010-01-23 13:25 ` toon at moene dot org
  2010-01-25  7:57 ` frank dot braun at rz dot uni-regensburg dot de
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: toon at moene dot org @ 2010-01-23 13:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from toon at moene dot org  2010-01-23 13:24 -------
Tobias,

If we ask a bug submitter for more information, or to confirm our suspicions,
we put the bug report in WAITING.

Note to submitter: bug reports with status WAITING will be closed if not
replied to within 3 months.

Kind regards.


-- 

toon at moene dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/42848] compiler crashes and asks for this bug report
  2010-01-22 16:42 [Bug fortran/42848] New: compiler crashes and asks for this bug report frank dot braun at rz dot uni-regensburg dot de
  2010-01-22 17:44 ` [Bug fortran/42848] " burnus at gcc dot gnu dot org
  2010-01-23 13:25 ` toon at moene dot org
@ 2010-01-25  7:57 ` frank dot braun at rz dot uni-regensburg dot de
  2010-01-25  8:30 ` burnus at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: frank dot braun at rz dot uni-regensburg dot de @ 2010-01-25  7:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from frank dot braun at rz dot uni-regensburg dot de  2010-01-25 07:57 -------
Today I am not able to reproduce the error. The compiler is working. Where
exactly does the file m.mod reside? In the user directory or in a compiler
directory?
Frank Braun

(In reply to comment #2)
> Tobias,
> 
> If we ask a bug submitter for more information, or to confirm our suspicions,
> we put the bug report in WAITING.
> 
> Note to submitter: bug reports with status WAITING will be closed if not
> replied to within 3 months.
> 
> Kind regards.
> 


-- 


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/42848] compiler crashes and asks for this bug report
  2010-01-22 16:42 [Bug fortran/42848] New: compiler crashes and asks for this bug report frank dot braun at rz dot uni-regensburg dot de
                   ` (2 preceding siblings ...)
  2010-01-25  7:57 ` frank dot braun at rz dot uni-regensburg dot de
@ 2010-01-25  8:30 ` burnus at gcc dot gnu dot org
  2010-01-25  8:36 ` frank dot braun at rz dot uni-regensburg dot de
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-01-25  8:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from burnus at gcc dot gnu dot org  2010-01-25 08:30 -------
(In reply to comment #3)
> Today I am not able to reproduce the error. The compiler is working. Where
> exactly does the file m.mod reside? In the user directory or in a compiler
> directory?

By default in the current directory - unless you used the option -J<directory>
to specify a different one.

Note: In order to help writing makefiles which have dependencies on the .mod
files, gfortran only overwrites the .mod files if they have changed. Thus, to
reproduce the problem, you could compile the program with a different compiler
or an older version of GCC - or simply create in any editor the .mod file.

(Modifying the Fortran module + running gfortran also produces a new .mod file,
but I think works also without the patch of PR 40195.)


-- 


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/42848] compiler crashes and asks for this bug report
  2010-01-22 16:42 [Bug fortran/42848] New: compiler crashes and asks for this bug report frank dot braun at rz dot uni-regensburg dot de
                   ` (3 preceding siblings ...)
  2010-01-25  8:30 ` burnus at gcc dot gnu dot org
@ 2010-01-25  8:36 ` frank dot braun at rz dot uni-regensburg dot de
  2010-04-30 22:14 ` dfranke at gcc dot gnu dot org
  2010-09-10 21:09 ` fxcoudert at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: frank dot braun at rz dot uni-regensburg dot de @ 2010-01-25  8:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from frank dot braun at rz dot uni-regensburg dot de  2010-01-25 08:36 -------
've got it. Modifying the .mod file by hand makes the compiler crash. Deleting
it lets it work correctly.

The compiler shouldn't crash anyway. But with a new version this problem should
be solved too, isn't it?


-- 


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/42848] compiler crashes and asks for this bug report
  2010-01-22 16:42 [Bug fortran/42848] New: compiler crashes and asks for this bug report frank dot braun at rz dot uni-regensburg dot de
                   ` (4 preceding siblings ...)
  2010-01-25  8:36 ` frank dot braun at rz dot uni-regensburg dot de
@ 2010-04-30 22:14 ` dfranke at gcc dot gnu dot org
  2010-09-10 21:09 ` fxcoudert at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2010-04-30 22:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from dfranke at gcc dot gnu dot org  2010-04-30 22:13 -------
(In reply to comment #5)
> The compiler shouldn't crash anyway. But with a new version this problem should
> be solved too, isn't it?

It should be. 4.5.0 was released by now. Could you check again?


-- 

dfranke at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dfranke at gcc dot gnu dot
                   |                            |org


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/42848] compiler crashes and asks for this bug report
  2010-01-22 16:42 [Bug fortran/42848] New: compiler crashes and asks for this bug report frank dot braun at rz dot uni-regensburg dot de
                   ` (5 preceding siblings ...)
  2010-04-30 22:14 ` dfranke at gcc dot gnu dot org
@ 2010-09-10 21:09 ` fxcoudert at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2010-09-10 21:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from fxcoudert at gcc dot gnu dot org  2010-09-10 21:08 -------
Closing, please reopen with additional information if the problem persists with
a more recent version of the compiler (>= 4.5.0). Thanks!


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |FIXED


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-09-10 21:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-22 16:42 [Bug fortran/42848] New: compiler crashes and asks for this bug report frank dot braun at rz dot uni-regensburg dot de
2010-01-22 17:44 ` [Bug fortran/42848] " burnus at gcc dot gnu dot org
2010-01-23 13:25 ` toon at moene dot org
2010-01-25  7:57 ` frank dot braun at rz dot uni-regensburg dot de
2010-01-25  8:30 ` burnus at gcc dot gnu dot org
2010-01-25  8:36 ` frank dot braun at rz dot uni-regensburg dot de
2010-04-30 22:14 ` dfranke at gcc dot gnu dot org
2010-09-10 21:09 ` fxcoudert at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).