aboutsummaryrefslogtreecommitdiff
path: root/gcc/f/global.c
diff options
context:
space:
mode:
authorJeff Law <law@gcc.gnu.org>1997-08-27 21:21:05 -0600
committerJeff Law <law@gcc.gnu.org>1997-08-27 21:21:05 -0600
commit795232f720238a9cf7744ee9a0f06f505c28e23b (patch)
tree246ae6f1a287c79231b2663c2ed6742b79ee9c88 /gcc/f/global.c
parentd995a6dc4963f6558678d15f0ddade382d6f4bbd (diff)
downloadgcc-795232f720238a9cf7744ee9a0f06f505c28e23b.zip
gcc-795232f720238a9cf7744ee9a0f06f505c28e23b.tar.gz
gcc-795232f720238a9cf7744ee9a0f06f505c28e23b.tar.bz2
Update to Aug 26 g77 front end and runtime.
From-SVN: r14985
Diffstat (limited to 'gcc/f/global.c')
-rw-r--r--gcc/f/global.c42
1 files changed, 33 insertions, 9 deletions
diff --git a/gcc/f/global.c b/gcc/f/global.c
index 033448d..237f06e 100644
--- a/gcc/f/global.c
+++ b/gcc/f/global.c
@@ -302,10 +302,11 @@ ffeglobal_new_progunit_ (ffesymbol s, ffelexToken t, ffeglobalType type)
return;
if ((g != NULL)
- && (g->type != FFEGLOBAL_typeNONE)
- && (g->type != FFEGLOBAL_typeEXT)
- && ((g->type != type)
- || (g->u.proc.defined)))
+ && ((g->type == FFEGLOBAL_typeMAIN)
+ || (g->type == FFEGLOBAL_typeSUBR)
+ || (g->type == FFEGLOBAL_typeFUNC)
+ || (g->type == FFEGLOBAL_typeBDATA))
+ && g->u.proc.defined)
{
if (ffe_is_globals () || ffe_is_warn_globals ())
{
@@ -321,6 +322,27 @@ ffeglobal_new_progunit_ (ffesymbol s, ffelexToken t, ffeglobalType type)
}
g->type = FFEGLOBAL_typeANY;
}
+ else if ((g != NULL)
+ && (g->type != FFEGLOBAL_typeNONE)
+ && (g->type != FFEGLOBAL_typeEXT)
+ && (g->type != type))
+ {
+ if (ffe_is_globals () || ffe_is_warn_globals ())
+ {
+ ffebad_start (ffe_is_globals ()
+ ? FFEBAD_FILEWIDE_DISAGREEMENT
+ : FFEBAD_FILEWIDE_DISAGREEMENT_W);
+ ffebad_string (ffelex_token_text (t));
+ ffebad_string (ffeglobal_type_string_[type]);
+ ffebad_string (ffeglobal_type_string_[g->type]);
+ ffebad_here (0, ffelex_token_where_line (t),
+ ffelex_token_where_column (t));
+ ffebad_here (1, ffelex_token_where_line (g->t),
+ ffelex_token_where_column (g->t));
+ ffebad_finish ();
+ }
+ g->type = FFEGLOBAL_typeANY;
+ }
else
{
if (g == NULL)
@@ -1180,6 +1202,12 @@ ffeglobal_ref_progunit_ (ffesymbol s, ffelexToken t, ffeglobalType type)
ffename n = NULL;
ffeglobal g;
+ /* It is never really _known_ that an EXTERNAL statement
+ names a BLOCK DATA by just looking at the program unit,
+ so override a different notion here. */
+ if (type == FFEGLOBAL_typeBDATA)
+ type = FFEGLOBAL_typeEXT;
+
g = ffesymbol_global (s);
if (g == NULL)
{
@@ -1218,11 +1246,6 @@ ffeglobal_ref_progunit_ (ffesymbol s, ffelexToken t, ffeglobalType type)
ffebad_finish ();
}
#endif
- /* It is never really _known_ that an EXTERNAL statement
- names a BLOCK DATA by just looking at the program unit,
- so don't override a different notion. */
- if (type == FFEGLOBAL_typeBDATA)
- type = FFEGLOBAL_typeEXT;
}
else if (ffe_is_globals ())
{
@@ -1272,6 +1295,7 @@ ffeglobal_ref_progunit_ (ffesymbol s, ffelexToken t, ffeglobalType type)
&& ((ffesymbol_basictype (s) != g->u.proc.bt)
|| (ffesymbol_kindtype (s) != g->u.proc.kt)
|| ((ffesymbol_size (s) != g->u.proc.sz)
+ && g->u.proc.defined
&& (g->u.proc.sz != FFETARGET_charactersizeNONE))))
{
if (ffe_is_globals ())