Commit d1303acd by Tobias Schlüter Committed by Tobias Schlüter

gfortran.h (symbol_attribute): New 'untyped' field, fix comment formatting.

fortran/
* 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.

From-SVN: r95469
parent 0366dfe9
......@@ -11,6 +11,11 @@
(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.
......
......@@ -408,7 +408,8 @@ typedef struct
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;
......
......@@ -213,9 +213,12 @@ gfc_set_default_type (gfc_symbol * sym, int error_flag, gfc_namespace * ns)
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;
}
......
......@@ -2,6 +2,8 @@
* 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
......
! { dg-do compile }
! Checks for excess errors.
implicit none
dimension i(10) ! { dg-error "has no IMPLICIT type" }
i = 2
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment