jdoerfert added a comment. In D71475#1783928 <https://reviews.llvm.org/D71475#1783928>, @cchen wrote:
> In D71475#1783834 <https://reviews.llvm.org/D71475#1783834>, @jdoerfert wrote: > > > Your commit message example lacks the #pragma. > > > > What if you add k to the list of explicit firstprivate? (I mean, you can > > try it in C first). > > > > And how do I reproduce the crash? I tried: https://godbolt.org/z/FDPSnA > > > Add firstprivate make the code work. Also, the code crash due to assertion > failure and I guess the compiler explorer is using release version instead of > debug version? I see. That makes sense. What do you think about making all variables used in the linear-step (implicitly) firstprivate? Doing this might allow us to (easily) verify they are not shared/private/lastprivate etc. already. If I run this with k lastprivate there is no assertion but the code is not updating k, potentially because it is not legal but then we want to error out. k in a reduction is similar. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71475/new/ https://reviews.llvm.org/D71475 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits