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/54778] [OOP] an ICE on invalid OO code Date: Tue, 02 Oct 2012 16:13:00 -0000 [thread overview] Message-ID: <bug-54778-4-IpEXuiUl9v@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-54778-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54778 janus at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Keywords| |ice-on-invalid-code Last reconfirmed| |2012-10-02 CC| |janus at gcc dot gnu.org AssignedTo|unassigned at gcc dot |janus at gcc dot gnu.org |gnu.org | Ever Confirmed|0 |1 Summary|an ICE on invalid OO code |[OOP] an ICE on invalid OO | |code --- Comment #1 from janus at gcc dot gnu.org 2012-10-02 16:12:50 UTC --- Thanks for reporting. I can reproduce this on 4.7 and trunk. Here is a patch to fix it: Index: gcc/fortran/interface.c =================================================================== --- gcc/fortran/interface.c (revision 191869) +++ gcc/fortran/interface.c (working copy) @@ -3386,7 +3386,8 @@ matching_typebound_op (gfc_expr** tb_base, if (base->expr->ts.type == BT_CLASS) { - if (CLASS_DATA (base->expr) == NULL) + if (CLASS_DATA (base->expr) == NULL + || !gfc_expr_attr (base->expr).class_ok) continue; derived = CLASS_DATA (base->expr)->ts.u.derived; } With this I get: c0.f90:14.2: function elem(this, i) 1 Error: CLASS variable 'elem' at (1) must be dummy, allocatable or pointer c0.f90:18.4: elem = this%elements(i) 1 Error: Variable must not be polymorphic in intrinsic assignment at (1) - check that there is a matching specific subroutine for '=' operator Regtesting now ...
next prev parent reply other threads:[~2012-10-02 16:13 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-10-02 9:50 [Bug fortran/54778] New: " slayoo at staszic dot waw.pl 2012-10-02 16:13 ` janus at gcc dot gnu.org [this message] 2012-10-02 19:00 ` [Bug fortran/54778] [OOP] " janus at gcc dot gnu.org 2012-10-02 19:31 ` janus at gcc dot gnu.org 2012-10-02 21:02 ` janus at gcc dot gnu.org 2012-10-02 21:07 ` 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-54778-4-IpEXuiUl9v@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).