https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78812
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2016-12-15
Target Milestone|--- |5.5
Summary|Wrong code generation due |[5/6/7 Regression] Wrong
|to hoisting memory load |code generation due to
|across function call |hoisting memory load across
| |function call
Ever confirmed|0 |1
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
But in the end it actually is a regression that started r166555 (previously it
has been latent).
Slightly adjusted testcase:
struct T
{
bool a;
T () : a (false) {}
~T () { if (!a) __builtin_abort (); }
};
__attribute__((noinline))
void
test (T &x)
{
x.a = true;
}
int
main ()
{
T T;
test (T);
}