public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "janus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/59720] [OOP] class/extends, multiple generic assignment Date: Wed, 08 Jan 2014 18:42:00 -0000 [thread overview] Message-ID: <bug-59720-4-8iWT2r2W0T@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-59720-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59720 --- Comment #6 from janus at gcc dot gnu.org --- To add to this discussion, here are two examples from the F08 standard (section C.9.6): module fruits type :: fruit end type type, extends(fruit) :: apple end type type, extends(fruit) :: pear end type type, extends(pear) :: bosc end type INTERFACE BAD6 ! this interface is invalid ! SUBROUTINE S6A(X,Y) import :: pear CLASS(PEAR) :: X,Y END SUBROUTINE S6A SUBROUTINE S6B(X,Y) import :: fruit, bosc CLASS(FRUIT) :: X CLASS(BOSC) :: Y END SUBROUTINE S6B END INTERFACE BAD6 INTERFACE GOOD7 SUBROUTINE S7A(X,Y,Z) import :: pear CLASS(PEAR) :: X,Y,Z END SUBROUTINE S7A SUBROUTINE S7B(X,Z,W) import :: fruit, bosc, apple CLASS(FRUIT) :: X CLASS(BOSC) :: Z CLASS(APPLE),OPTIONAL :: W END SUBROUTINE S7B END INTERFACE GOOD7 end gfortran correctly rejects the first one and allows the second (both with and without the patch in comment 2). However, ifort 12.1 seems to accept both, which clearly violates the F08 standard. I also tried flags like -std03 and -std08, without any effect. Are there other flags to force a more strict adherence to the standard? Is anyone able to check other compilers?
next prev parent reply other threads:[~2014-01-08 18:42 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-01-08 12:57 [Bug fortran/59720] New: Re: f2003/f2008, class/extends, multiple gemeric assignment kapinos at rz dot rwth-aachen.de 2014-01-08 14:14 ` [Bug fortran/59720] " dominiq at lps dot ens.fr 2014-01-08 14:55 ` [Bug fortran/59720] [OOP] " janus at gcc dot gnu.org 2014-01-08 15:55 ` [Bug fortran/59720] [OOP] class/extends, multiple generic assignment janus at gcc dot gnu.org 2014-01-08 16:34 ` janus at gcc dot gnu.org 2014-01-08 17:03 ` janus at gcc dot gnu.org 2014-01-08 17:15 ` janus at gcc dot gnu.org 2014-01-08 18:42 ` janus at gcc dot gnu.org [this message] 2014-01-08 19:28 ` anlauf at gmx dot de 2014-01-08 19:38 ` janus at gcc dot gnu.org 2014-01-08 20:56 ` 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-59720-4-8iWT2r2W0T@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: linkBe 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).