[Bug tree-optimization/108667] Spurious "may be used uninitialized [-Wmaybe-uninitialized]" warning

2023-02-06 Thread alvaro.begue at gmail dot com via Gcc-bugs
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)

[Bug tree-optimization/108667] Spurious "may be used uninitialized [-Wmaybe-uninitialized]" warning

2023-02-05 Thread rguenth at gcc dot gnu.org via Gcc-bugs
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.

[Bug tree-optimization/108667] Spurious "may be used uninitialized [-Wmaybe-uninitialized]" warning

2023-02-03 Thread alvaro.begue at gmail dot com via Gcc-bugs
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

[Bug tree-optimization/108667] Spurious "may be used uninitialized [-Wmaybe-uninitialized]" warning

2023-02-03 Thread pinskia at gcc dot gnu.org via Gcc-bugs
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