https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77321
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot
gnu.org
Target Milestone|--- |7.0
--- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
All right, I'm going to commit the patch with this testcase instead (it's the
original testcase, I just removed #includes and added prototypes.
extern "C" void *memset (void *, int, __SIZE_TYPE__);
extern "C" void *malloc(__SIZE_TYPE__);
struct S {
char *a;
};
template <typename T>
void Test(T & Obj) {
auto && a(Obj.a);
a = (char*)::malloc(1024 * 1024);
::memset(a + 28, 'X', 6);
}
int main()
{
S d;
Test(d);
return 0;
}