https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109481
Bug ID: 109481 Summary: Bug in openEuler/gcc (13.0.1) support for ARM SVE openmp Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: wumingchuan1992 at foxmail dot com Target Milestone: --- demo.c #include <stdio.h> #include <stdlib.h> #include "arm_sve.h" void test(const int len, const float *src, float *dst) { int loop = svcntw(); svbool_t pg = svptrue_b32(); #pragma omp parallel for for (int i = 0; i <= len - loop; i += loop) { svfloat32_t x = svld1_f32(pg, src + i); svfloat32_t y = svadd_f32_x(pg, x, x); svst1_f32(pg, dst + i, y); } } int main() { float src[512] = {0}; float dst[512] = {0}; test(512, src, dst); return 0; } Run gcc(10.3.0 and 13.0.1 20230412) with the following command: $ gcc -std=c99 -O2 -fopenmp -march=armv8.3-a+fp+sve -o demo.exe demo.c After the command is executed, the following information is displayed: demo.c: In function ‘test’: demo.c:11:25: internal compiler error: Segmentation fault 11 | svfloat32_t x = svld1_f32(pg, src + i); | ^~~~~~~~~~~~~~~~~~~~~~ 0xbecb8f crash_signal ../../gcc/toplev.cc:314 0x966054 omp_add_variable ../../gcc/gimplify.cc:7384 0x967097 omp_add_variable ../../gcc/gimplify.cc:7331 0x967097 omp_add_variable ../../gcc/gimplify.cc:7994 0x9667cf omp_add_variable ../../gcc/gimplify.cc:8063 Any suggestions to proceed?