This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
gcc patch to fix -fsyntax-only (again)
- To: law at cygnus dot com
- Subject: gcc patch to fix -fsyntax-only (again)
- From: Craig Burley <burley at gnu dot org>
- Date: Sat, 11 Jul 1998 19:43:56 -0400 (EDT)
- Cc: egcs-patches at cygnus dot com
(Jeff Law, could you install this patch for me please, after reviewing
it for sanity?)
This patch fixes a crash that recently showed up when using g77
to compile an old test case with `-W -Wall -fsyntax-only'. Just
happened to be that old garbage finally was ugly enough to cause
a segv, I guess. The bug was introduced by myself in an earlier
patch to make -fsyntax-only not crash in other situations.
tq vm, (burley)
Sat Jul 11 19:13:25 1998 Craig Burley <burley@gnu.org>
* stmt.c (expand_expr_stmt): If not assigning fresh
value to last_expr_value, zero it, so old garbage
doesn't get dereferenced.
*** g77-e/gcc/stmt.c.~1~ Mon Jul 6 06:42:42 1998
--- g77-e/gcc/stmt.c Sat Jul 11 19:09:01 1998
*************** expand_expr_stmt (exp)
*** 1534,1538 ****
last_expr_type = TREE_TYPE (exp);
! if (! flag_syntax_only || expr_stmts_for_value)
last_expr_value = expand_expr (exp,
(expr_stmts_for_value
--- 1534,1540 ----
last_expr_type = TREE_TYPE (exp);
! if (flag_syntax_only && ! expr_stmts_for_value)
! last_expr_value = 0;
! else
last_expr_value = expand_expr (exp,
(expr_stmts_for_value