public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/38248]  New: Fatal Error: Reading module mmm: Expected left parenthesis
@ 2008-11-24 15:20 jan dot kratochvil at redhat dot com
  2008-11-24 15:38 ` [Bug fortran/38248] " mikael at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: jan dot kratochvil at redhat dot com @ 2008-11-24 15:20 UTC (permalink / raw)
  To: gcc-bugs

Minimal testcase to `use' some module cannot be compiled.
Compilation works fine on Fedora gcc-gfortran-4.3.2-7.x86_64.

GNU Fortran (GCC) version 4.4.0 20081124 (experimental)
(x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.4.0 20081124 (experimental), GMP version
4.2.2, MPFR version 2.3.2.
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096

$ gcc-build/gcc/f951 -o gccmod.s gccmod.f90 -Wall -ggdb2
 initFatal Error: Reading module mmm at line 16 column 65: Expected left
parenthesis

$ cat gccmod.f90
module mmm
contains
 subroutine init
 end subroutine init
end module mmm

program main
 use mmm
end program main
$ _
(In fact no `module mmm' part needs to be present there.)


-- 
           Summary: Fatal Error: Reading module mmm: Expected left
                    parenthesis
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: blocker
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jan dot kratochvil at redhat dot com
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


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


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

* [Bug fortran/38248] Fatal Error: Reading module mmm: Expected left parenthesis
  2008-11-24 15:20 [Bug fortran/38248] New: Fatal Error: Reading module mmm: Expected left parenthesis jan dot kratochvil at redhat dot com
@ 2008-11-24 15:38 ` mikael at gcc dot gnu dot org
  2008-11-24 16:21 ` burnus at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: mikael at gcc dot gnu dot org @ 2008-11-24 15:38 UTC (permalink / raw)
  To: gcc-bugs

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



------- Comment #1 from mikael at gcc dot gnu dot org  2008-11-24 15:37 -------
Works for me.

$ /usr/local/bin/gfortran -v 
Utilisation des specs internes.
Target: x86_64-unknown-linux-gnu
Configuré avec: ../src/configure --enable-languages=fortran
--enable-maintainer-mode --disable-multilib : (reconfigured) ../src/configure
--enable-maintainer-mode --disable-multilib --enable-languages=c,fortran
--no-create --no-recursion : (reconfigured) ../src/configure
--enable-maintainer-mode --disable-multilib --enable-languages=c,fortran
--no-create --no-recursion
Modèle de thread: posix
gcc version 4.4.0 20081123 (experimental) (GCC) 


-- 


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


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

* [Bug fortran/38248] Fatal Error: Reading module mmm: Expected left parenthesis
  2008-11-24 15:20 [Bug fortran/38248] New: Fatal Error: Reading module mmm: Expected left parenthesis jan dot kratochvil at redhat dot com
  2008-11-24 15:38 ` [Bug fortran/38248] " mikael at gcc dot gnu dot org
@ 2008-11-24 16:21 ` burnus at gcc dot gnu dot org
  2008-11-24 16:36 ` [Bug fortran/38248] Ignored temporary module files manipulation errors jan dot kratochvil at redhat dot com
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-11-24 16:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from burnus at gcc dot gnu dot org  2008-11-24 16:20 -------
The error message looks as if you are mixing a gfortran 4.3 compiled .mod file
with a gfortran 4.4 compiler (or vice versa). While the gfortran 4.3 compiled
*.o/*.so/*.a files are supposed to be compatible with 4.4's libgfortran.so, for
.mod files this is not the case. (.mod files are not like *.h files compiler
independent, but simply a "binary" dump of the interfaces of a single module.)

I think a solution would be to create a version number for the .mod data and
add a checking.


-- 

burnus at gcc dot gnu dot org changed:

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


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


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

* [Bug fortran/38248] Ignored temporary module files manipulation errors
  2008-11-24 15:20 [Bug fortran/38248] New: Fatal Error: Reading module mmm: Expected left parenthesis jan dot kratochvil at redhat dot com
  2008-11-24 15:38 ` [Bug fortran/38248] " mikael at gcc dot gnu dot org
  2008-11-24 16:21 ` burnus at gcc dot gnu dot org
@ 2008-11-24 16:36 ` jan dot kratochvil at redhat dot com
  2008-11-24 16:41 ` jan dot kratochvil at redhat dot com
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jan dot kratochvil at redhat dot com @ 2008-11-24 16:36 UTC (permalink / raw)
  To: gcc-bugs



-- 

jan dot kratochvil at redhat dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|blocker                     |normal
            Summary|Fatal Error: Reading module |Ignored temporary module
                   |mmm: Expected left          |files manipulation errors
                   |parenthesis                 |


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


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

* [Bug fortran/38248] Ignored temporary module files manipulation errors
  2008-11-24 15:20 [Bug fortran/38248] New: Fatal Error: Reading module mmm: Expected left parenthesis jan dot kratochvil at redhat dot com
                   ` (2 preceding siblings ...)
  2008-11-24 16:36 ` [Bug fortran/38248] Ignored temporary module files manipulation errors jan dot kratochvil at redhat dot com
@ 2008-11-24 16:41 ` jan dot kratochvil at redhat dot com
  2008-11-25 12:54 ` burnus at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jan dot kratochvil at redhat dot com @ 2008-11-24 16:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jan dot kratochvil at redhat dot com  2008-11-24 16:40 -------
Created an attachment (id=16759)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16759&action=view)
Check the file manipulations errors.

Thanks Tobias B.,
unlink("mmm.mod")                 = -1 EPERM (Operation not permitted)
rename("mmm.mod0", "mmm.mod")     = -1 EPERM (Operation not permitted)
write(2, " init"..., 5)           = 5   
stat("mmm.mod", {st_mode=S_IFREG|0644, st_size=547, ...}) = 0
open("mmm.mod", O_RDONLY)         = 4   

With the attached patch the same command now fails for me:
Fatal Error: Can't delete module file 'mmm.mod': Operation not permitted

I have no GCC SVN write permissions.
Left one unchecked unlink() in an error recovery path there.


-- 


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


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

* [Bug fortran/38248] Ignored temporary module files manipulation errors
  2008-11-24 15:20 [Bug fortran/38248] New: Fatal Error: Reading module mmm: Expected left parenthesis jan dot kratochvil at redhat dot com
                   ` (3 preceding siblings ...)
  2008-11-24 16:41 ` jan dot kratochvil at redhat dot com
@ 2008-11-25 12:54 ` burnus at gcc dot gnu dot org
  2008-12-08 23:05 ` mikael at gcc dot gnu dot org
  2008-12-09 21:40 ` dfranke at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-11-25 12:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from burnus at gcc dot gnu dot org  2008-11-25 12:53 -------
Subject: Bug 38248

Author: burnus
Date: Tue Nov 25 12:51:44 2008
New Revision: 142190

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142190
Log:
2008-11-25  Jan Kratochvil  <jan.kratochvil@redhat.com>

        PR fortran/38248
        * module.c (gfc_dump_module): Check rename/unlink syscalls errors.


Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/module.c


-- 


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


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

* [Bug fortran/38248] Ignored temporary module files manipulation errors
  2008-11-24 15:20 [Bug fortran/38248] New: Fatal Error: Reading module mmm: Expected left parenthesis jan dot kratochvil at redhat dot com
                   ` (4 preceding siblings ...)
  2008-11-25 12:54 ` burnus at gcc dot gnu dot org
@ 2008-12-08 23:05 ` mikael at gcc dot gnu dot org
  2008-12-09 21:40 ` dfranke at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: mikael at gcc dot gnu dot org @ 2008-12-08 23:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from mikael at gcc dot gnu dot org  2008-12-08 23:03 -------
Can we close ?


-- 


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


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

* [Bug fortran/38248] Ignored temporary module files manipulation errors
  2008-11-24 15:20 [Bug fortran/38248] New: Fatal Error: Reading module mmm: Expected left parenthesis jan dot kratochvil at redhat dot com
                   ` (5 preceding siblings ...)
  2008-12-08 23:05 ` mikael at gcc dot gnu dot org
@ 2008-12-09 21:40 ` dfranke at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2008-12-09 21:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from dfranke at gcc dot gnu dot org  2008-12-09 21:38 -------
> Can we close?

Think so. Closing.


-- 

dfranke at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2008-12-09 21:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-24 15:20 [Bug fortran/38248] New: Fatal Error: Reading module mmm: Expected left parenthesis jan dot kratochvil at redhat dot com
2008-11-24 15:38 ` [Bug fortran/38248] " mikael at gcc dot gnu dot org
2008-11-24 16:21 ` burnus at gcc dot gnu dot org
2008-11-24 16:36 ` [Bug fortran/38248] Ignored temporary module files manipulation errors jan dot kratochvil at redhat dot com
2008-11-24 16:41 ` jan dot kratochvil at redhat dot com
2008-11-25 12:54 ` burnus at gcc dot gnu dot org
2008-12-08 23:05 ` mikael at gcc dot gnu dot org
2008-12-09 21:40 ` dfranke 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).