We should compile with the upstream default flags. The main change is using -O3 instead of -O2. For most applications, -O2 yields better performance anyway because excessive inlining tends to increase cache pressure. This change should happen after Fedora 27 has branched, just to be on the safe side.
This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle. Changing version to '27'.