public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/39427]  New: Error on generic name equivalent to type name in same module
@ 2009-03-10 23:32 damian at rouson dot net
  2009-03-11 22:42 ` [Bug fortran/39427] F2003: Procedures with same name as types/type constructors burnus at gcc dot gnu dot org
                   ` (18 more replies)
  0 siblings, 19 replies; 31+ messages in thread
From: damian at rouson dot net @ 2009-03-10 23:32 UTC (permalink / raw)
  To: gcc-bugs

The Fortran 2003 standard Section C.1.6 allows a generic procedure to have the
same name as a type , but gfotran gives "Error: DERIVED attribute of 'foo'
conflicts with PROCEDURE attribute at (1)" on the following code:

module foo_module
  type foo
    integer :: bar
  end type
  interface foo
    procedure constructor
  end interface
contains
  type(foo) function constructor()
    constructor%bar = 1
  end function
end module

I use this style throughout a textbook I'm writing because it seems like a
natural way to extend the intrinsic structure constructor syntax.  A more
extensive example of this technique is also in Figure 17.1 of Metcalf, Reid &
Cohen.

Damian


-- 
           Summary: Error on generic name equivalent to type name in same
                    module
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: damian at rouson dot net
 GCC build triplet: Using built-in specs. Target: i386-apple-darwin8.10.1
                    Configured
  GCC host triplet: Using built-in specs. Target: i386-apple-darwin8.10.1
                    Configured
GCC target triplet: Using built-in specs. Target: i386-apple-darwin8.10.1
                    Configured


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


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

end of thread, other threads:[~2011-11-17  1:44 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-39427-4@http.gcc.gnu.org/bugzilla/>
2010-09-28 23:31 ` [Bug fortran/39427] F2003: Procedures with same name as types/type constructors damian at rouson dot net
2010-09-30 19:17 ` burnus at gcc dot gnu.org
2010-11-03  9:15 ` burnus at gcc dot gnu.org
2010-12-08 13:11 ` burnus at gcc dot gnu.org
2010-12-28 21:50 ` dfranke at gcc dot gnu.org
2011-01-09 22:07 ` janus at gcc dot gnu.org
2011-03-16 11:41 ` janus at gcc dot gnu.org
2011-10-11 16:17 ` burnus at gcc dot gnu.org
2011-11-09 13:56 ` burnus at gcc dot gnu.org
2011-11-16 21:58 ` burnus at gcc dot gnu.org
2011-11-16 22:28 ` burnus at gcc dot gnu.org
2011-11-17  2:29 ` damian at rouson dot net
2009-03-10 23:32 [Bug fortran/39427] New: Error on generic name equivalent to type name in same module damian at rouson dot net
2009-03-11 22:42 ` [Bug fortran/39427] F2003: Procedures with same name as types/type constructors burnus at gcc dot gnu dot org
2009-03-29  7:31 ` fxcoudert at gcc dot gnu dot org
2009-12-03 21:02 ` burnus at gcc dot gnu dot org
2010-01-23 17:25 ` janus at gcc dot gnu dot org
2010-05-04 12:10 ` steven at gcc dot gnu dot org
2010-05-04 14:25 ` damian at rouson dot net
2010-05-04 16:10 ` burnus at gcc dot gnu dot org
2010-05-04 16:13 ` burnus at gcc dot gnu dot org
2010-05-05 18:09 ` burnus at gcc dot gnu dot org
2010-05-05 18:15 ` burnus at gcc dot gnu dot org
2010-05-07  9:16 ` burnus at gcc dot gnu dot org
2010-05-07  9:20 ` burnus at gcc dot gnu dot org
2010-05-07 16:37 ` burnus at gcc dot gnu dot org
2010-05-18 21:52 ` burnus at gcc dot gnu dot org
2010-05-20 21:14 ` burnus at gcc dot gnu dot org
2010-05-25 19:55 ` burnus at gcc dot gnu dot org
2010-07-30  9:03 ` burnus at gcc dot gnu dot org
2010-07-31  2:30 ` damian at rouson dot net
2010-08-01  7:26 ` burnus 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).