* gfortran.h (symbol_attribute): New 'untyped' field, fix comment
formatting.
* symbol.c (gfc_set_default_type): Issue error only once, by setting
and checking 'untyped' attribute.
testsuite/
* gfortran.dg/deftype_1.f90: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95469
138bc75d-0d04-0410-961f-
82ee72b054a4
(gfc_symbol_init_2): Pass second argument to gfc_get_namespace.
* trans-common.c (build_common_decl): Likewise.
+ * gfortran.h (symbol_attribute): New 'untyped' field, fix comment
+ formatting.
+ * symbol.c (gfc_set_default_type): Issue error only once, by setting
+ and checking 'untyped' attribute.
+
2005-02-23 Kazu Hirata <kazu@cs.umass.edu>
* intrinsic.h, st.c: Update copyright.
unsigned in_namelist:1, in_common:1;
unsigned function:1, subroutine:1, generic:1;
- unsigned implicit_type:1; /* Type defined via implicit rules */
+ unsigned implicit_type:1; /* Type defined via implicit rules. */
+ unsigned untyped:1; /* No implicit type could be found. */
/* Function/subroutine attributes */
unsigned sequence:1, elemental:1, pure:1, recursive:1;
if (ts->type == BT_UNKNOWN)
{
- if (error_flag)
- gfc_error ("Symbol '%s' at %L has no IMPLICIT type", sym->name,
- &sym->declared_at);
+ if (error_flag && !sym->attr.untyped)
+ {
+ gfc_error ("Symbol '%s' at %L has no IMPLICIT type",
+ sym->name, &sym->declared_at);
+ sym->attr.untyped = 1; /* Ensure we only give an error once. */
+ }
return FAILURE;
}
* gfortran.dg/implicit_3.f90: New test.
+ * gfortran.dg/deftype_1.f90: New test.
+
2005-02-23 Alexandre Oliva <aoliva@redhat.com>
* g++.dg/lookup/anon2.C: Don't let access checks make it look like
--- /dev/null
+! { dg-do compile }
+! Checks for excess errors.
+implicit none
+dimension i(10) ! { dg-error "has no IMPLICIT type" }
+i = 2
+end