This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

problem in put_var_into_stack


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]