This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Q's about use of is_gimple_reg_rhs/is_gimple_tmp_var
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: dnovillo at redhat dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 16 Aug 04 08:15:05 EDT
- Subject: Re: Q's about use of is_gimple_reg_rhs/is_gimple_tmp_var
V = foo();
If the call to foo does throw, the semantics of throw imply that the
assignment to V must not execute. That's why we expand this to:
tmp = foo ();
V = tmp;
Standards are "as if". If there is no other assignment to V, then
there's no way to detect if the assignment occurred or not since V's
value if it did not occur is undefined.
Therefore, the temporary need not be done if that is the only
assignment to V, which, I think is the only relevant condition. If V
is a temporary made just for this purpose, that condition is true, but
it might be in other cases as well.