[Bug tree-optimization/103089] -Wmaybe-uninitialized -O2 false positive

2021-11-04 Thread xantares09 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103089 xantares09 at hotmail dot com changed: What|Removed |Added Resolution|--- |INVALID Stat

[Bug tree-optimization/103089] -Wmaybe-uninitialized -O2 false positive

2021-11-04 Thread xantares09 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103089 --- Comment #2 from xantares09 at hotmail dot com --- indeed, I assumed both were positive, I guess there's no bug then

[Bug tree-optimization/103089] -Wmaybe-uninitialized -O2 false positive

2021-11-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103089 --- Comment #1 from Andrew Pinski --- If I add: if (n <= 0 || m <= 0) __builtin_unreachable(); before the malloc, I get no warning. I think the warning is correct if either n or m is negative.