[Bug middle-end/93555] ICE in simd_clone_struct_copy, at omp-simd-clone.c:84
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93555 --- Comment #7 from CVS Commits --- The releases/gcc-8 branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:5781600c42f3ed9860a804dbbf892392bea3e39d commit r8-10014-g5781600c42f3ed9860a804dbbf892392bea3e39d Author: Jakub Jelinek Date: Fri Feb 14 15:46:51 2020 +0100 openmp: Avoid ICEs with declare simd; declare simd inbranch [PR93555] The testcases ICE because when processing the declare simd inbranch, we don't create the i == 0 clone as it already exists, which means clone_info->nargs is not adjusted, but we then rely on it being adjusted when trying other clones. 2020-02-05 Jakub Jelinek PR middle-end/93555 * omp-simd-clone.c (expand_simd_clones): If simd_clone_mangle or simd_clone_create failed when i == 0, adjust clone->nargs by clone->inbranch. * c-c++-common/gomp/pr93555-1.c: New test. * c-c++-common/gomp/pr93555-2.c: New test. * gfortran.dg/gomp/pr93555.f90: New test.
[Bug middle-end/93555] ICE in simd_clone_struct_copy, at omp-simd-clone.c:84
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93555 --- Comment #6 from CVS Commits --- The releases/gcc-9 branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:d42f9eaa3e189d4228a4b3a63d02b83fed6385e7 commit r9-8218-gd42f9eaa3e189d4228a4b3a63d02b83fed6385e7 Author: Jakub Jelinek Date: Wed Feb 5 11:32:37 2020 +0100 openmp: Avoid ICEs with declare simd; declare simd inbranch [PR93555] The testcases ICE because when processing the declare simd inbranch, we don't create the i == 0 clone as it already exists, which means clone_info->nargs is not adjusted, but we then rely on it being adjusted when trying other clones. 2020-02-05 Jakub Jelinek PR middle-end/93555 * omp-simd-clone.c (expand_simd_clones): If simd_clone_mangle or simd_clone_create failed when i == 0, adjust clone->nargs by clone->inbranch. * c-c++-common/gomp/pr93555-1.c: New test. * c-c++-common/gomp/pr93555-2.c: New test. * gfortran.dg/gomp/pr93555.f90: New test.
[Bug middle-end/93555] ICE in simd_clone_struct_copy, at omp-simd-clone.c:84
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93555 Jakub Jelinek changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #5 from Jakub Jelinek --- Fixed.
[Bug middle-end/93555] ICE in simd_clone_struct_copy, at omp-simd-clone.c:84
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93555 --- Comment #4 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:b843bcb89519293404bb00d2ed09aae529b54d7f commit r10-6444-gb843bcb89519293404bb00d2ed09aae529b54d7f Author: Jakub Jelinek Date: Wed Feb 5 11:32:37 2020 +0100 openmp: Avoid ICEs with declare simd; declare simd inbranch [PR93555] The testcases ICE because when processing the declare simd inbranch, we don't create the i == 0 clone as it already exists, which means clone_info->nargs is not adjusted, but we then rely on it being adjusted when trying other clones. 2020-02-05 Jakub Jelinek PR middle-end/93555 * omp-simd-clone.c (expand_simd_clones): If simd_clone_mangle or simd_clone_create failed when i == 0, adjust clone->nargs by clone->inbranch. * c-c++-common/gomp/pr93555-1.c: New test. * c-c++-common/gomp/pr93555-2.c: New test. * gfortran.dg/gomp/pr93555.f90: New test.
[Bug middle-end/93555] ICE in simd_clone_struct_copy, at omp-simd-clone.c:84
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93555 Jakub Jelinek changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org --- Comment #3 from Jakub Jelinek --- --- gcc/omp-simd-clone.c.jj 2020-01-12 11:54:36.688409260 +0100 +++ gcc/omp-simd-clone.c2020-02-04 18:08:11.271036096 +0100 @@ -1713,14 +1713,22 @@ expand_simd_clones (struct cgraph_node * already. */ tree id = simd_clone_mangle (node, clone); if (id == NULL_TREE) - continue; + { + if (i == 0) + clone->nargs += clone->inbranch; + continue; + } /* Only when we are sure we want to create the clone actually clone the function (or definitions) or create another extern FUNCTION_DECL (for prototypes without definitions). */ struct cgraph_node *n = simd_clone_create (node); if (n == NULL) - continue; + { + if (i == 0) + clone->nargs += clone->inbranch; + continue; + } n->simdclone = clone; clone->origin = node; seems to work.
[Bug middle-end/93555] ICE in simd_clone_struct_copy, at omp-simd-clone.c:84
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93555 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org Component|fortran |middle-end --- Comment #2 from Jakub Jelinek --- ICEs in C/C++ too: #pragma omp declare simd #pragma omp declare simd inbranch int foo (int x) { return x; } #pragma omp declare simd inbranch #pragma omp declare simd int bar (int x) { return x; }