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

Bug 1744244

Summary: gcc-c++ compiler crash, templated code, "emit_move_insn, at expr.c:3698"
Product: Red Hat Developer Toolset Reporter: Marek Polacek <mpolacek>
Component: gccAssignee: Marek Polacek <mpolacek>
Status: CLOSED ERRATA QA Contact: Alexandra Petlanová Hájková <ahajkova>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: DTS 7.1 RHEL 7CC: ahajkova, aoliva, davejohansen, dmalcolm, extras-qa, fweimer, jakub, jwakely, law, mcermak, mnewsome, mpolacek, msebor, nickc, ohudlick, tborcin, tesch1
Target Milestone: alpha   
Target Release: 9.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: devtoolset-7-gcc-7.3.1-5.16.el6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1570308 Environment:
Last Closed: 2019-09-11 01:35:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1570308    
Bug Blocks:    

Description Marek Polacek 2019-08-21 15:41:02 UTC
+++ This bug was initially created as a clone of Bug #1570308 +++

Description of problem:
gcc-c++ crashes on compilation of templated test code.

Version-Release number of selected component (if applicable):
$ /usr/bin/c++ --version
c++ (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)

How reproducible:

every time.

Steps to Reproduce:

1. try to compile a test program (see attachment)
2. crash.
3.

Actual results:

internal compiler error: in emit_move_insn, at expr.c:3698
   temp.rpart() = pow(xx.rpart(), aa);
   ^~~~
Please submit a full bug report,
with preprocessed source if appropriate.


Expected results:

working compiled program.

Additional info:

The original source is here: https://github.com/tesch1/cxxduals crash is in compiling test2.cpp
This is on latest up-to-date fedora 27.  Let me know if you need any other info.

Google finds this: https://gcc.gnu.org/ml/gcc/2017-01/msg00211.html

--- Additional comment from Marek Polacek on 2018-04-22 16:39:40 UTC ---

Started with http://gcc.gnu.org/r244249.

--- Additional comment from Marek Polacek on 2018-08-10 13:27:52 UTC ---

Fixed in 8.0.1-0.22.

--- Additional comment from Marek Polacek on 2018-08-10 13:28:18 UTC ---

And fixed for GCC 7 too.

--- Additional comment from  on 2018-08-10 17:14:30 UTC ---

Nice!  Thanks!

Comment 2 Marek Polacek 2019-08-21 15:42:31 UTC
We already have a build with this fixed.

Comment 6 errata-xmlrpc 2019-09-11 01:35:33 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:2727