Skip to content
Snippets Groups Projects
user avatar
Tobias Burnus authored
The declaration created by gfc_get_extern_function_decl used input_location
as DECL_SOURCE_LOCATION, which gave rather odd results with 'declared here'
diagnostic. - It is much more useful to use the gfc_symbol's declated_at,
which this commit now does.

Additionally, it adds support for the 'interop' clause of OpenMP's
'dispatch' directive. As the argument order matters,
gfc_match_omp_variable_list gained a 'reverse_order' flag to use the
same order as the C/C++ parser.

gcc/fortran/ChangeLog:

	* gfortran.h: Add OMP_LIST_INTEROP to the unnamed OMP_LIST_ enum.
	* openmp.cc (gfc_match_omp_variable_list): Add reverse_order
	boolean argument, defaulting to false.
	(enum omp_mask2, OMP_DISPATCH_CLAUSES): Add OMP_CLAUSE_INTEROP.
	(gfc_match_omp_clauses, resolve_omp_clauses): Handle dispatch's
	'interop' clause.
	* trans-decl.cc (gfc_get_extern_function_decl): Use sym->declared_at
	instead input_location as DECL_SOURCE_LOCATION.
	* trans-openmp.cc (gfc_trans_omp_clauses): Handle OMP_LIST_INTEROP.

gcc/testsuite/ChangeLog:

	* gfortran.dg/goacc/routine-external-level-of-parallelism-2.f: Update
	xfail'ed 'dg-bogus' for the better 'declared here' location.
	* gfortran.dg/gomp/dispatch-11.f90: New test.
	* gfortran.dg/gomp/dispatch-12.f90: New test.
65286465
History
Name Last commit Last update