https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68950
--- Comment #1 from vries at gcc dot gnu.org --- To reproduce on trunk, introduce triggering of the error here: ... diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c index 8556b70..60f4ad3 100644 --- a/gcc/fortran/f95-lang.c +++ b/gcc/fortran/f95-lang.c @@ -93,7 +93,7 @@ static const struct attribute_spec gfc_attribute_table[] = affects_type_identity } */ { "omp declare target", 0, 0, true, false, false, gfc_handle_omp_declare_target_attribute, false }, - { "oacc function", 0, -1, true, false, false, + { "oacc function", 0, 0, true, false, false, gfc_handle_omp_declare_target_attribute, false }, { NULL, 0, 0, false, false, false, NULL, false } }; ... And run goacc.exp=routine-4.f90.