Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1067902

Summary: A couple of P1 GCC bugfixes
Product: Red Hat Enterprise Linux 7 Reporter: Jakub Jelinek <jakub>
Component: gccAssignee: Marek Polacek <mpolacek>
Status: CLOSED CURRENTRELEASE QA Contact: qe-baseos-tools-bugs
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: dprokopo, lmiksik, mcermak, mnewsome, mpolacek
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: gcc-4.8.2-16.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 09:37:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
gcc-fixes.patch none

Description Jakub Jelinek 2014-02-21 10:28:41 UTC
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.

Comment 1 Jakub Jelinek 2014-02-21 11:45:05 UTC
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

Comment 3 Marek Polacek 2014-02-24 10:41:02 UTC
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.

Comment 4 Marek Polacek 2014-02-24 17:15:36 UTC
Should be fixed in gcc-4.8.2-15.el7.

Comment 13 Dagmar Prokopová 2014-03-06 23:29:38 UTC
Looks fine now. Thanks for the fix. Verified for gcc-4.8.2-16.el7.

Comment 14 Ludek Smid 2014-06-13 09:37:26 UTC
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.