public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dominiq at lps dot ens.fr" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/47240] [F03] segfault with procedure pointer component
Date: Wed, 12 Jan 2011 21:21:00 -0000 [thread overview]
Message-ID: <bug-47240-4-YHpZtWj7BX@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-47240-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47240
--- Comment #10 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2011-01-12 20:59:31 UTC ---
> sorry, I can not reproduce this at r168655 (plus patch from comment #7), at
> least not on x86_64-unknown-linux-gnu. Do you only get this error with the
> patch, or also with a clean trunk? I would expect that my patch should not have
> any impact on your test case ...
I am rebuilding a clean tree with only the following patch
diff -up ../_clean/gcc/fortran/resolve.c gcc/fortran/resolve.c
--- ../_clean/gcc/fortran/resolve.c 2011-01-09 22:13:56.000000000 +0100
+++ gcc/fortran/resolve.c 2011-01-12 21:49:39.000000000 +0100
@@ -4858,6 +4858,9 @@ expression_rank (gfc_expr *e)
for (ref = e->ref; ref; ref = ref->next)
{
+ if (ref->type == REF_COMPONENT && !ref->next)
+ rank = ref->u.c.component->as ? ref->u.c.component->as->rank : 0;
+
if (ref->type != REF_ARRAY)
continue;
diff -up ../_clean/gcc/fortran/trans-expr.c gcc/fortran/trans-expr.c
--- ../_clean/gcc/fortran/trans-expr.c 2011-01-08 20:18:07.000000000 +0100
+++ gcc/fortran/trans-expr.c 2011-01-12 21:49:39.000000000 +0100
@@ -3044,7 +3044,8 @@ gfc_conv_procedure_call (gfc_se * se, gf
|| (fsym->attr.proc_pointer
&& !(e->expr_type == EXPR_VARIABLE
&& e->symtree->n.sym->attr.dummy))
- || (e->expr_type == EXPR_VARIABLE
+ || (fsym->attr.proc_pointer
+ && e->expr_type == EXPR_VARIABLE
&& gfc_is_proc_ptr_comp (e, NULL))
|| fsym->attr.allocatable))
{
(your patch for trans-expr.c does not apply cleanly with a copy&past from
safari, so I hope I got it right).
next prev parent reply other threads:[~2011-01-12 21:00 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-10 9:10 [Bug fortran/47240] New: " m.a.hulsen at tue dot nl
2011-01-10 9:37 ` [Bug fortran/47240] " burnus at gcc dot gnu.org
2011-01-10 10:54 ` [Bug fortran/47240] [F03] " janus at gcc dot gnu.org
2011-01-10 20:34 ` janus at gcc dot gnu.org
2011-01-10 21:55 ` janus at gcc dot gnu.org
2011-01-11 11:55 ` janus at gcc dot gnu.org
2011-01-11 14:23 ` dominiq at lps dot ens.fr
2011-01-11 14:55 ` janus at gcc dot gnu.org
2011-01-11 23:15 ` dominiq at lps dot ens.fr
2011-01-12 21:00 ` janus at gcc dot gnu.org
2011-01-12 21:21 ` dominiq at lps dot ens.fr [this message]
2011-01-12 21:54 ` burnus at gcc dot gnu.org
2011-01-12 22:40 ` dominiq at lps dot ens.fr
2011-01-13 6:25 ` jvdelisle at gcc dot gnu.org
2011-01-13 18:58 ` dominiq at lps dot ens.fr
2011-01-18 23:21 ` janus at gcc dot gnu.org
2011-01-18 23:21 ` janus at gcc dot gnu.org
2011-01-19 8:57 ` m.a.hulsen at tue dot nl
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-47240-4-YHpZtWj7BX@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).