On Fri, Jul 05, 2019 at 03:40:55PM +0100, Andrew Stubbs wrote: > On 05/07/2019 15:04, Jakub Jelinek wrote: > > > For OpenMP, a warning is not good enough, because if Fortran PARAMETER is > > > not a variable, then the program is invalid and needs to be rejected. > > > You could improve the diagnostics by adding some explanation message that > > > fortran > > > PARAMETER is not a variable. > > > > Got it confirmed, it might change in a future OpenMP release; and there has > > been a change already in OpenMP 3.1 that might have intended to allow > > Fortran PARAMETERs in firstprivate clause, but because the glossary hasn't > > been changed, it is not valid even in firstprivate clause. > > OK, here is an alternative patch that merely tries to make the error message > more informative. > > Basically, the user needs to get past "it isn't working but I need that > value in this kernel", so hopefully this will help get them there. > > WDYT?
I don't like it, I'd end the message where you put ;, the rest doesn't make sense and will just confuse users. For one, the compiler should know if the parameter needs to be copied or not, so doesn't need to talk about probability thereof, and if it needs to be copied, it should be the compiler that arranges that (PR90779) and the user has no way to overide or force that behavior. Jakub