public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "boschmann at tp1 dot physik.uni-siegen.de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/49638] New: [OOP] length parameter is ignored when overriding type bound character functions with constant length.
Date: Tue, 05 Jul 2011 08:04:00 -0000	[thread overview]
Message-ID: <bug-49638-4@http.gcc.gnu.org/bugzilla/> (raw)

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.


             reply	other threads:[~2011-07-05  8:04 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-05  8:04 boschmann at tp1 dot physik.uni-siegen.de [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-49638-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).