Hide Forgot
Created attachment 500766 [details] Test case Description of problem: When the attached file is compiled with -ftree-vrp enabled, either manually or via -O2 or higher, the generated code produces incorrect results. Version-Release number of selected component (if applicable): gcc-4.6.0-7.fc15.x86_64 How reproducible: Every time. Steps to Reproduce: 1. Compile code with "cc -Wall -O3 -o fail fail.c" 2. Run "./fail 3", "./fail 4" and "./fail 6" 3. Compile code with "cc -Wall -O3 -fno-tree-vrp -o fail fail.c" 4. Run "./fail 3", "./fail 4" and "./fail 6" again 5. Compare results Actual results: for ./fail 3 - g i j k m for ./fail 4 - g i j k m for ./fail 6 - d g h i j k m Expected results: for ./fail 3 - g h j k m for ./fail 4 - g i j k m for ./fail 6 - d g h i j k m Additional info: This appears to go wrong in gcc 4.4.4 (from F12), 4.5.1 (from F14) and 4.6.0 (from F15) but not in 4.3.0 (from F9).
Tracking this upstream as http://gcc.gnu.org/PR49161.