public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/50564] [4.7 Regression] Front-end optimization - ICE with FORALL
Date: Sun, 09 Oct 2011 16:01:00 -0000 [thread overview]
Message-ID: <bug-50564-4-yEA0F3aHZH@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-50564-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50564
--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-10-09 16:00:41 UTC ---
(In reply to comment #4)
> So, the best method is to disable front-end optimization within
> a forall loop.
>
> I assume the same holds for DO CONCURRENT.
I think do concurrent is OK - here, the same as with a DO loop applies -- only
the user has to guarantee that the loop will yield the same result independent
of the execution order of the bounds.
However, I think the current FE optimization might have problems with
threadsafety. Assume:
!$OMP parallel do default(share)
do i = 1, 5
A(i) = 5*cos(B(i))+8*cos(B(i))
end do
If one now transforms this into:
!$OMP parallel do default(share)
do i = 1, 5
tmp = cos(B(i))
A(i) = 5*tmp+8*tmp
end do
one has a problem as "tmp" is shared. Thus, one needs to make sure that all
inserted temporary variables are thread private (DECL_THREAD_LOCAL_P).
next prev parent reply other threads:[~2011-10-09 16:01 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-29 8:21 [Bug fortran/50564] New: " burnus at gcc dot gnu.org
2011-09-29 8:35 ` [Bug fortran/50564] " burnus at gcc dot gnu.org
2011-09-29 13:10 ` burnus at gcc dot gnu.org
2011-09-30 6:01 ` tkoenig at gcc dot gnu.org
2011-09-30 9:30 ` burnus at gcc dot gnu.org
2011-10-08 9:31 ` tkoenig at gcc dot gnu.org
2011-10-08 21:41 ` tkoenig at gcc dot gnu.org
2011-10-09 16:01 ` burnus at gcc dot gnu.org [this message]
2011-10-09 16:15 ` burnus at gcc dot gnu.org
2011-10-09 18:11 ` tkoenig at netcologne dot de
2011-10-10 9:24 ` burnus at gcc dot gnu.org
2011-10-10 14:28 ` rguenth at gcc dot gnu.org
2011-10-10 18:57 ` tkoenig at netcologne dot de
2011-10-10 19:09 ` tkoenig at gcc dot gnu.org
2011-10-10 19:15 ` tkoenig 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-50564-4-yEA0F3aHZH@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).