Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: Dave.Poston at gs dot com
Target Milestone: ---
The code below only outputs 'Destructed' once:
Godbolt link: https://godbolt.org/z/Foy-vc
Bug appears to be present in all versi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92407
--- Comment #1 from Dave Poston ---
In fact, fill() isn't even needed.
Smaller repro:
https://godbolt.org/z/ubXl7Y
---
#include
struct MyStruct
{
MyStruct() {
std::cout << "Constructed" << std::endl;
}
~
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92407
--- Comment #4 from Dave Poston ---
Yep, also changing problem()/foo() to void and not returning the struct, works
properly