mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 14:59:39 +02:00
OpenMP/Fortran: uses_allocators - suggest 5.2 format in the warning
Actually mention how the new 5.2+ syntax looks like when outputting the deprecation warning for 'uses_allocators'. gcc/fortran/ChangeLog: * openmp.cc (gfc_match_omp_clause_uses_allocators): Mention new syntax in deprecation warning. libgomp/ChangeLog: * testsuite/libgomp.fortran/dep-uses-allocators.f90: Update dg-warning.
This commit is contained in:
@@ -1864,7 +1864,9 @@ gfc_match_omp_clause_uses_allocators (gfc_omp_clauses *c)
|
||||
"The specification of arguments to "
|
||||
"%<uses_allocators%> at %L where each item is of "
|
||||
"the form %<allocator(traits)%> is deprecated since "
|
||||
"OpenMP 5.2", &p->where);
|
||||
"OpenMP 5.2; instead use %<uses_allocators(traits(%s"
|
||||
"): %s)%>", &p->where, p->u2.traits_sym->name,
|
||||
p->sym->name);
|
||||
}
|
||||
else if (gfc_peek_ascii_char () == '(')
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
! { dg-do compile }
|
||||
! { dg-warning "The specification of arguments to 'uses_allocators' at \\(1\\) where each item is of the form 'allocator\\(traits\\)' is deprecated since OpenMP 5.2 \\\[-Wdeprecated-openmp\\\]" "" { target *-*-* } 11 }
|
||||
! { dg-warning "The specification of arguments to 'uses_allocators' at \\(1\\) where each item is of the form 'allocator\\(traits\\)' is deprecated since OpenMP 5.2; instead use 'uses_allocators(traits(trait): a1)' \\\[-Wdeprecated-openmp\\\]" "" { target *-*-* } 11 }
|
||||
|
||||
program test
|
||||
use omp_lib
|
||||
|
||||
Reference in New Issue
Block a user