public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/104774] New: OpenACC 'kernels' decomposition: internal compiler error: 'verify_gimple' failed, with 'loop' with explicit 'seq' or 'independent'
@ 2022-03-03 16:28 tschwinge at gcc dot gnu.org
  2022-03-10 11:07 ` [Bug middle-end/104774] " cvs-commit at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2022-03-03 16:28 UTC (permalink / raw)
  To: gcc-bugs

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).

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-03-10 11:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-03 16:28 [Bug middle-end/104774] New: OpenACC 'kernels' decomposition: internal compiler error: 'verify_gimple' failed, with 'loop' with explicit 'seq' or 'independent' tschwinge at gcc dot gnu.org
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

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).