[Bug 1837522] Re: GCC Miscompilation of vector shift

Dimitri John Ledkov launchpad at surgut.co.uk
Wed Oct 23 13:43:56 UTC 2019


I've updated lots of series tasks and statuses.
Probably best viewed on launchpad https://bugs.launchpad.net/ubuntu/+source/gcc-8/+bug/1837522

Summary:

gcc-7 & gcc-8 are fixed in Eoan and Focal

Disco will go end of life soon, and is marked as Won't Fix, as there is
not enough time to complete toolchain SRU prior to its End of Life.

Bionic update is in progress, with test rebuild results being analyzed.
However, gcc 7.5 was recently announced for November. We are evaluating
doing two gcc-7 SRUs with current results, and then later with 7.5. Or
we might postpone currently inflight gcc-7 SRU and include this fix with
the gcc 7.5 targetting security pocket.

** Also affects: gcc-5 (Ubuntu Disco)
   Importance: Undecided
       Status: New

** Also affects: gcc-6 (Ubuntu Disco)
   Importance: Undecided
       Status: New

** Also affects: gcc-7 (Ubuntu Disco)
   Importance: Undecided
       Status: New

** Also affects: gcc-8 (Ubuntu Disco)
   Importance: Undecided
       Status: New

** Also affects: gcc-5 (Ubuntu Bionic)
   Importance: Undecided
       Status: New

** Also affects: gcc-6 (Ubuntu Bionic)
   Importance: Undecided
       Status: New

** Also affects: gcc-7 (Ubuntu Bionic)
   Importance: Undecided
       Status: New

** Also affects: gcc-8 (Ubuntu Bionic)
   Importance: Undecided
       Status: New

** No longer affects: gcc-5 (Ubuntu Bionic)

** No longer affects: gcc-5 (Ubuntu Disco)

** No longer affects: gcc-6 (Ubuntu Bionic)

** No longer affects: gcc-6 (Ubuntu Disco)

** Changed in: gcc-7 (Ubuntu)
       Status: Triaged => Fix Released

** Changed in: gcc-7 (Ubuntu Disco)
       Status: New => Won't Fix

** Changed in: gcc-7 (Ubuntu Bionic)
       Status: New => Triaged

** Changed in: gcc-8 (Ubuntu)
       Status: Triaged => Fix Released

** Changed in: gcc-8 (Ubuntu Disco)
       Status: New => Won't Fix

** Changed in: gcc-8 (Ubuntu Bionic)
       Status: New => Triaged

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-7 in Ubuntu.
https://bugs.launchpad.net/bugs/1837522

Title:
  GCC Miscompilation of vector shift

Status in Ubuntu on IBM z Systems:
  In Progress
Status in gcc-5 package in Ubuntu:
  Invalid
Status in gcc-6 package in Ubuntu:
  Won't Fix
Status in gcc-7 package in Ubuntu:
  Fix Released
Status in gcc-8 package in Ubuntu:
  Fix Released
Status in gcc-7 source package in Bionic:
  Triaged
Status in gcc-8 source package in Bionic:
  Triaged
Status in gcc-7 source package in Disco:
  Won't Fix
Status in gcc-8 source package in Disco:
  Won't Fix

Bug description:
  Vector shift miscompilation
   
  ---Steps to Reproduce---
     t.c:
  __vector int
  foo (__vector int a, int s)
  {
    return a << (s + 3);
  }

  gcc -O3 -march=z13 t.c -S -mzvector

  foo:
          veslf   %v24,%v24,0(%r2)   <---- +3 is omitted
          br      %r14
   
  Contact Information = andreas.krebbel at de.ibm.com 
   
  Userspace tool common name: GCC 
   
  The userspace tool has the following bit modes: 64 

  Backported fix has been applied to GCC 8 branch as r273493:

  https://gcc.gnu.org/viewcvs?rev=273493&root=gcc&view=rev

  S/390: Fix vector shift count operand

  We currently use subst definitions to handle the different variants of shift
  count operands. Unfortunately, in the vector shift pattern the shift count
  operand is used directly. Without it being adjusted for the 'subst' variants the
  displacement value is omitted resulting in a wrong shift count being applied.

  This patch needs to be applied to older branches as well.

  gcc/ChangeLog:

  2019-07-15  Andreas Krebbel  <krebbel at linux.ibm.com>

  Backport from mainline
  2019-07-01  Andreas Krebbel  <krebbel at linux.ibm.com>

  * config/s390/vector.md: Fix shift count operand printing.

  gcc/testsuite/ChangeLog:

  2019-07-15  Andreas Krebbel  <krebbel at linux.ibm.com>

  Backport from mainline
  2019-07-01  Andreas Krebbel  <krebbel at linux.ibm.com>

  * gcc.target/s390/vector/vec-shift-2.c: New test.

  Added:
  branches/gcc-8-branch/gcc/testsuite/gcc.target/s390/vector/vec-shift-2.c
  Modified:
  branches/gcc-8-branch/gcc/ChangeLog
  branches/gcc-8-branch/gcc/config/s390/vector.md
  branches/gcc-8-branch/gcc/testsuite/ChangeLog

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-z-systems/+bug/1837522/+subscriptions



More information about the foundations-bugs mailing list