https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66198
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |5.4
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Works for me with GCC 5.4.0 from ubuntu and on the trunk so closing as fixed.
apinski@apinski-ss1:~/src/local1$ gcc -O2 -w test.c -fprofile-generate -o
tmp1
apinski@apinski-ss1:~/src/local1$ result_1=`./tmp1`
apinski@apinski-ss1:~/src/local1$ gcc -w -O2 -fbranch-probabilities
-fprofile-use -lm test.c -o tmp2
apinski@apinski-ss1:~/src/local1$ result_2=`./tmp2`
apinski@apinski-ss1:~/src/local1$ echo $result_1
checksum = 27A37B17
apinski@apinski-ss1:~/src/local1$ echo $result_2
checksum = 27A37B17