diff options
author | Tobias Burnus <burnus@net-b.de> | 2007-08-19 22:08:14 +0200 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2007-08-19 22:08:14 +0200 |
commit | e9c06563626f034b29c8ccb35b01632a3fede753 (patch) | |
tree | 219c86311ab4522bd317eeca819f1b984e6769a3 /gcc/fortran/decl.c | |
parent | 434548f64ffd76cb2a8390935b2179d1a5a421e2 (diff) | |
download | gcc-e9c06563626f034b29c8ccb35b01632a3fede753.zip gcc-e9c06563626f034b29c8ccb35b01632a3fede753.tar.gz gcc-e9c06563626f034b29c8ccb35b01632a3fede753.tar.bz2 |
[multiple changes]
2007-08-18 Tobias Burnus <burnus@net-b.de>
* gfortran.h (gfc_is_intrinsic_typename): Add declaration.
* symbol.c (gfc_is_intrinsic_typename): New function.
* parse.c (decode_statement): Check for space in ABSTRACT INTERFACE.
(parse_interface): Use gfc_is_intrinsic_typename.
* decl.c (gfc_match_derived_decl): Ditto.
* module.c (gfc_match_use): Use gcc_unreachable() for
INTERFACE_ABSTRACT in switch().
2007-08-19 Tobias Burnus <burnus@net-b.de>
* gfortran.dg/interface_abstract_2.f90: New.
* gfortran.dg/interface_abstract_1.f90: Fix typo.
From-SVN: r127626
Diffstat (limited to 'gcc/fortran/decl.c')
-rw-r--r-- | gcc/fortran/decl.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index ed0defd..eb1e423 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -5468,17 +5468,8 @@ gfc_match_derived_decl (void) if (m != MATCH_YES) return m; - /* Make sure the name isn't the name of an intrinsic type. The - 'double {precision,complex}' types don't get past the name - matcher, unless they're written as a single word or in fixed - form. */ - if (strcmp (name, "integer") == 0 - || strcmp (name, "real") == 0 - || strcmp (name, "character") == 0 - || strcmp (name, "logical") == 0 - || strcmp (name, "complex") == 0 - || strcmp (name, "doubleprecision") == 0 - || strcmp (name, "doublecomplex") == 0) + /* Make sure the name is not the name of an intrinsic type. */ + if (gfc_is_intrinsic_typename (name)) { gfc_error ("Type name '%s' at %C cannot be the same as an intrinsic " "type", name); |