Created attachment 865908 [details] gcc-fixes.patch As gcc needs to be rebuilt for RHEL7 anyway to fix up #1067398, I'd like to backport selected non-risky severe bug fixes from upstream gcc-4_8-branch (no rebase at this point anymore). The bugs are: - fix vector permutation handling on i?86/x86_64 (PR target/57896) this bug is a silent GCC internal state corruptor, so can result in wrong-code, or ice-on-valid-code, plus there is an ice-on-valid bugfix in there too for -mavx2. Has been extensively tested, very low risk - fix __atomic_compare_exchange_* not to store into *expected on success (PR c++/60272) this is a silent wrong-code issue, valid code can be racy because of that - fix -march=native on VMs where saving/restoring of YMM state is not supported, yet CPU supports f16c (PR driver/60233) on some VM/CPU combinations this can result in -march=native compiled code not being possible to run on that VM - fix reference handling during instantiation (PR c++/60274) a high priority C++ regression since earlier GCC 4.8.x releases I'm attaching a patch as a diff against git, which includes the 4 individual patches backported from 5 upstream gcc-4_8-branch commits, plus spec file change to apply those patches.
The last PR includes testcase into gcc testsuite, the rest: 1) PR57896 can be tested by grabbing the http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57896#c6 or http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57896#c0 tests and trying them out Also, the ICE with V8SFmode/-mavx2 can be verified with make -C check-gcc RUNTESTFLAGS='--target_board=unix/-mavx2 dg.exp=*vshuf*' on Haswell capable HW (on older HW all one can verify is that the compiler doesn't crash, but all the tests will have (obvious) execution failures) 2) PR60272 needs to be verified by looking at the generated assembly, we haven't figured out any sensible automatic test 3) PR60233 just sanity check, or if you manage to get a VM with YMM state not saved, but F16C, XOP or FMA4 ISA available, try the testcase from the PR
Actually, "fix reference handling during instantiation (PR c++/60274)" seems to be introduced by PR59606 fix, but that fix was never applied to RH 4.8 branch, so there's nothing to revert. I think I'll just add the testcase.
Should be fixed in gcc-4.8.2-15.el7.
Looks fine now. Thanks for the fix. Verified for gcc-4.8.2-16.el7.
This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request.