Commit 56a0044b by Jeff Law

Another bunch of patches from Craig. See ChangeLogs for details.

From-SVN: r18188
parent 86fc7a6c
...@@ -8,6 +8,15 @@ Fri Feb 20 10:11:20 1998 Craig Burley <burley@gnu.org> ...@@ -8,6 +8,15 @@ Fri Feb 20 10:11:20 1998 Craig Burley <burley@gnu.org>
Sun Jan 11 02:14:47 1998 Craig Burley <burley@gnu.org> Sun Jan 11 02:14:47 1998 Craig Burley <burley@gnu.org>
Fix 970626-2.f by not doing most back-end processing
when current_function_decl is an ERROR_MARK, and by
making that the case when its type would be an ERROR_MARK:
* com.c (ffecom_start_progunit_, finish_function,
lang_printable_name, start_function,
ffecom_finish_symbol_transform_): Test for ERROR_MARK.
* std.c (ffestd_stmt_pass_): Don't do any downstream
processing if ERROR_MARK.
Support FORMAT(I<1+2>) (constant variable-FORMAT Support FORMAT(I<1+2>) (constant variable-FORMAT
expressions): expressions):
* bad.def (FFEBAD_FORMAT_VARIABLE): New diagnostic. * bad.def (FFEBAD_FORMAT_VARIABLE): New diagnostic.
...@@ -106,6 +115,22 @@ Sun Nov 30 22:22:22 1997 Craig Burley <burley@gnu.org> ...@@ -106,6 +115,22 @@ Sun Nov 30 22:22:22 1997 Craig Burley <burley@gnu.org>
* com.c (ffecom_arglist_expr_): Pass null pointers for optional * com.c (ffecom_arglist_expr_): Pass null pointers for optional
args which aren't supplied. args which aren't supplied.
Sun Oct 26 02:36:21 1997 Craig Burley <burley@gnu.ai.mit.edu>
* com.c (lang_print_error_function): Fix to more
reliably notice when the diagnosed region changes.
Sat Oct 25 23:43:36 1997 Craig Burley <burley@gnu.ai.mit.edu>
Fix 950327-0.f:
* sta.c, sta.h (ffesta_outpooldisp): New function.
* std.c (ffestd_stmt_pass_): Don't kill NULL pool.
(ffestd_R842): If pool already preserved, save NULL
for pool, because it should be killed only once.
* malloc.c [MALLOC_DEBUG]: Put initializer for `name'
component in braces, to avoid compiler warning.
Fri Oct 10 13:00:48 1997 Craig Burley <burley@gnu.ai.mit.edu> Fri Oct 10 13:00:48 1997 Craig Burley <burley@gnu.ai.mit.edu>
* ste.c (ffeste_begin_iterdo_): Fix loop setup so iteration * ste.c (ffeste_begin_iterdo_): Fix loop setup so iteration
......
...@@ -6659,7 +6659,7 @@ ffecom_finish_global_ (ffeglobal global) ...@@ -6659,7 +6659,7 @@ ffecom_finish_global_ (ffeglobal global)
static ffesymbol static ffesymbol
ffecom_finish_symbol_transform_ (ffesymbol s) ffecom_finish_symbol_transform_ (ffesymbol s)
{ {
if (s == NULL) if ((s == NULL) || (TREE_CODE (current_function_decl) == ERROR_MARK))
return s; return s;
/* It's easy to know to transform an untransformed symbol, to make sure /* It's easy to know to transform an untransformed symbol, to make sure
...@@ -7948,6 +7948,7 @@ ffecom_start_progunit_ () ...@@ -7948,6 +7948,7 @@ ffecom_start_progunit_ ()
resume_momentary (yes); resume_momentary (yes);
if (TREE_CODE (current_function_decl) != ERROR_MARK)
store_parm_decls (main_program ? 1 : 0); store_parm_decls (main_program ? 1 : 0);
ffecom_start_compstmt_ (); ffecom_start_compstmt_ ();
...@@ -14206,16 +14207,22 @@ finish_function (int nested) ...@@ -14206,16 +14207,22 @@ finish_function (int nested)
register tree fndecl = current_function_decl; register tree fndecl = current_function_decl;
assert (fndecl != NULL_TREE); assert (fndecl != NULL_TREE);
if (TREE_CODE (fndecl) != ERROR_MARK)
{
if (nested) if (nested)
assert (DECL_CONTEXT (fndecl) != NULL_TREE); assert (DECL_CONTEXT (fndecl) != NULL_TREE);
else else
assert (DECL_CONTEXT (fndecl) == NULL_TREE); assert (DECL_CONTEXT (fndecl) == NULL_TREE);
}
/* TREE_READONLY (fndecl) = 1; /* TREE_READONLY (fndecl) = 1;
This caused &foo to be of type ptr-to-const-function This caused &foo to be of type ptr-to-const-function
which then got a warning when stored in a ptr-to-function variable. */ which then got a warning when stored in a ptr-to-function variable. */
poplevel (1, 0, 1); poplevel (1, 0, 1);
if (TREE_CODE (fndecl) != ERROR_MARK)
{
BLOCK_SUPERCONTEXT (DECL_INITIAL (fndecl)) = fndecl; BLOCK_SUPERCONTEXT (DECL_INITIAL (fndecl)) = fndecl;
/* Must mark the RESULT_DECL as being in this function. */ /* Must mark the RESULT_DECL as being in this function. */
...@@ -14231,6 +14238,7 @@ finish_function (int nested) ...@@ -14231,6 +14238,7 @@ finish_function (int nested)
/* Run the optimizers and output the assembler code for this function. */ /* Run the optimizers and output the assembler code for this function. */
rest_of_compilation (fndecl); rest_of_compilation (fndecl);
}
/* Free all the tree nodes making up this function. */ /* Free all the tree nodes making up this function. */
/* Switch back to allocating nodes permanently until we start another /* Switch back to allocating nodes permanently until we start another
...@@ -14238,7 +14246,7 @@ finish_function (int nested) ...@@ -14238,7 +14246,7 @@ finish_function (int nested)
if (!nested) if (!nested)
permanent_allocation (1); permanent_allocation (1);
if (DECL_SAVED_INSNS (fndecl) == 0 && !nested) if (DECL_SAVED_INSNS (fndecl) == 0 && !nested && (TREE_CODE (fndecl) != ERROR_MARK))
{ {
/* Stop pointing to the local nodes about to be freed. */ /* Stop pointing to the local nodes about to be freed. */
/* But DECL_INITIAL must remain nonzero so we know this was an actual /* But DECL_INITIAL must remain nonzero so we know this was an actual
...@@ -14276,6 +14284,8 @@ lang_printable_name (tree decl, int v) ...@@ -14276,6 +14284,8 @@ lang_printable_name (tree decl, int v)
switch (v) switch (v)
{ {
default: default:
if (TREE_CODE (decl) == ERROR_MARK)
return "erroneous code";
return IDENTIFIER_POINTER (DECL_NAME (decl)); return IDENTIFIER_POINTER (DECL_NAME (decl));
} }
} }
...@@ -14288,16 +14298,23 @@ void ...@@ -14288,16 +14298,23 @@ void
lang_print_error_function (file) lang_print_error_function (file)
char *file; char *file;
{ {
static ffeglobal last_g = NULL;
static ffesymbol last_s = NULL; static ffesymbol last_s = NULL;
ffeglobal g;
ffesymbol s; ffesymbol s;
char *kind; char *kind;
if (ffecom_primary_entry_ == NULL) if ((ffecom_primary_entry_ == NULL)
|| (ffesymbol_global (ffecom_primary_entry_) == NULL))
{ {
g = NULL;
s = NULL; s = NULL;
kind = NULL; kind = NULL;
} }
else if (ffecom_nested_entry_ == NULL) else
{
g = ffesymbol_global (ffecom_primary_entry_);
if (ffecom_nested_entry_ == NULL)
{ {
s = ffecom_primary_entry_; s = ffecom_primary_entry_;
switch (ffesymbol_kind (s)) switch (ffesymbol_kind (s))
...@@ -14328,8 +14345,9 @@ lang_print_error_function (file) ...@@ -14328,8 +14345,9 @@ lang_print_error_function (file)
s = ffecom_nested_entry_; s = ffecom_nested_entry_;
kind = "statement function"; kind = "statement function";
} }
}
if (last_s != s) if ((last_g != g) || (last_s != s))
{ {
if (file) if (file)
fprintf (stderr, "%s: ", file); fprintf (stderr, "%s: ", file);
...@@ -14343,6 +14361,7 @@ lang_print_error_function (file) ...@@ -14343,6 +14361,7 @@ lang_print_error_function (file)
fprintf (stderr, "In %s `%s':\n", kind, name); fprintf (stderr, "In %s `%s':\n", kind, name);
} }
last_g = g;
last_s = s; last_s = s;
} }
} }
...@@ -14615,6 +14634,10 @@ start_function (tree name, tree type, int nested, int public) ...@@ -14615,6 +14634,10 @@ start_function (tree name, tree type, int nested, int public)
assert (current_function_decl == NULL_TREE); assert (current_function_decl == NULL_TREE);
} }
if (TREE_CODE (type) == ERROR_MARK)
decl1 = current_function_decl = error_mark_node;
else
{
decl1 = build_decl (FUNCTION_DECL, decl1 = build_decl (FUNCTION_DECL,
name, name,
type); type);
...@@ -14634,23 +14657,28 @@ start_function (tree name, tree type, int nested, int public) ...@@ -14634,23 +14657,28 @@ start_function (tree name, tree type, int nested, int public)
a decl for this name, and it is a FUNCTION_DECL, use the old decl. */ a decl for this name, and it is a FUNCTION_DECL, use the old decl. */
current_function_decl = pushdecl (decl1); current_function_decl = pushdecl (decl1);
}
if (!nested) if (!nested)
ffecom_outer_function_decl_ = current_function_decl; ffecom_outer_function_decl_ = current_function_decl;
pushlevel (0); pushlevel (0);
if (TREE_CODE (current_function_decl) != ERROR_MARK)
{
make_function_rtl (current_function_decl); make_function_rtl (current_function_decl);
restype = TREE_TYPE (TREE_TYPE (current_function_decl)); restype = TREE_TYPE (TREE_TYPE (current_function_decl));
DECL_RESULT (current_function_decl) DECL_RESULT (current_function_decl)
= build_decl (RESULT_DECL, NULL_TREE, restype); = build_decl (RESULT_DECL, NULL_TREE, restype);
}
if (!nested) if (!nested)
/* Allocate further tree nodes temporarily during compilation of this /* Allocate further tree nodes temporarily during compilation of this
function only. */ function only. */
temporary_allocation (); temporary_allocation ();
if (!nested) if (!nested && (TREE_CODE (current_function_decl) != ERROR_MARK))
TREE_ADDRESSABLE (current_function_decl) = 1; TREE_ADDRESSABLE (current_function_decl) = 1;
immediate_size_expand = old_immediate_size_expand; immediate_size_expand = old_immediate_size_expand;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
@c The text of this file appears in the file INSTALL @c The text of this file appears in the file INSTALL
@c in the G77 distribution, as well as in the G77 manual. @c in the G77 distribution, as well as in the G77 manual.
@c 1997-09-09 @c 1997-12-23
Note most of this information is out of date and superceded by the EGCS Note most of this information is out of date and superceded by the EGCS
install procedures. It is provided for historical reference only. install procedures. It is provided for historical reference only.
...@@ -66,9 +66,9 @@ most systems, if desired. ...@@ -66,9 +66,9 @@ most systems, if desired.
======= =======
The version of GNU @code{gzip} used to package this release The version of GNU @code{gzip} used to package this release
is 1.24. is 1.2.4.
(The version of GNU @code{tar} used to package this release (The version of GNU @code{tar} used to package this release
is 1.11.2.) is 1.12.)
@item @file{gcc-2.7.2.3.tar.gz} @item @file{gcc-2.7.2.3.tar.gz}
You need to have this, or some other applicable, version You need to have this, or some other applicable, version
...@@ -202,7 +202,7 @@ In any case, you can apply patches by hand---patch files ...@@ -202,7 +202,7 @@ In any case, you can apply patches by hand---patch files
are designed for humans to read them. are designed for humans to read them.
The version of GNU @code{patch} used to develop this release The version of GNU @code{patch} used to develop this release
is 2.4. is 2.5.
@item @code{make} @item @code{make}
Your system must have @code{make}, and you will probably save Your system must have @code{make}, and you will probably save
...@@ -210,7 +210,7 @@ yourself a lot of trouble if it is GNU @code{make} (sometimes ...@@ -210,7 +210,7 @@ yourself a lot of trouble if it is GNU @code{make} (sometimes
referred to as @code{gmake}). referred to as @code{gmake}).
The version of GNU @code{make} used to develop this release The version of GNU @code{make} used to develop this release
is 3.73. is 3.76.1.
@item @code{cc} @item @code{cc}
Your system must have a working C compiler. Your system must have a working C compiler.
......
...@@ -51,7 +51,7 @@ struct _malloc_root_ malloc_root_ ...@@ -51,7 +51,7 @@ struct _malloc_root_ malloc_root_
(mallocArea_) &malloc_root_.malloc_pool_image_.first, (mallocArea_) &malloc_root_.malloc_pool_image_.first,
0, 0,
#if MALLOC_DEBUG #if MALLOC_DEBUG
0, 0, 0, 0, 0, 0, 0, '/' 0, 0, 0, 0, 0, 0, 0, { '/' }
#endif #endif
}, },
}; };
......
...@@ -1792,9 +1792,11 @@ ffesta_ffebad_2t (ffebad errnum, ffelexToken t1, ffelexToken t2) ...@@ -1792,9 +1792,11 @@ ffesta_ffebad_2t (ffebad errnum, ffelexToken t1, ffelexToken t2)
} }
} }
/* ffesta_set_outpooldisp -- Set disposition of statement output pool ffestaPooldisp
ffesta_outpooldisp ()
ffesta_set_outpooldisp(FFESTA_pooldispPRESERVE); */ {
return ffesta_outpooldisp_;
}
void void
ffesta_set_outpooldisp (ffestaPooldisp d) ffesta_set_outpooldisp (ffestaPooldisp d)
......
...@@ -98,6 +98,7 @@ void ffesta_ffebad_2st (ffebad msg, char *s, ffelexToken t1, ffelexToken t2); ...@@ -98,6 +98,7 @@ void ffesta_ffebad_2st (ffebad msg, char *s, ffelexToken t1, ffelexToken t2);
void ffesta_ffebad_2t (ffebad msg, ffelexToken t1, ffelexToken t2); void ffesta_ffebad_2t (ffebad msg, ffelexToken t1, ffelexToken t2);
ffelexHandler ffesta_zero (ffelexToken t); ffelexHandler ffesta_zero (ffelexToken t);
ffelexHandler ffesta_two (ffelexToken first, ffelexToken second); ffelexHandler ffesta_two (ffelexToken first, ffelexToken second);
ffestaPooldisp ffesta_outpooldisp (void);
void ffesta_set_outpooldisp (ffestaPooldisp d); void ffesta_set_outpooldisp (ffestaPooldisp d);
/* Define macros. */ /* Define macros. */
......
...@@ -5,6 +5,10 @@ Tue Dec 23 22:56:01 1997 Craig Burley <burley@gnu.org> ...@@ -5,6 +5,10 @@ Tue Dec 23 22:56:01 1997 Craig Burley <burley@gnu.org>
handler on 64-bit systems like Alphas. handler on 64-bit systems like Alphas.
* f2cext.c (signal_): Changed accordingly. * f2cext.c (signal_): Changed accordingly.
Wed Oct 29 01:01:04 1997 Mumit Khan <khan@brahma.xraylith.wisc.edu>
* configure.in: Set CC to CC_FOR_TARGET when cross-compiling.
Tue Sep 30 00:41:39 1997 Craig Burley <burley@gnu.ai.mit.edu> Tue Sep 30 00:41:39 1997 Craig Burley <burley@gnu.ai.mit.edu>
Do a better job of printing the offending FORMAT string Do a better job of printing the offending FORMAT string
......
...@@ -23,15 +23,20 @@ AC_INIT(libF77/Version.c) ...@@ -23,15 +23,20 @@ AC_INIT(libF77/Version.c)
AC_REVISION(1.10) AC_REVISION(1.10)
dnl Checks for programs.
# For g77 we'll set CC to point at the built gcc, but this will get it into
# the makefiles
AC_PROG_CC
dnl AC_C_CROSS dnl AC_C_CROSS
dnl Gives misleading `(cached)' message from the check. dnl Gives misleading `(cached)' message from the check.
if test "$CROSS";then if test "$CROSS";then
if test "$CC_FOR_TARGET"; then
CC="$CC_FOR_TARGET"
else
CC="../../xgcc -B../../xgcc/"
fi
ac_cv_c_cross=yes ac_cv_c_cross=yes
else else
dnl Checks for programs.
# For g77 we'll set CC to point at the built gcc, but this will get it into
# the makefiles
AC_PROG_CC
ac_cv_c_cross=no ac_cv_c_cross=no
fi fi
......
...@@ -75,9 +75,12 @@ f_exit(void) ...@@ -75,9 +75,12 @@ f_exit(void)
static cllist xx; static cllist xx;
if (! (f__init & 1)) if (! (f__init & 1))
return; /* Not initialized, so no open units. */ return; /* Not initialized, so no open units. */
/* no more I/O to be done. If this is not done, then if the /* I/O no longer in progress. If, during an I/O operation (such
program is interrupted during I/O, f_clos thinks, incorrectly, as waiting for the user to enter a line), there is an
that there is an I/O recursion. */ interrupt (such as ^C to stop the program on a UNIX system),
f_exit() is called, but there is no longer any I/O in
progress. Without turning off this flag, f_clos() would
think that there is an I/O recursion in this circumstance. */
f__init &= ~2; f__init &= ~2;
if (!xx.cerr) { if (!xx.cerr) {
xx.cerr=1; xx.cerr=1;
......
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