Bug 1947683

Summary: Compiler crash when using arrays of C-style complex numbers consisting of two or more elements using cppunit
Product: Red Hat Developer Toolset Reporter: Andrew Mike <amike>
Component: gccAssignee: Marek Polacek <mpolacek>
Status: CLOSED ERRATA QA Contact: Martin Cermak <mcermak>
Severity: high Docs Contact:
Priority: high    
Version: DTS 10.0 RHEL 7CC: ahajkova, alanm, brclark, casantos, jakub, jwright, mbliss, mcermak, mkolbas, mnewsome, ohudlick, sipoyare
Target Milestone: alphaKeywords: Bugfix, Triaged
Target Release: 9.1   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: devtoolset-10-gcc-10.2.1-11.1.el7 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-06-07 07:28:48 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
Test reproduction package
none
Preprocessed compiler output post-crash from test package none

Description Andrew Mike 2021-04-08 21:30:26 UTC
Description of problem: When using arrays of C-style complex numbers consisting of two or more elements using cppunit, g++ crashes with a compiler error.

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

How reproducible: 100%

Steps to Reproduce:
1. Install devtoolset-10 package.
2. Unzip test package to directory.
3. Run "./build.sh 10".

Actual results: Compiler crashes with the following error:

during GIMPLE pass: cddce
example-fail.cpp: In member function ‘CppUnit::TestFixture* CppUnit::ConcretTestFixtureFactory<TestFixtureType>::makeFixture() [with TestFixtureType = example_suite]’:
example-fail.cpp:12:47: internal compiler error: in propagate_necessity, at tree-ssa-dce.c:1046
   12 | CPPUNIT_TEST_SUITE_REGISTRATION(example_suite);
      | 

Expected results: Compilation succeeds.


Additional info:
- This has been present since DTS 6, but is absent in mainline gcc and gcc in DTS 4.

Comment 2 Andrew Mike 2021-04-08 21:32:20 UTC
Created attachment 1770460 [details]
Test reproduction package

Comment 3 Andrew Mike 2021-04-08 21:35:21 UTC
Created attachment 1770461 [details]
Preprocessed compiler output post-crash from test package

Comment 4 Marek Polacek 2021-04-08 21:50:51 UTC
This is https://gcc.gnu.org/PR8353 which was already fixed upstream.  It is also included in devtoolset-10-gcc-10.2.1-11.1.el7.

Comment 6 Marek Polacek 2021-04-08 22:24:46 UTC
(In reply to Marek Polacek from comment #4)
> This is https://gcc.gnu.org/PR8353 which was already fixed upstream.  It is
> also included in devtoolset-10-gcc-10.2.1-11.1.el7.

I meant https://gcc.gnu.org/PR98353

Comment 11 errata-xmlrpc 2021-06-07 07:28:48 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 (devtoolset-10-gcc bug fix update), 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-2021:2219

Comment 12 Red Hat Bugzilla 2023-09-15 01:04:51 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days