Summary: | [12 Regression] ICE in scan_sharing_clauses, at omp-low.c:1205 | ||
---|---|---|---|
Product: | gcc | Reporter: | Arseny Solokha <asolokha> |
Component: | middle-end | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | jakub |
Priority: | P3 | Keywords: | ice-on-valid-code, openmp |
Version: | 12.0 | ||
Target Milestone: | 12.0 | ||
See Also: | https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102789 | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | ||
Attachments: | Testcase |
Description
Arseny Solokha
2021-09-26 14:53:42 UTC
It started with my r12-3654-ge5597f2ad55219092929dc12ea15e1edba06df18 then. Shorter testcase: struct S { S (int); }; void bar (S &); void foo () { #pragma omp simd for (int i = 0; i < 64; i++) { S s = 26; bar (s); } } The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>: https://gcc.gnu.org/g:4f07769057c45ec9e751ab1c23e0fe4750102840 commit r12-3917-g4f07769057c45ec9e751ab1c23e0fe4750102840 Author: Jakub Jelinek <jakub@redhat.com> Date: Tue Sep 28 11:38:03 2021 +0200 openmp: Don't call omp_finish_clause on implicitly added private clauses on simd [PR102492] The gimplifier adds implicit private clauses on SIMD constructs for local variables in the SIMD body if they are addressable to make sure they use the magic arrays with "omp simd array" attribute (such that each SIMD lane has its own copy), but we actually don't need to default privatize etc. those, the construction for them is done in the SIMD body and so is destruction. omp_finish_clause for C++ now requires default constructor (and dtor) for private, so that OpenMP 5.1 default(private) works, but that will never be needed on SIMD. So, this patch just doesn't call omp_finish_clause for private on simd. The C and Fortran langhooks don't do anything for private. 2021-09-28 Jakub Jelinek <jakub@redhat.com> PR middle-end/102492 * gimplify.c (gimplify_adjust_omp_clauses_1): Don't call the omp_finish_clause langhook on implicitly added OMP_CLAUSE_PRIVATE clauses on SIMD constructs. * g++.dg/gomp/simd-3.C: New test. Should be fixed now. |