public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/21986] New: Bad .mod file, ICE upon USE
@ 2005-06-09 16:54 Pierre dot Asselin at seagate dot com
2005-06-09 16:56 ` [Bug fortran/21986] " Pierre dot Asselin at seagate dot com
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: Pierre dot Asselin at seagate dot com @ 2005-06-09 16:54 UTC (permalink / raw)
To: gcc-bugs
$ gfortran bug.f90
bug.f90:8: internal compiler error: Segmentation fault
$ gfortran -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc4/configure --enable-languages=c,c++,f95
Thread model: posix
gcc version 4.1.0 20050609 (experimental)
(This is this morning's CVS snapshot)
Hmf. I don't see how to attach the "bug.f90" so I will place it in-line below.
It's short. If I split into module and main program and compile separately,
boom.f90 ICE's at line zero. Suspect a bad "modboom.mod" file.
-------------------------------------------
module modboom
implicit none ! can comment out
private ! comment out, lose the bug
public:: dummysub ! comment out, lose the bug
type:: intwrapper ! a straight integer won't do
integer n
end type intwrapper
contains
subroutine dummysub(size, arg_array)
type(intwrapper) :: size
real, dimension(size%n) :: arg_array
real :: local_array(4) ! comment out, lose the bug
end subroutine dummysub
end module modboom
program boom
use modboom ! bad .mod file ?
print *, 'hey, we made it!'
end program boom
-------------------------------------------
--
Summary: Bad .mod file, ICE upon USE
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: Pierre dot Asselin at seagate dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: Huh ? do you mean "i686-pc-linux-gnu" ?
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21986
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/21986] Bad .mod file, ICE upon USE
2005-06-09 16:54 [Bug fortran/21986] New: Bad .mod file, ICE upon USE Pierre dot Asselin at seagate dot com
@ 2005-06-09 16:56 ` Pierre dot Asselin at seagate dot com
2005-06-09 17:08 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Pierre dot Asselin at seagate dot com @ 2005-06-09 16:56 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From Pierre dot Asselin at seagate dot com 2005-06-09 16:56 -------
Created an attachment (id=9056)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9056&action=view)
self-contained test case, compile with "gfortran bug.f90"
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21986
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/21986] Bad .mod file, ICE upon USE
2005-06-09 16:54 [Bug fortran/21986] New: Bad .mod file, ICE upon USE Pierre dot Asselin at seagate dot com
2005-06-09 16:56 ` [Bug fortran/21986] " Pierre dot Asselin at seagate dot com
@ 2005-06-09 17:08 ` pinskia at gcc dot gnu dot org
2005-06-23 20:36 ` tobi at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-09 17:08 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-09 17:08 -------
Confirmed.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
GCC target triplet|Huh ? do you mean "i686-pc-|i686-pc-linux-gnu
|linux-gnu" ? |
Keywords| |ice-on-valid-code
Last reconfirmed|0000-00-00 00:00:00 |2005-06-09 17:08:12
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21986
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/21986] Bad .mod file, ICE upon USE
2005-06-09 16:54 [Bug fortran/21986] New: Bad .mod file, ICE upon USE Pierre dot Asselin at seagate dot com
2005-06-09 16:56 ` [Bug fortran/21986] " Pierre dot Asselin at seagate dot com
2005-06-09 17:08 ` pinskia at gcc dot gnu dot org
@ 2005-06-23 20:36 ` tobi at gcc dot gnu dot org
2005-06-27 17:14 ` pinskia at gcc dot gnu dot org
2005-09-06 23:09 ` pault at gcc dot gnu dot org
4 siblings, 0 replies; 7+ messages in thread
From: tobi at gcc dot gnu dot org @ 2005-06-23 20:36 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From tobi at gcc dot gnu dot org 2005-06-23 20:36 -------
Segfault here while reading the module:
Program received signal SIGSEGV, Segmentation fault.
mio_ref (rp=Variable "rp" is not available.
) at ../../gcc/fortran/module.c:1839
1839 if (sym->components != NULL && p->u.pointer == NULL)
... where sym == NUlL.
I can't see anything obviously wrong with the module file.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21986
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/21986] Bad .mod file, ICE upon USE
2005-06-09 16:54 [Bug fortran/21986] New: Bad .mod file, ICE upon USE Pierre dot Asselin at seagate dot com
` (2 preceding siblings ...)
2005-06-23 20:36 ` tobi at gcc dot gnu dot org
@ 2005-06-27 17:14 ` pinskia at gcc dot gnu dot org
2005-09-06 23:09 ` pault at gcc dot gnu dot org
4 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-27 17:14 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-27 17:13 -------
Here is a reduced testcase:
MODULE module1
TYPE type1
INTEGER TYP1
END TYPE type1
END MODULE
MODULE module2
TYPE type2
INTEGER TYP2
END TYPE type2
END MODULE
MODULE mymodule
CONTAINS
SUBROUTINE SUB1()
IMPLICIT NONE
END SUBROUTINE SUB1
SUBROUTINE SUB2(T_TYPE1, T_TYPE2)
USE module1
USE module2
IMPLICIT NONE
TYPE (type1):: T_TYPE1
TYPE (type2) T_TYPE2(T_TYPE1%TYP1)
END SUBROUTINE SUB2
END MODULE
SUBROUTINE A_SUBROUTINE
USE mymodule
END SUBROUTINE A_SUBROUTINE
Oh, this is a dup of bug 19669.
*** This bug has been marked as a duplicate of 19669 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21986
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/21986] Bad .mod file, ICE upon USE
2005-06-09 16:54 [Bug fortran/21986] New: Bad .mod file, ICE upon USE Pierre dot Asselin at seagate dot com
` (3 preceding siblings ...)
2005-06-27 17:14 ` pinskia at gcc dot gnu dot org
@ 2005-09-06 23:09 ` pault at gcc dot gnu dot org
4 siblings, 0 replies; 7+ messages in thread
From: pault at gcc dot gnu dot org @ 2005-09-06 23:09 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pault at gcc dot gnu dot org 2005-09-06 23:09 -------
(In reply to comment #0)
This is incorrect code, which should generate an error, rather than an ICE.
As ifort9.0 puts it:
fortcom: Error: ../pr21986.f90, line 11: This procedure cannot be PUBLIC since
it has argument(s) whose derived type(s) are PRIVATE. [SIZE]
The example compiles and runs correctly with gfortran and ifort if public::
dummysub is changed to public:: dummysub, intwrapper.
I do not see why this is marked as resolved duplicate, since it behaves in the
same way that it always did.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|DUPLICATE |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21986
^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <bug-21986-10796@http.gcc.gnu.org/bugzilla/>]
* [Bug fortran/21986] Bad .mod file, ICE upon USE
[not found] <bug-21986-10796@http.gcc.gnu.org/bugzilla/>
@ 2005-10-26 19:44 ` pault at gcc dot gnu dot org
0 siblings, 0 replies; 7+ messages in thread
From: pault at gcc dot gnu dot org @ 2005-10-26 19:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from pault at gcc dot gnu dot org 2005-10-26 19:44 -------
This was fixed on mainline and 4.0
The testcase now gives:
[root@localhost mytests]# /gcc-clean/bin/gfortran -c pr21986.f90
In file pr21986.f90:4
public:: dummysub ! comment out, lose the bug
1
Error: 'size' is a PRIVATE type and cannot be a dummy argument of 'dummysub',
which is PUBLIC at (1)
In file pr21986.f90:23
use modboom ! bad .mod file ?
1
Fatal Error: Can't open module file 'modboom.mod' for reading at (1): No such
file or directory
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21986
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-10-26 19:44 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-09 16:54 [Bug fortran/21986] New: Bad .mod file, ICE upon USE Pierre dot Asselin at seagate dot com
2005-06-09 16:56 ` [Bug fortran/21986] " Pierre dot Asselin at seagate dot com
2005-06-09 17:08 ` pinskia at gcc dot gnu dot org
2005-06-23 20:36 ` tobi at gcc dot gnu dot org
2005-06-27 17:14 ` pinskia at gcc dot gnu dot org
2005-09-06 23:09 ` pault at gcc dot gnu dot org
[not found] <bug-21986-10796@http.gcc.gnu.org/bugzilla/>
2005-10-26 19:44 ` pault 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).