[Bug tree-optimization/44547] -Wuninitialized reports false warning in nested switch statements (missed switch optimization)

2021-03-25 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44547 --- Comment #7 from CVS Commits --- The master branch has been updated by Martin Sebor : https://gcc.gnu.org/g:1b229a305091f0a9c64e5be3c1af5ef62b75e3cb commit r11-7839-g1b229a305091f0a9c64e5be3c1af5ef62b75e3cb Author: Martin Sebor Date: Thu

[Bug tree-optimization/44547] -Wuninitialized reports false warning in nested switch statements (missed switch optimization)

2021-03-25 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44547 Martin Sebor changed: What|Removed |Added Resolution|--- |FIXED CC|

[Bug tree-optimization/44547] -Wuninitialized reports false warning in nested switch statements (missed switch optimization)

2010-06-17 Thread manu at gcc dot gnu dot org
--- Comment #3 from manu at gcc dot gnu dot org 2010-06-17 07:18 --- You are right. The issue occurs in VRP but not because of the disjoint ranges. Pass vrp1 is able to optimize your first example (nested if) but not the second (nested switch). I think this is a missed optimization. Not

[Bug tree-optimization/44547] -Wuninitialized reports false warning in nested switch statements (missed switch optimization)

2010-06-17 Thread anthony dot penniston at hotmail dot com
--- Comment #4 from anthony dot penniston at hotmail dot com 2010-06-17 08:16 --- It seems that optimizing is what's causing the problem: the example compiles fine with -O0, but not -On=1. It also compiles fine when the case values are consecutive, which seems telling. My first guess

[Bug tree-optimization/44547] -Wuninitialized reports false warning in nested switch statements (missed switch optimization)

2010-06-17 Thread manu at gcc dot gnu dot org
--- Comment #5 from manu at gcc dot gnu dot org 2010-06-17 08:37 --- (In reply to comment #4) It seems that optimizing is what's causing the problem: the example compiles fine with -O0, but not -On=1. It also compiles fine when the case values are consecutive, which seems telling. My

[Bug tree-optimization/44547] -Wuninitialized reports false warning in nested switch statements

2010-06-16 Thread manu at gcc dot gnu dot org
--- Comment #1 from manu at gcc dot gnu dot org 2010-06-16 11:54 --- Value range-propagation (VRP) does not work on disjoint ranges, so the compiler does not actually know that argc can only be 1, 2 or 4. I think there is already a PR about this but I cannot find it right now. --

[Bug tree-optimization/44547] -Wuninitialized reports false warning in nested switch statements

2010-06-16 Thread anthony dot penniston at hotmail dot com
--- Comment #2 from anthony dot penniston at hotmail dot com 2010-06-17 01:14 --- (In reply to comment #1) Value range-propagation (VRP) does not work on disjoint ranges, so the compiler does not actually know that argc can only be 1, 2 or 4. I think there is already a PR about