Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1554030

Summary: g++ fails with: error: unrecognizable insn
Product: Red Hat Developer Toolset Reporter: Matt McCormick <matt.mccormick>
Component: gccAssignee: Marek Polacek <mpolacek>
Status: CLOSED ERRATA QA Contact: Michael Petlan <mpetlan>
Severity: medium Docs Contact:
Priority: unspecified    
Version: DTS 8.1 RHEL 7CC: jakub, kanderso, law, mcermak, mnewsome, ohudlick
Target Milestone: ---   
Target Release: 8.1   
Hardware: ppc64le   
OS: Linux   
Whiteboard:
Fixed In Version: devtoolset-8-gcc-8.2.1-7.el7 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-11 10:23:04 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
bz1554030.ii none

Description Matt McCormick 2018-03-10 20:39:09 UTC
Description of problem:

On a POWER8 system, g++ fails with this error:

ITK/Modules/Segmentation/KLMRegionGrowing/test/itkRegionGrow2DTest.cxx:1973:1: error: unrecognizable insn:
 } // End test_regiongrow3D()
 ^
(insn 4281 1410 4282 193 (set (reg:DI 10 10)
        (pre_inc:DI (reg:DI 30 30 [orig:237 ivtmp.11293 ] [237]))) ITK/Modules/Segmentation/KLMRegionGrowing/test/itkRegionGrow2DTest.cxx:1776 -1
     (nil))
ITK/Modules/Segmentation/KLMRegionGrowing/test/itkRegionGrow2DTest.cxx:1979:1: internal compiler error: in extract_insn, at recog.c:2154



Version-Release number of selected component (if applicable):

This is on CentOS 7.4 with the system compiler.

$ g++ --version
g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)
Copyright (C) 2015 Free Software Foundation, Inc.

Trying to build ITK, 4.13.0:

  https://github.com/InsightSoftwareConsortium/ITK



How reproducible:


Steps to Reproduce:
1. git clone https://github.com/InsightSoftwareConsortium/ITK && cd ITK && git checkout v4.13.0 && cd ..
2. mkdir ITK-build && cd ITK-build && cmake ../ITK
3. make


Actual results:

Compiler fails with internal error.


Expected results:

This builds with many other compilers and platforms.

Comment 2 Marek Polacek 2018-03-12 17:06:04 UTC
Created attachment 1407297 [details]
bz1554030.ii

Attaching the preprocessed source

Comment 4 Marek Polacek 2018-12-05 18:56:34 UTC
I'm moving this to DTS 8.1: this problem seems to be unfixable for RHEL 7.  The workaround for RHEL 7 is to compile the TU with -O.  This problem is fixed in DTS 8:

$ g++ --version
g++ (GCC) 8.2.1 20180905 (Red Hat 8.2.1-3)

$ g++ -c x.ii -O2
# no crash

Comment 6 Marek Polacek 2018-12-11 21:44:53 UTC
Since it's been fixed, dev_ack+ for inclusion in DTS 8.1.

Comment 10 Michael Petlan 2019-04-12 12:51:26 UTC
Reproduced with RHEL gcc on powerpc, DTS gcc works.
VERIFIED for devtoolset-8-gcc-8.3.1-3.el7.

Comment 12 errata-xmlrpc 2019-06-11 10:23:04 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:1446