public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/autopar_devel] Fortran : Bogus error with additional blanks in type(*) PR95829
@ 2020-08-22 23:10 Giuliano Belinassi
0 siblings, 0 replies; only message in thread
From: Giuliano Belinassi @ 2020-08-22 23:10 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:a93c588cb1c61fb8aaca3ce740e28bbe91012faf
commit a93c588cb1c61fb8aaca3ce740e28bbe91012faf
Author: Mark Eggleston <markeggleston@gcc.gnu.org>
Date: Tue Jun 23 11:01:28 2020 +0100
Fortran : Bogus error with additional blanks in type(*) PR95829
Checking for "* ) " instead of "*)" clears the bogus error.
2020-07-01 Steven G. Kargl <kargl@gcc.gnu.org>
gcc/fortran/
PR fortran/95829
* decl.c (gfc_match_decl_type_spec): Compare with "* ) " instead
of "*)".
2020-07-01 Mark Eggleston <markeggleston@gcc.gnu.org>
gcc/testsuite/
PR fortran/95829
* gfortran.dg/pr95829.f90: New test.
Diff:
---
gcc/fortran/decl.c | 2 +-
gcc/testsuite/gfortran.dg/pr95829.f90 | 14 ++++++++++++++
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
index f38def4c291..e16b96f6a49 100644
--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -4128,7 +4128,7 @@ gfc_match_decl_type_spec (gfc_typespec *ts, int implicit_flag)
gfc_gobble_whitespace ();
if (gfc_peek_ascii_char () == '*')
{
- if ((m = gfc_match ("*)")) != MATCH_YES)
+ if ((m = gfc_match ("* ) ")) != MATCH_YES)
return m;
if (gfc_comp_struct (gfc_current_state ()))
{
diff --git a/gcc/testsuite/gfortran.dg/pr95829.f90 b/gcc/testsuite/gfortran.dg/pr95829.f90
new file mode 100644
index 00000000000..081d647c7c0
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr95829.f90
@@ -0,0 +1,14 @@
+! { dg-do compile }
+!
+! Declaration of b used to be a bogus failure.
+
+subroutine s (a, b, c, d, e, f, g)
+ type(*) :: a
+ type(* ) :: b
+ type( *) :: c
+ type( * ) :: d
+ type(* ) :: e
+ type( *) :: f
+ type( * ) :: g
+end
+
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-08-22 23:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-22 23:10 [gcc/devel/autopar_devel] Fortran : Bogus error with additional blanks in type(*) PR95829 Giuliano Belinassi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).