------- 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 - reg.storage;
return reg;
}
void bar(int a)
{
const Region copyBack(subtract(a));
}
---- CUT ---
Comes from inlining.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hubicka at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2010-09-17 20:25:35
date| |
Target Milestone|--- |4.3.6
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45709