This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch, openmp/openacc] Allow Fortran parameters in map/copy.


On Fri, Jul 05, 2019 at 01:10:00PM +0100, Andrew Stubbs wrote:
> > so I don't believe Fortran parameters are OpenMP variables.
> > Scalar Fortran parameters don't even have any data storage block associated
> > with them at all.
> 
> Agreed, they are not variables (nor variable), and copying them about is
> entirely pointless (although, if you simply remove the error check GCC will
> happily create storage for 'N' and do the copies).
> 
> And yet, this issue has generated a support request from a blocked customer,
> and I'd like to improve their experience.
> 
> I could generate a warning, or add a note to the error message, but in the
> interests of portability I thought just doing the right thing would be
> nicer.
> 
> Any suggestions?

I don't know what OpenACC says, perhaps it is different.

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.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]