https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63595

--- Comment #5 from Pat Haugen <pthaugen at gcc dot gnu.org> ---
Created attachment 33796
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33796&action=edit
preprocessed source from 254.gap

CPU2000 benchmark 254.gap started miscomparing with r216305 also. Attaching
preprocessed source as another example that gets miscompiled. Compile options
used 'gcc -m64 -O2 -mcpu=power7'. In this example, function 'FunOnRight' gets
redirected to 'FunOnLeft' (after initial test where the two functions have
differing error strings). But the last stmt in the functions which compute the
return value are not equivalent and therefor shouldn't be commoned.

>From list.i:

FunOnRight()
    ...
    hdRes = ((*TabProd[(((long)(hdPnt) & 1) ? 1 :
((hdPnt)->type))][(((long)(hdElm) & 1) ? 1 :
((hdElm)->type))])((hdPnt),(hdElm)));


FunOnLeft()
    ...
    hdRes = ((*TabProd[(((long)(hdElm) & 1) ? 1 :
((hdElm)->type))][(((long)(hdPnt) & 1) ? 1 :
((hdPnt)->type))])((hdElm),(hdPnt)));


Note the swapping of 'hdPnt' and 'hdElm' references.

Reply via email to