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

            Bug ID: 104132
           Summary: OpenACC 'kernels' decomposition: internal compiler
                    error: verify_gimple failed, error: non-register as
                    LHS of binary operation
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code, openacc
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tschwinge at gcc dot gnu.org
                CC: asolokha at gmx dot com, pinskia at gcc dot gnu.org
  Target Milestone: ---

As Andrew Pinski posted in
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104061#c3>:

    int arr_0;
    void
    foo (void)
    {
    #pragma acc kernels
      {
        int k;
    #pragma acc loop
        for (k = 0; k < 2; k++)
          arr_0 = k;
    #pragma acc loop
        for (k = 0; k < 2; k++)
          arr_0 = k;
      }
    }

(Note 'arr_0 = k;', not 'arr_0 += k;' as originally in PR104061.)

Already 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.1’:
    pr.c:40:1: error: non-register as LHS of binary operation
       40 | }
          | ^
    k = 0 + .offset.18;
    pr.c:40:1: error: non-register as LHS of binary operation
    k = 0 + 2;
    during IPA pass: *free_lang_data
    pr.c:40:1: internal compiler error: verify_gimple failed
  • [Bug middle-end/104132] New: Ope... tschwinge at gcc dot gnu.org via Gcc-bugs

Reply via email to