------- Comment #17 from Kyle dot D dot Moffett at boeing dot com  2010-06-04 
17:24 -------
Created an attachment (id=20840)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20840&action=view)
Minimal test with -O1

I've managed to shrink this down to a 44-line testcase that fails with the
options listed below.  The code is the same but the failure mode is different; 
Specifically, I get this output:
|RESET: 252.000000 | 4294967296.000000
|RESET: 504.000000 | 4294967296.000000
|RESET: 756.000000 | 4294967296.000000
|RESET: 1008.000000 | 4294967296.000000
|RESET: 1260.000000 | 4294967296.000000
|RESET: 1512.000000 | 4294967296.000000
|RESET: 1764.000000 | 4294967296.000000
|RESET: 2016.000000 | 4294967296.000000
|RESET: 2268.000000 | 4294967296.000000
 => 2268.000000
|RESET: 2520.000000 | 4294967296.000000
|RESET: 2772.000000 | 4294967296.000000

>From the code, the second floating point value on each line should be equal to
the first float from the previous line.  If I change the first "(unsigned long
long)" cast to a "(long long)" cast, the bug goes away and I see the following
(correct) output:
|RESET: 252.000000 | 0.000000
|RESET: 504.000000 | 252.000000
|RESET: 756.000000 | 504.000000
|RESET: 1008.000000 | 756.000000
|RESET: 1260.000000 | 1008.000000
|RESET: 1512.000000 | 1260.000000
|RESET: 1764.000000 | 1512.000000
|RESET: 2016.000000 | 1764.000000
|RESET: 2268.000000 | 2016.000000
 => 2268.000000
|RESET: 2520.000000 | 2268.000000
|RESET: 2772.000000 | 2520.000000

The full list of compile options:
        -pipe \
        -g \
        -Wall \
        -fmove-loop-invariants \
        -fcaller-saves \
        --param max-aliased-vops=100 \
        --param avg-aliased-vops=1 \
        --param max-fields-for-field-sensitive=0 \
        --param loop-invariant-max-bbs-in-loop=1000 \
        -O \
        -fno-web \
        -fno-rename-registers \
        -fno-unroll-loops \
        -fno-peel-loops \
        -fno-split-ivs-in-unroller \
        -fno-peephole \
        -fno-dce \
        -fno-dse \
        -fno-unit-at-a-time \
        -fno-omit-frame-pointer \
        -fno-auto-inc-dec \
        -fno-cprop-registers \
        -fno-dce \
        -fno-defer-pop \
        -fno-delayed-branch \
        -fno-dse \
        -fno-guess-branch-probability \
        -fno-if-conversion2 \
        -fno-if-conversion \
        -fno-inline-small-functions \
        -fno-inline-functions-called-once \
        -fno-early-inlining \
        -fno-ipa-pure-const \
        -fno-ipa-reference \
        -fno-merge-constants \
        -fno-split-wide-types \
        -fno-tree-builtin-call-dce \
        -fno-tree-ccp \
        -fno-tree-ch \
        -fno-tree-copyrename \
        -fno-tree-dce \
        -fno-tree-dominator-opts \
        -fno-tree-dse \
        -fno-tree-fre \
        -fno-tree-sra \
        -fno-tree-ter \
        -fno-merge-constants \
        -fno-branch-count-reg \
        -fno-function-cse \
        -fno-thread-jumps \
        -fno-gcse \
        -fno-rerun-cse-after-loop \
        -fno-cse-skip-blocks \
        -fno-cse-follow-jumps


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44364

Reply via email to