https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103843
Georgii.Shagov changed:
What|Removed |Added
Resolution|INVALID |FIXED
--- Comment #5 from Georgii.Shag
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103843
Georgii.Shagov changed:
What|Removed |Added
Resolution|INVALID |FIXED
--- Comment #3 from Georgii.Shag
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103843
--- Comment #1 from Georgii.Shagov ---
>From experiments, I would guess that in case of -O3 the call to destructor was
substituted by initializer:
This works fine:
cat ./d.cpp
#include
class S {
public:
S() : i{1} {}
~S() { i=0; }
v
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103843
Bug ID: 103843
Summary: Direct call to Desctructor is optimized out
Product: gcc
Version: 10.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c+