diff options
author | Tobias Burnus <burnus@net-b.de> | 2013-06-07 17:05:47 +0200 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2013-06-07 17:05:47 +0200 |
commit | 894460a754c74f27c9dff3d4ff0d8b1c45d1f8d6 (patch) | |
tree | aabfb60b1fa8644cbc213b22b8baf303b5d8ba45 /gcc/fortran | |
parent | b5e0425c7c222004d535313f6c9344099556d1f1 (diff) | |
download | gcc-894460a754c74f27c9dff3d4ff0d8b1c45d1f8d6.zip gcc-894460a754c74f27c9dff3d4ff0d8b1c45d1f8d6.tar.gz gcc-894460a754c74f27c9dff3d4ff0d8b1c45d1f8d6.tar.bz2 |
re PR fortran/57549 (Bogus error with array constructor with derived-type typespec)
2013-06-07 Tobias Burnus <burnus@net-b.de>
PR fortran/57549
* array.c (gfc_match_array_constructor): Call
gfc_match_type_spec instead of gfc_match_decl_type_spec.
* match.c (gfc_match_type_spec): Renamed from match_type_spec.
(gfc_match_type_is, gfc_match_allocate): Update call.
* match.h (gfc_match_type_spec): Add prototype.
2013-06-07 Tobias Burnus <burnus@net-b.de>
PR fortran/57549
* gfortran.dg/array_constructor_48.f90: New.
* gfortran.dg/array_constructor_type_14.f03: Correct test case.
* gfortran.dg/array_constructor_type_15.f03: Ditto.
From-SVN: r199820
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/fortran/array.c | 2 | ||||
-rw-r--r-- | gcc/fortran/match.c | 8 | ||||
-rw-r--r-- | gcc/fortran/match.h | 2 |
4 files changed, 16 insertions, 5 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 6b9093b..9e577d8 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,5 +1,14 @@ 2013-06-07 Tobias Burnus <burnus@net-b.de> + PR fortran/57549 + * array.c (gfc_match_array_constructor): Call + gfc_match_type_spec instead of gfc_match_decl_type_spec. + * match.c (gfc_match_type_spec): Renamed from match_type_spec. + (gfc_match_type_is, gfc_match_allocate): Update call. + * match.h (gfc_match_type_spec): Add prototype. + +2013-06-07 Tobias Burnus <burnus@net-b.de> + PR fortran/57556 * trans.c (gfc_build_final_call): Init block before use. diff --git a/gcc/fortran/array.c b/gcc/fortran/array.c index c2ac1ec..c6b8eb9 100644 --- a/gcc/fortran/array.c +++ b/gcc/fortran/array.c @@ -1073,7 +1073,7 @@ gfc_match_array_constructor (gfc_expr **result) /* Try to match an optional "type-spec ::" */ gfc_clear_ts (&ts); gfc_new_undo_checkpoint (changed_syms); - if (gfc_match_decl_type_spec (&ts, 0) == MATCH_YES) + if (gfc_match_type_spec (&ts) == MATCH_YES) { seen_ts = (gfc_match (" ::") == MATCH_YES); diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c index b44d815..2533584 100644 --- a/gcc/fortran/match.c +++ b/gcc/fortran/match.c @@ -1937,8 +1937,8 @@ match_derived_type_spec (gfc_typespec *ts) the implicit_flag is not needed, so it was removed. Derived types are identified by their name alone. */ -static match -match_type_spec (gfc_typespec *ts) +match +gfc_match_type_spec (gfc_typespec *ts) { match m; locus old_locus; @@ -3426,7 +3426,7 @@ gfc_match_allocate (void) /* Match an optional type-spec. */ old_locus = gfc_current_locus; - m = match_type_spec (&ts); + m = gfc_match_type_spec (&ts); if (m == MATCH_ERROR) goto cleanup; else if (m == MATCH_NO) @@ -5502,7 +5502,7 @@ gfc_match_type_is (void) c = gfc_get_case (); c->where = gfc_current_locus; - if (match_type_spec (&c->ts) == MATCH_ERROR) + if (gfc_match_type_spec (&c->ts) == MATCH_ERROR) goto cleanup; if (gfc_match_char (')') != MATCH_YES) diff --git a/gcc/fortran/match.h b/gcc/fortran/match.h index ac8b9f8..1a701f0 100644 --- a/gcc/fortran/match.h +++ b/gcc/fortran/match.h @@ -59,6 +59,8 @@ match gfc_match_char (char); match gfc_match (const char *, ...); match gfc_match_iterator (gfc_iterator *, int); match gfc_match_parens (void); +match gfc_match_type_spec (gfc_typespec *); + /* Statement matchers. */ match gfc_match_program (void); |