https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96722
Bug ID: 96722
Summary: [8/9/10/11 Regression] Clobbers on NULL since r8-1519
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Keywords: needs-bisection, needs-reduction
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: jakub at gcc dot gnu.org
CC: jakub at gcc dot gnu.org, slyfox at gcc dot gnu.org,
unassigned at gcc dot gnu.org, webrown.cpp at gmail dot com
Depends on: 96717
Blocks: 96721
Target Milestone: ---
+++ This bug was initially created as a clone of Bug #96717 +++
struct S { int s; ~S () {} };
void
foo (S *a)
{
if (a)
return;
a->~S ();
}
int
main ()
{
S s;
foo (&s);
}
is miscompiled, since r249450 aka
r8-1519-ge59a1c22fb249388e82b4fd004f33615abe36d2e at -O2.
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96717
[Bug 96717] -flifetime-dse=2 breaks webkit-gtk-2.28.4
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96721
[Bug 96721] [11 Regression] pseudo-destructor calls on pointers since r11-2238