https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122273
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|pinskia at gcc dot gnu.org |unassigned at gcc dot
gnu.org
Status|ASSIGNED |NEW
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Oh this is because of restrict.
That is this also exposes the issue:
```
#include <new>
struct s1
{
bool t;
void set(bool tt) __restrict { t = tt;}
};
s1 *f(s1 *a, bool b)
{
if (b)
{
a = new(a) s1;
a->set(1);
}
else
{
a = new(a) s1;
a->set(0);
}
return a;
}
```
Someone who better understands aliasing should fix this. Because I have no idea
what is the correct appoarch here.