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/50570] [4.6/4.7 Regression] Incorrect error for assignment to intent(in) pointer
Date: Sun, 09 Oct 2011 23:28:00 -0000 [thread overview]
Message-ID: <bug-50570-4-w4Z4UdksF3@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-50570-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50570
--- Comment #8 from janus at gcc dot gnu.org 2011-10-09 23:26:45 UTC ---
(In reply to comment #7)
> > > > How about this?
> > >
> > > Looks as if should work (for comment 0).
> >
> > It does. I'll check for regressions.
>
> Unfortunately it fails on:
>
> FAIL: gfortran.dg/pointer_intent_1.f90 -O0 (test for excess errors)
> FAIL: gfortran.dg/pointer_intent_3.f90 -O (test for excess errors)
> FAIL: gfortran.dg/pointer_intent_4.f90 -O0 (test for excess errors)
The following variant avoids these regressions:
Index: gcc/fortran/expr.c
===================================================================
--- gcc/fortran/expr.c (revision 179729)
+++ gcc/fortran/expr.c (working copy)
@@ -4635,7 +4635,7 @@ gfc_check_vardef_context (gfc_expr* e, bool pointe
sym->name, context, &e->where);
return FAILURE;
}
- if (!pointer && !is_pointer)
+ if (!pointer && !is_pointer && !sym->attr.pointer)
{
if (context)
gfc_error ("Dummy argument '%s' with INTENT(IN) in variable"
next prev parent reply other threads:[~2011-10-09 23:28 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-29 19:28 [Bug fortran/50570] New: " longb at cray dot com
2011-09-30 7:00 ` [Bug fortran/50570] [4.6/4.7 Regression] " burnus at gcc dot gnu.org
2011-10-03 10:15 ` msteghofer at cistib dot upf.edu
2011-10-03 10:17 ` msteghofer at cistib dot upf.edu
2011-10-09 20:32 ` janus at gcc dot gnu.org
2011-10-09 20:40 ` burnus at gcc dot gnu.org
2011-10-09 21:15 ` janus at gcc dot gnu.org
2011-10-09 23:08 ` janus at gcc dot gnu.org
2011-10-09 23:28 ` janus at gcc dot gnu.org [this message]
2011-10-10 6:58 ` burnus at gcc dot gnu.org
2011-10-10 9:45 ` msteghofer at cistib dot upf.edu
2011-10-10 11:48 ` janus at gcc dot gnu.org
2011-10-10 13:25 ` msteghofer at cistib dot upf.edu
2011-10-10 15:17 ` rguenth at gcc dot gnu.org
2011-10-14 17:59 ` janus at gcc dot gnu.org
2011-10-15 13:31 ` janus at gcc dot gnu.org
2011-10-15 13:32 ` 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-50570-4-w4Z4UdksF3@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).