This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/25087] Error for missing explicit interface needed.
- From: "eedelman at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Nov 2005 12:06:22 -0000
- Subject: [Bug fortran/25087] Error for missing explicit interface needed.
- References: <bug-25087-6642@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from eedelman at gcc dot gnu dot org 2005-11-29 12:06 -------
(In reply to comment #2)
> Reduced testcase:
>
> SUBROUTINE s(n)
> CHARACTER(LEN=n), EXTERNAL :: a
> write(6,*) a(n)
> END SUBROUTINE s
>
> The problem, unless I'm missing something, is that the external function a
> would need an explicit interface. From the draft F2003 standard, 12.3.1.1:
>
> "A procedure [...] shall have an explicit interface if it is referenced and
>
Sorry, I messed up. Here's what I intended to write:
"A procedure [...] shall have an explicit interface if it is referenced and
[...]
(3) The procedure has a result that
[...]
(c) has a nonassumed type parameter value that is not an initialization
expression"
Ifort 8.1 gives the following error message for this code:
beam:~$ ifort huj.f90
fortcom: Error: huj.f90, line 2: This passed length character name has been
used in an invalid context. [A]
CHARACTER(LEN=n), EXTERNAL :: a
-------------------------------^
--
eedelman at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |diagnostic
Last reconfirmed|0000-00-00 00:00:00 |2005-11-29 12:06:22
date| |
Summary|better diagnostic needed |Error for missing explicit
| |interface needed.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25087