public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "burnus at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/35820] internal compiler error with nested FORALL Date: Fri, 04 Apr 2008 09:41:00 -0000 [thread overview] Message-ID: <20080404094038.31353.qmail@sourceware.org> (raw) In-Reply-To: <bug-35820-15620@http.gcc.gnu.org/bugzilla/> ------- Comment #4 from burnus at gcc dot gnu dot org 2008-04-04 09:40 ------- I think the problem are related to nested FORALLs. The following is enough to cause the valgrind error (add the needed definitions from comment 0). If I comment either the RDA(J1) assignment in the outer FORALL or the inner FORALL, valgrind finds no error. FORALL (J1 = 1:10) RDA(J1) = RCA(J1) + 1.0_R1_KV FORALL (J2 = 1:9) IDA(J1,J2) = ICA(J1,J2) + 1 END FORALL ENDFORALL The line shown by valgrind is: ==629== at 0x463A23: resolve_code (resolve.c:5902) If I go to the source, this is: /* Record the current FORALL index. */ var_expr[nvar] = gfc_copy_expr (fa->var); where of the function gfc_resolve_forall (i.e. the function has been inlined in resolve_code). I have somehow the feeling that total_var is too small as for forall_save != 0 the size is not properly set. I think the problem is that it is that forall_save has a nonzero value as soon as "RDA(J1) =" is encountered and thus the size is not properly increased when the inner FORALL is encountered. If one swaps the order of "RDA(J1) =" and the inner FOREACH loop, valgrind finds not error. -- burnus at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|internal compiler error with|internal compiler error with |forall |nested FORALL http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35820
next prev parent reply other threads:[~2008-04-04 9:41 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-04-03 18:41 [Bug fortran/35820] New: internal compiler error with forall dick dot hendrickson at gmail dot com 2008-04-03 20:31 ` [Bug fortran/35820] " dominiq at lps dot ens dot fr 2008-04-03 22:13 ` dick dot hendrickson at gmail dot com 2008-04-03 22:27 ` burnus at gcc dot gnu dot org 2008-04-04 9:41 ` burnus at gcc dot gnu dot org [this message] 2008-05-01 17:41 ` [Bug fortran/35820] internal compiler error with nested FORALL pault at gcc dot gnu dot org 2008-05-01 19:48 ` pault at gcc dot gnu dot org 2008-10-22 15:32 ` pault at gcc dot gnu dot org 2008-10-22 16:28 ` burnus at gcc dot gnu dot org 2008-10-28 14:07 ` mikael dot morin at tele2 dot fr 2008-10-31 15:40 ` mikael at gcc dot gnu dot org 2008-11-06 6:20 ` pault at gcc dot gnu dot org 2008-11-08 8:41 ` pault at gcc dot gnu dot org 2008-11-08 8:41 ` pault at gcc dot gnu dot 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=20080404094038.31353.qmail@sourceware.org \ --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).