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/93553] ICE in scan_omp_1_op, at omp-low.c:3485
Date: Fri, 17 Jul 2020 11:02:58 +0000	[thread overview]
Message-ID: <bug-93553-4-JR659Lv2Jn@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-93553-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93553

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu.org

--- Comment #6 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Slightly simplified one can use a scalar 'c' instead of an array. One gets
(-fdump-tree-gimple):

  #pragma omp parallel reduction(+:x) shared(c)
    {
      integer(kind=8) D.3933;
      integer(kind=8) D.3934;

      #pragma omp for nowait private(i)
      for (i = 1; i <= 8; i = i + 1)
          {
            D.3933 = (integer(kind=8)) i;
            D.3934 = D.3933 + -1;
            (*x)[D.3934] = c;

During omp-lowering, one has:
…
D.3924 = S.0 + -1;
D.3940 = x;
(*D.3940)[D.3924] = 0;

The "D.3940 = x;" is processed and the "D.3940" ends up as "tp" argument to
"scan_omp_1_op" which calls then in turn:
  tree repl = remap_decl (t, &ctx->cb)
The latter then calls
  omp_copy_decl
and returns error_mark_node → this gives then the gcc_assert in scan_omp1_op.

By contrast, "S.0" appears in ctx->cb->decl_map and, hence, omp_copy_decl is
not called for it.

       reply	other threads:[~2020-07-17 11:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-93553-4@http.gcc.gnu.org/bugzilla/>
2020-07-17 11:02 ` burnus at gcc dot gnu.org [this message]
2020-07-17 17:05 ` burnus at gcc dot gnu.org
2020-07-20 18:41 ` burnus at gcc dot gnu.org
2020-08-08  9:12 ` cvs-commit at gcc dot gnu.org
2020-08-25 17:45 ` cvs-commit at gcc dot gnu.org
2020-09-16 19:22 ` cvs-commit at gcc dot gnu.org
2020-09-17 17:14 ` jakub 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-93553-4-JR659Lv2Jn@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).