https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108667
--- Comment #4 from Alvaro Begue ---
Original code:
#include
#include
#include
template
class Signal {
public:
using Slot = std::function;
using FoldingFunction = std::function;
Signal(FoldingFunction fold, ReturnType initial)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108667
--- Comment #3 from Richard Biener ---
Yes, having the original code as well would be nice.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108667
--- Comment #2 from Alvaro Begue ---
Yes, this is a reduction of real code. I'm writing a signal class and I wrote a
small test for it. It worked fine when compiling unoptimized, but the optimized
version gave me this odd warning.
Would it be
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108667
--- Comment #1 from Andrew Pinski ---
This is partly caused by not inlining everything as main is marked as called
once.
If instead I call main, main1, the warning goes away and the following call is
inlined now:
std::_Function_handler