[Bug fortran/25087] Error for missing explicit interface needed.

2006-11-23 Thread pault at gcc dot gnu dot org


--- Comment #8 from pault at gcc dot gnu dot org  2006-11-23 19:17 ---
Fixed on trunk and 4.2

Paul


-- 

pault at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug fortran/25087] Error for missing explicit interface needed.

2006-11-23 Thread pault at gcc dot gnu dot org


--- Comment #7 from pault at gcc dot gnu dot org  2006-11-23 19:14 ---
Subject: Bug 25087

Author: pault
Date: Thu Nov 23 19:14:05 2006
New Revision: 119132

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=119132
Log:
2006-11-23 Paul Thomas  <[EMAIL PROTECTED]>

PR fortran/25087
* resolve.c (resolve_fl_procedure): Add an error if an external
automatic character length function does not have an explicit
interface.

PR fortran/29652
* interface.c (check_interface1): Use a local value, instead of
the dummy, as the inner iterator over interface symbols.

PR fortran/29820
* trans-array.c (gfc_get_derived_type): Once done, spread the
backend_decl to all identical derived types in all sibling
namespaces.

2006-11-23 Paul Thomas  <[EMAIL PROTECTED]>

PR fortran/25087
* gfortran.dg/auto_char_len_4.f90: New test.

PR fortran/29652
* gfortran.dg/generic_7.f90: New test.
* gfortran.dg/defined_operators_1.f90: Add new error.

PR fortran/29820
* gfortran.dg/used_types_13.f90: New test.



Added:
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/auto_char_len_4.f90
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/generic_7.f90
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/used_types_13.f90
Modified:
branches/gcc-4_2-branch/gcc/fortran/ChangeLog
branches/gcc-4_2-branch/gcc/fortran/interface.c
branches/gcc-4_2-branch/gcc/fortran/resolve.c
branches/gcc-4_2-branch/gcc/fortran/trans-types.c
branches/gcc-4_2-branch/gcc/testsuite/ChangeLog
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/defined_operators_1.f90


-- 


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



[Bug fortran/25087] Error for missing explicit interface needed.

2006-11-15 Thread pault at gcc dot gnu dot org


-- 

pault at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |pault at gcc dot gnu dot org
   |dot org |
 Status|NEW |ASSIGNED
   Last reconfirmed|2006-09-28 11:35:17 |2006-11-15 18:59:01
   date||


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



[Bug fortran/25087] Error for missing explicit interface needed.

2006-11-15 Thread patchapp at dberlin dot org


--- Comment #5 from patchapp at dberlin dot org  2006-11-15 18:02 ---
Subject: Bug number PR25087

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2006-11/msg01058.html


-- 


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



[Bug fortran/25087] Error for missing explicit interface needed.

2006-09-28 Thread fxcoudert at gcc dot gnu dot org


--- Comment #4 from fxcoudert at gcc dot gnu dot org  2006-09-28 11:35 
---
There's a TODO about this in front-end resolve.c. It's a good point to start...

static void
resolve_formal_arglist (gfc_symbol * proc)
{
  gfc_formal_arglist *f;
  gfc_symbol *sym;
  int i;

  /* TODO: Procedures whose return character length parameter is not constant
 or assumed must also have explicit interfaces.  */


-- 

fxcoudert at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||fxcoudert at gcc dot gnu dot
   ||org
   Last reconfirmed|2005-11-29 12:06:22 |2006-09-28 11:35:17
   date||


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



[Bug fortran/25087] Error for missing explicit interface needed.

2005-11-29 Thread eedelman 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|-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