--- Comment #1 from pinskia at gcc dot gnu dot org 2010-09-17 20:25 ---
Reduced testcase:
struct Region {
int storage[4];
int count;
};
static inline Region subtract(int lhs)
{
Region reg;
int* storage = reg.storage;
if (lhs 0)
storage++;
reg.count = storage -
--- Comment #2 from pinskia at gcc dot gnu dot org 2010-09-17 20:35 ---
Not what is happening is an interaction between the inlining and the return
slot optimization and the named value optimization.
Before inlining we have:
# storage_1 = PHI retval.storage[0](2),
--- Comment #3 from hjl dot tools at gmail dot com 2010-09-17 22:02 ---
It was introduced between revision 127644 and 127649.
--
hjl dot tools at gmail dot com changed:
What|Removed |Added
--- Comment #4 from hjl dot tools at gmail dot com 2010-09-17 22:17 ---
Revision 127647:
http://gcc.gnu.org/ml/gcc-cvs/2007-08/msg00541.html
introduced:
[...@gnu-26 gcc]$ ./xgcc -B./ -S -O ../../../pr45709.cc
../../../pr45709.cc: In member function virtual void foo::bar():