public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/49638] New: [OOP] length parameter is ignored when overriding type bound character functions with constant length.
@ 2011-07-05  8:04 boschmann at tp1 dot physik.uni-siegen.de
  2011-07-30 16:16 ` [Bug fortran/49638] " janus at gcc dot gnu.org
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: boschmann at tp1 dot physik.uni-siegen.de @ 2011-07-05  8:04 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: [OOP] length parameter is ignored when overriding type
                    bound character functions with constant length.
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: boschmann@tp1.physik.uni-siegen.de


module world
  implicit none
  type::world_1
   contains
     procedure,nopass::string=>w1_string
  end type world_1
  type,extends(world_1)::world_2
   contains
     procedure,nopass::string=>w2_string
  end type world_2
contains
  function w1_string()
    character(6)::w1_string
    w1_string=" world"
  end function w1_string
  function w2_string()
    character(7)::w2_string
    w2_string=" world2"
  end function w2_string
end module world
program hello
  use world
  implicit none
  type(world_1)::w1
  type(world_2)::w2
  print *,"hello world: hello",w1%string()
  print *,"hello world2: hello",w2%string()
end program hello

This program compiles and runs fine with gfortran 4.6.1 and gfortran 4.7.
Nevertheless, the length of an array is a type parameter and all type
parameters of an overriding function shall match the overridden type
parameters.


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

end of thread, other threads:[~2011-08-21 21:15 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-05  8:04 [Bug fortran/49638] New: [OOP] length parameter is ignored when overriding type bound character functions with constant length boschmann at tp1 dot physik.uni-siegen.de
2011-07-30 16:16 ` [Bug fortran/49638] " janus at gcc dot gnu.org
2011-07-30 16:24 ` janus at gcc dot gnu.org
2011-07-31 11:05 ` janus at gcc dot gnu.org
2011-08-03 18:37 ` janus at gcc dot gnu.org
2011-08-03 18:53 ` janus at gcc dot gnu.org
2011-08-03 19:43 ` janus at gcc dot gnu.org
2011-08-03 20:20 ` janus at gcc dot gnu.org
2011-08-03 21:36 ` mikael at gcc dot gnu.org
2011-08-04  7:42 ` janus at gcc dot gnu.org
2011-08-04  8:10 ` burnus at gcc dot gnu.org
2011-08-04 11:00 ` janus at gcc dot gnu.org
2011-08-04 11:15 ` mikael at gcc dot gnu.org
2011-08-04 11:17 ` mikael at gcc dot gnu.org
2011-08-04 15:19 ` kargl at gcc dot gnu.org
2011-08-04 21:17 ` janus at gcc dot gnu.org
2011-08-07 10:13 ` janus at gcc dot gnu.org
2011-08-07 10:17 ` janus at gcc dot gnu.org
2011-08-07 21:00 ` janus at gcc dot gnu.org
2011-08-07 21:13 ` janus at gcc dot gnu.org
2011-08-20 19:31 ` janus at gcc dot gnu.org
2011-08-20 19:35 ` janus at gcc dot gnu.org
2011-08-21 21:26 ` janus 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).