Bug 1067902 - A couple of P1 GCC bugfixes
Summary: A couple of P1 GCC bugfixes
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: gcc
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Marek Polacek
QA Contact: qe-baseos-tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-21 10:28 UTC by Jakub Jelinek
Modified: 2014-06-18 01:16 UTC (History)
5 users (show)

Fixed In Version: gcc-4.8.2-16.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 09:37:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
gcc-fixes.patch (10.68 KB, patch)
2014-02-21 10:28 UTC, Jakub Jelinek
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 57896 0 None None None Never
GNU Compiler Collection 60233 0 None None None Never
GNU Compiler Collection 60272 0 None None None Never
GNU Compiler Collection 60274 0 None None None Never

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.


Note You need to log in before you can comment on or make changes to this bug.