https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97151
Richard Biener changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97151
--- Comment #9 from CVS Commits ---
The master branch has been updated by Richard Biener :
https://gcc.gnu.org/g:9e64f17d044767248175fece80a2759d94c45fc4
commit r11-3386-g9e64f17d044767248175fece80a2759d94c45fc4
Author: Richard Biener
Date:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97151
--- Comment #8 from Jonathan Wakely ---
(In reply to Richard Biener from comment #7)
> (IIRC there's
> only ever a single argument to operator delete).
That's not always true. See -fsized-deallocation
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97151
Richard Biener changed:
What|Removed |Added
CC||rguenth at gcc dot gnu.org
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97151
--- Comment #6 from Richard Biener ---
(In reply to Marat Radchenko from comment #4)
> (In reply to Martin Liška from comment #3)
> > It's caused by what was mentioned as 2) which transforms to:
> >
> > _6 = operator new [] (40);
> > __built
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97151
--- Comment #5 from Jonathan Wakely ---
Yes, operator new[](40) cannot return null, and passing null to memset is
undefined, so we could assume it is never called with null.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97151
--- Comment #4 from Marat Radchenko ---
(In reply to Martin Liška from comment #3)
> It's caused by what was mentioned as 2) which transforms to:
>
> _6 = operator new [] (40);
> __builtin_memset (_6, 0, 40);
> operator delete [] (_6);
>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97151
--- Comment #3 from Martin Liška ---
It's caused by what was mentioned as 2) which transforms to:
_6 = operator new [] (40);
__builtin_memset (_6, 0, 40);
operator delete [] (_6);
So there's a use of _6 and we probably can't remove it as
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97151
Richard Biener changed:
What|Removed |Added
CC||marxin at gcc dot gnu.org
Key
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97151
--- Comment #1 from Marat Radchenko ---
Another program that exhibits the same behavior:
int main()
{
int *a = new int[10];
a[0] = 0;
delete[] a;
return 0;
}
10 matches
Mail list logo