public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/52295] New: Allow internal procedure in generic interfaces
@ 2012-02-17 11:56 burnus at gcc dot gnu.org
  2012-02-18 12:32 ` [Bug fortran/52295] " burnus at gcc dot gnu.org
  2012-02-18 12:37 ` burnus at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-02-17 11:56 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 52295
           Summary: Allow internal procedure in generic interfaces
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Keywords: diagnostic, patch, rejects-valid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org


Found at
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/408949dd41f76a86

gfortran rejects internal procedures in generic interfaces with -std=2008, but
that's valid since F2008.

Fortran 2003:

C1207 (R1206) A procedure-name shall have an explicit interface and shall refer
to an accessible procedure pointer, external procedure, dummy procedure, or
module procedure.

Fortran 2008:

C1207 (R1206) A procedure-name shall be a nonintrinsic procedure that has an
explicit interface.


Untested patch:

--- interface.c (revision 184331)
+++ interface.c (working copy)
@@ -1292,9 +1292,10 @@
          return 1;
        }

+      /* F2003, C1207. F2008, C1207.  */
       if (p->sym->attr.proc == PROC_INTERNAL
-         && gfc_notify_std (GFC_STD_GNU, "Extension: Internal procedure '%s' "
-                            "in %s at %L", p->sym->name, interface_name,
+         && gfc_notify_std (GFC_STD_F2008, "Fortran 2008: Internal procedure "
+                            "'%s' in %s at %L", p->sym->name, interface_name,
                             &p->sym->declared_at) == FAILURE)
        return 1;
     }


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

* [Bug fortran/52295] Allow internal procedure in generic interfaces
  2012-02-17 11:56 [Bug fortran/52295] New: Allow internal procedure in generic interfaces burnus at gcc dot gnu.org
@ 2012-02-18 12:32 ` burnus at gcc dot gnu.org
  2012-02-18 12:37 ` burnus at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-02-18 12:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-02-18 12:31:48 UTC ---
Author: burnus
Date: Sat Feb 18 12:31:42 2012
New Revision: 184372

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=184372
Log:
2012-02-18  Tobias Burnus  <burnus@net-b.de>

        PR fortran/52295
        * interface.c (check_interface0): Internal procs in
        generic interfaces are allowed in Fortran 2008.

2012-02-18  Tobias Burnus  <burnus@net-b.de>

        PR fortran/52295
        * gfortran.dg/interface_35.f90: Use -std=f2003.
        * gfortran.dg/proc_ptr_comp_20.f90: Remove dg-warning.
        * gfortran.dg/interface_assignment_4.f90: Ditto.
        * gfortran.dg/bessel_1.f90: Ditto.
        * gfortran.dg/func_result_6.f90: Ditto.
        * gfortran.dg/hypot_1.f90: Ditto.
        * gfortran.dg/proc_ptr_comp_21.f90: Ditto.


Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/interface.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/bessel_1.f90
    trunk/gcc/testsuite/gfortran.dg/func_result_6.f90
    trunk/gcc/testsuite/gfortran.dg/hypot_1.f90
    trunk/gcc/testsuite/gfortran.dg/interface_35.f90
    trunk/gcc/testsuite/gfortran.dg/interface_assignment_4.f90
    trunk/gcc/testsuite/gfortran.dg/proc_ptr_comp_20.f90
    trunk/gcc/testsuite/gfortran.dg/proc_ptr_comp_21.f90


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

* [Bug fortran/52295] Allow internal procedure in generic interfaces
  2012-02-17 11:56 [Bug fortran/52295] New: Allow internal procedure in generic interfaces burnus at gcc dot gnu.org
  2012-02-18 12:32 ` [Bug fortran/52295] " burnus at gcc dot gnu.org
@ 2012-02-18 12:37 ` burnus at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-02-18 12:37 UTC (permalink / raw)
  To: gcc-bugs

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |burnus at gcc dot gnu.org
         Resolution|                            |FIXED

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-02-18 12:32:31 UTC ---
FIXED on the trunk (4.7).


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

end of thread, other threads:[~2012-02-18 12:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-17 11:56 [Bug fortran/52295] New: Allow internal procedure in generic interfaces burnus at gcc dot gnu.org
2012-02-18 12:32 ` [Bug fortran/52295] " burnus at gcc dot gnu.org
2012-02-18 12:37 ` burnus at gcc dot gnu.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).