public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/39861] New: Internal Error with INTRINSIC in module
@ 2009-04-23 6:50 dominiq at lps dot ens dot fr
2009-04-23 9:31 ` [Bug fortran/39861] [4.5 Regression] ICE with INTRINSIC in module: write_symbol(): bad module symbol burnus at gcc dot gnu dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: dominiq at lps dot ens dot fr @ 2009-04-23 6:50 UTC (permalink / raw)
To: gcc-bugs
At revision 146606 the following code
module vector_calculus
intrinsic :: dot_product, sqrt
contains
function len(r)
real, dimension(:), intent(in) :: r
real :: len
len = sqrt(dot_product(r,r))
end function len
end module vector_calculus
end
gives
pr36192_mod_red.f90:12.26:
end module vector_calculus
1
Internal Error at (1):
write_symbol(): bad module symbol 'x'
This code has been extracted from a larger one that did not give this error at
revision 146282.
I suspect revision 146554.
--
Summary: Internal Error with INTRINSIC in module
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dominiq at lps dot ens dot fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39861
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/39861] [4.5 Regression] ICE with INTRINSIC in module: write_symbol(): bad module symbol
2009-04-23 6:50 [Bug fortran/39861] New: Internal Error with INTRINSIC in module dominiq at lps dot ens dot fr
@ 2009-04-23 9:31 ` burnus at gcc dot gnu dot org
2009-04-23 11:10 ` pault at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-04-23 9:31 UTC (permalink / raw)
To: gcc-bugs
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |ice-on-valid-code
Last reconfirmed|0000-00-00 00:00:00 |2009-04-23 09:30:47
date| |
Summary|Internal Error with |[4.5 Regression] ICE with
|INTRINSIC in module |INTRINSIC in module:
| |write_symbol(): bad module
| |symbol
Target Milestone|--- |4.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39861
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/39861] [4.5 Regression] ICE with INTRINSIC in module: write_symbol(): bad module symbol
2009-04-23 6:50 [Bug fortran/39861] New: Internal Error with INTRINSIC in module dominiq at lps dot ens dot fr
2009-04-23 9:31 ` [Bug fortran/39861] [4.5 Regression] ICE with INTRINSIC in module: write_symbol(): bad module symbol burnus at gcc dot gnu dot org
@ 2009-04-23 11:10 ` pault at gcc dot gnu dot org
2009-04-23 11:25 ` dominiq at lps dot ens dot fr
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pault at gcc dot gnu dot org @ 2009-04-23 11:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pault at gcc dot gnu dot org 2009-04-23 11:10 -------
(In reply to comment #0)
Hi Dominique,
Could I ask a Bear-of-Little-Brain question here?
> write_symbol(): bad module symbol 'x'
Where does the symbol 'x' come from?
Cheers
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39861
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/39861] [4.5 Regression] ICE with INTRINSIC in module: write_symbol(): bad module symbol
2009-04-23 6:50 [Bug fortran/39861] New: Internal Error with INTRINSIC in module dominiq at lps dot ens dot fr
2009-04-23 9:31 ` [Bug fortran/39861] [4.5 Regression] ICE with INTRINSIC in module: write_symbol(): bad module symbol burnus at gcc dot gnu dot org
2009-04-23 11:10 ` pault at gcc dot gnu dot org
@ 2009-04-23 11:25 ` dominiq at lps dot ens dot fr
2009-04-23 12:24 ` janus at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: dominiq at lps dot ens dot fr @ 2009-04-23 11:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from dominiq at lps dot ens dot fr 2009-04-23 11:25 -------
> Where does the symbol 'x' come from?
Good question! The code generate a file vector_calculus.mod0 containing:
GFORTRAN module version '0' created from pr36192_mod_red.f90 on Thu Apr 23
13:17:45 2009
MD5:00000000000000000000000000000000 -- If you edit this, you'll get what you
deserve.
(() () () () () () () () () () () () () () () () () () () () () () () ()
() () ())
()
()
()
()
(2 'dot_product' '(intrinsic)' 'dot_product' 1 ((PROCEDURE
UNKNOWN-INTENT UNKNOWN-PROC DECL UNKNOWN INTRINSIC FUNCTION) (REAL 4 0 0
REAL ()) 3 0 (4 5) () 2 () () () 0 0)
6 'len' 'vector_calculus' 'len' 1 ((PROCEDURE UNKNOWN-INTENT MODULE-PROC
DECL UNKNOWN FUNCTION ALWAYS_EXPLICIT) (REAL 4 0 0 REAL ()) 7 0 (8) () 6
() () () 0 0)
9 'sqrt' '(intrinsic)' 'sqrt' 1 ((PROCEDURE UNKNOWN-INTENT UNKNOWN-PROC
DECL UNKNOWN INTRINSIC FUNCTION) (REAL 4 0 0 REAL ()) 10 0 (11) () 9 ()
() () 0 0)
12 'vector_calculus' 'vector_calculus' 'vector_calculus' 1 ((MODULE
UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN UNKNOWN) (UNKNOWN 0 0 0 UNKNOWN ())
0 0 () () 0 () () () 0 0)
8 'r' '' 'r' 7 ((VARIABLE IN UNKNOWN-PROC UNKNOWN UNKNOWN DIMENSION
DUMMY) (REAL 4 0 0 REAL ()) 0 0 () (1 ASSUMED_SHAPE (CONSTANT (INTEGER 4
0 0 INTEGER ()) 0 '1') ()) 0 () () () 0 0)
the only 'x' being in "ALWAYS_EXPLICIT".
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39861
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/39861] [4.5 Regression] ICE with INTRINSIC in module: write_symbol(): bad module symbol
2009-04-23 6:50 [Bug fortran/39861] New: Internal Error with INTRINSIC in module dominiq at lps dot ens dot fr
` (2 preceding siblings ...)
2009-04-23 11:25 ` dominiq at lps dot ens dot fr
@ 2009-04-23 12:24 ` janus at gcc dot gnu dot org
2009-04-24 8:34 ` janus at gcc dot gnu dot org
2009-04-24 8:39 ` janus at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: janus at gcc dot gnu dot org @ 2009-04-23 12:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from janus at gcc dot gnu dot org 2009-04-23 12:24 -------
> > write_symbol(): bad module symbol 'x'
>
> Where does the symbol 'x' come from?
The 'x' here apparently is the formal argument of the sqrt() function!
I think Dominique was right in suspecting my r146554, which had the effect that
formal arguments from intrinsic functions are now not only kept in the isym,
but are also copied to the gfc_symbol of the intrinsic function (see
'resolve_intrinsic').
The problem seems to be that for those formal args copied from isym the flavor
is not set:
if (sym->attr.flavor == FL_UNKNOWN || sym->attr.flavor == FL_LABEL)
gfc_internal_error ("write_symbol(): bad module symbol '%s'", sym->name);
I will take care of this soon. Thanks for the report.
--
janus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |janus at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2009-04-23 09:30:47 |2009-04-23 12:24:16
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39861
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/39861] [4.5 Regression] ICE with INTRINSIC in module: write_symbol(): bad module symbol
2009-04-23 6:50 [Bug fortran/39861] New: Internal Error with INTRINSIC in module dominiq at lps dot ens dot fr
` (3 preceding siblings ...)
2009-04-23 12:24 ` janus at gcc dot gnu dot org
@ 2009-04-24 8:34 ` janus at gcc dot gnu dot org
2009-04-24 8:39 ` janus at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: janus at gcc dot gnu dot org @ 2009-04-24 8:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from janus at gcc dot gnu dot org 2009-04-24 08:34 -------
Subject: Bug 39861
Author: janus
Date: Fri Apr 24 08:34:14 2009
New Revision: 146677
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=146677
Log:
2009-04-24 Janus Weil <janus@gcc.gnu.org>
PR fortran/39861
PR fortran/39864
* symbol.c (gfc_copy_formal_args_intr): Set attr.flavor and attr.dummy
for the formal arguments.
2009-04-24 Janus Weil <janus@gcc.gnu.org>
PR fortran/39861
PR fortran/39864
* gfortran.dg/intrinsic_1.f90: New.
Added:
trunk/gcc/testsuite/gfortran.dg/intrinsic_1.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/symbol.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39861
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/39861] [4.5 Regression] ICE with INTRINSIC in module: write_symbol(): bad module symbol
2009-04-23 6:50 [Bug fortran/39861] New: Internal Error with INTRINSIC in module dominiq at lps dot ens dot fr
` (4 preceding siblings ...)
2009-04-24 8:34 ` janus at gcc dot gnu dot org
@ 2009-04-24 8:39 ` janus at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: janus at gcc dot gnu dot org @ 2009-04-24 8:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from janus at gcc dot gnu dot org 2009-04-24 08:39 -------
Fixed by r146677. Closing.
--
janus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39861
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-04-24 8:39 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-23 6:50 [Bug fortran/39861] New: Internal Error with INTRINSIC in module dominiq at lps dot ens dot fr
2009-04-23 9:31 ` [Bug fortran/39861] [4.5 Regression] ICE with INTRINSIC in module: write_symbol(): bad module symbol burnus at gcc dot gnu dot org
2009-04-23 11:10 ` pault at gcc dot gnu dot org
2009-04-23 11:25 ` dominiq at lps dot ens dot fr
2009-04-23 12:24 ` janus at gcc dot gnu dot org
2009-04-24 8:34 ` janus at gcc dot gnu dot org
2009-04-24 8:39 ` janus 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).