Dear all, we sometimes silently accept wrong declarations with unbalanced parentheses, as the PR and testcases therein show. It appears that the fix is obvious: use the existing error paths in gfc_match_kind_spec and error return from gfc_match_decl_type_spec. I'm still posting it here in case I have missed something not so obvious. The patch regtests cleanly on x86_64-pc-linux-gnu. OK for mainline? Thanks, Harald