public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "tschwinge at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/104774] New: OpenACC 'kernels' decomposition: internal compiler error: 'verify_gimple' failed, with 'loop' with explicit 'seq' or 'independent'
Date: Thu, 03 Mar 2022 16:28:25 +0000	[thread overview]
Message-ID: <bug-104774-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 104774
           Summary: OpenACC 'kernels' decomposition: internal compiler
                    error: 'verify_gimple' failed, with 'loop' with
                    explicit 'seq' or 'independent'
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code, openacc
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: tschwinge at gcc dot gnu.org
          Reporter: tschwinge at gcc dot gnu.org
  Target Milestone: ---

Another one in addition to PR104132, PR104133, that is *not* fixed by my WIP
patches for those:

    int arr_0;

    void
    foo (void)
    {
    #pragma acc kernels
      {
        int k;

    #pragma acc loop seq
        for (k = 0; k < 2; k++)
          arr_0 = k;

    #pragma acc loop independent reduction(+: arr_0)
        for (k = 0; k < 2; k++)
          arr_0 += k;
      }
    }

With '-fopenacc --param openacc-kernels=decompose -O0 -g0' (so, not involving
'GIMPLE_DEBUG's), for both C and C++, we run into:

    pr.c: In function ‘foo._omp_fn.0’:
    pr.c:18:1: error: non-register as LHS of binary operation
       18 | }
          | ^
    # .MEM_21 = VDEF <.MEM_3>
    k = 0 + .offset.24_2;
    pr.c:18:1: error: invalid RHS for gimple memory store: ‘var_decl’
    *_23;

    k

    # .MEM_24 = VDEF <.MEM_21>
    *_23 = k;
    pr.c:18:1: error: non-register as LHS of binary operation
    # .MEM_27 = VDEF <.MEM_4>
    k = 0 + 2;
    during GIMPLE pass: ssa
    pr.c:18:1: internal compiler error: verify_gimple failed

Only with both 'loop's changed to implicit or explicit 'auto' (that is, both
'seq' and 'independent' removed), we succeed to compile (with my PR104132,
PR104133 WIP patches applied).

             reply	other threads:[~2022-03-03 16:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-03 16:28 tschwinge at gcc dot gnu.org [this message]
2022-03-10 11:07 ` [Bug middle-end/104774] " cvs-commit at gcc dot gnu.org
2022-03-10 11:07 ` cvs-commit at gcc dot gnu.org
2022-03-10 11:32 ` tschwinge 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-104774-4@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).