This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
problem in put_var_into_stack
- To: gcc at gcc dot gnu dot org
- Subject: problem in put_var_into_stack
- From: Herman ten Brugge <Haj dot Ten dot Brugge at net dot HCC dot nl>
- Date: Wed, 5 Jan 2000 21:32:35 +0000 (WET)
Hello,
I found a problem in put_var_into_stack. The code at the start of
this routine checks for a decl being a SAVE_EXPR. So I asume it is
correct to call put_var_into_stack with a SAVE_EXPR.
A check is made for DECL_NONLOCAL with this decl. This is only
legal when decl is a decl node. SAVE_EXPR is an expr node. So this
must be wrong. There are also other calls like DECL_INITIAL and
gen_mem_addressof which also expect a decl node and not an expr node.
I did not get any core dumps or wrong code yet because it is very
rare that put_var_into_stack is called with a SAVE_EXPR. Currently
I only get these when I enable the bounds-checking patches. The
bounds-checking patches generate a lot of address off code which
trigger SAVE_EXPR to be generated more often.
Herman.