[Bug rtl-optimization/39081] missed optimization: un-needed copy of structure.
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Feb 6 01:35:00 GMT 2009
------- Comment #2 from pinskia at gcc dot gnu dot org 2009-02-06 01:35 -------
> tv = my_tv_maker(434.23); // over-write previous tv.
This needs to have a space for the return value as tv can be accessed via
my_tv_maker as the address of it was passed to an extern function.
Think of:
extern TV *a1;
TV my_tv_maker(float tr)
{
TV myTV;
myTV. confidence = tr;
use (a1-> confidence);
return myTV;
}
void other(TV *a)
{
a1 = a;
}
So this bug is invalid as tv in my_subr can be exported for use in my_tv_maker.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39081
More information about the Gcc-bugs
mailing list