[Bug fortran/94397] [10 Regression] the compiler consider "type is( real(kind(1.)) )" as a syntax error since r10-7369-gc38daa7976886a59
kargl at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Mar 31 14:33:08 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94397
--- Comment #5 from kargl at gcc dot gnu.org ---
(In reply to markeggleston from comment #4)
> The compilation error reported is due this change in PR93484:
>
> --- a/gcc/fortran/match.c
> +++ b/gcc/fortran/match.c
> @@ -2222,9 +2222,9 @@ gfc_match_type_spec (gfc_typespec *ts)
>
> found:
>
> - m = gfc_match_init_expr (&e);
> + m = gfc_match_expr (&e);
>
> Changing it back causes test cases ISO_Fortran_binding_11.f90 and
> pr78033.f90 to fail.
>
> If "kind=" is found gfc_match_init_expr (&e) should be used and when it is
> not gfc_match_expr (&e).
>
> I'm checking a suitable test case and will have a patch ready soon.
The patch in comment #3 likely is the correct patch. When in the
specification part of a scoping unit, the above change is needed to
distinguish REAL(kind(1.)) from REAL(1.1, kind(1.)). In the former,
we have a type and kind(1.) must be an initialization expression
(see comment 3 or 4 lines down). In the latter case, we have the
intrinsic subprogram, and simply return MATCH_NO or MATCH_ERROR.
--
steve
More information about the Gcc-bugs
mailing list