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

            Bug ID: 124379
           Summary: Compiler segmentation fault when sharing SVE vector
                    with OpenMP
           Product: gcc
           Version: 14.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: humbertogilgomes at protonmail dot com
  Target Milestone: ---

Created attachment 63841
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=63841&action=edit
Output from -freport-bug

Attempting to share an ARM64 SVE vector in an OpenMP parallel region crashes
GCC 14.3.0 (13.3.0 and 12.3.0 as well) with a segmentation fault. I am not sure
what the expected result is: whether the compiler should succeed or return a
compilation error, but it should not segfault.

All additional requested information should be in the annexed file
(-freport-bug output). Feel free to request any further information you may
need.




// gcc -c -fopenmp -mcpu=a64fx segfault.c

#include <stdio.h>
#include <arm_sve.h>

void segfault(void) {
    svfloat32_t one = svdup_n_f32(1.0f);

    #pragma omp parallel shared(one)
    {
        float last = svlastb_f32(svptrue_b32(), one);
        printf("%f\n", last);
    }
}

Reply via email to