This is the mail archive of the
mailing list for the GCC project.
Patch: Internal Error Using -O2
- To: egcs-patches at cygnus dot com
- Subject: Patch: Internal Error Using -O2
- From: Dave Brolley <brolley at cygnus dot com>
- Date: Fri, 05 Feb 1999 17:27:59 -0500
- Organization: Cygnus Solutions Canada Ltd
The attached patch fixes an internal compiler error which can occur
when using -O2.
The problem occurs (in this case) when the compiler realizes that a
C++ reference argument can't
live in a register and must be stored on the stack. At that time it
changes its location from REG to MEM and calls fixup_var_refs to fixup
all the insns which reference that location. In this case one such
insn was in the sequence associated with a C++ catch clause.
fixup_var_refs did not contain code to scan through the catch clauses,
so the insn was not fixed and was subsequently not recognized later.
RCS file: /cvs/cvsfiles/devo/gcc/function.c,v
retrieving revision 1.189
diff -c -p -c -p -r1.189 function.c
*** function.c 1999/01/29 20:51:10 1.189
--- function.c 1999/02/04 00:39:37
*************** fixup_var_refs (var, promoted_mode, unsi
*** 1646,1651 ****
--- 1646,1656 ----
+ /* Scan the catch clauses for exception handling too. */
+ push_to_sequence (catch_clauses);
+ fixup_var_refs_insns (var, promoted_mode, unsignedp, catch_clauses, 0);
+ end_sequence ();
/* REPLACEMENTS is a pointer to a list of the struct fixup_replacement and X is