Bug 1570308 - gcc-c++ compiler crash, templated code, "emit_move_insn, at expr.c:3698"
Summary: gcc-c++ compiler crash, templated code, "emit_move_insn, at expr.c:3698"
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 27
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1744244
TreeView+ depends on / blocked
 
Reported: 2018-04-21 20:20 UTC by tesch1
Modified: 2019-08-21 15:41 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1744244 (view as bug list)
Environment:
Last Closed: 2018-08-10 13:27:52 UTC


Attachments (Terms of Use)
Preprocessed source stored into /tmp/ccViQ3Fm.out file, please attach this to your bugreport. (1.98 MB, text/x-csrc)
2018-04-21 20:20 UTC, tesch1
no flags Details


Links
System ID Priority Status Summary Last Updated
GNU Compiler Collection 85496 None None None 2019-07-08 16:14:26 UTC

Description tesch1 2018-04-21 20:20:53 UTC
Created attachment 1425097 [details]
Preprocessed source stored into /tmp/ccViQ3Fm.out file, please attach this to your bugreport.

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

Comment 1 Marek Polacek 2018-04-22 16:39:40 UTC
Started with http://gcc.gnu.org/r244249.

Comment 2 Marek Polacek 2018-08-10 13:27:52 UTC
Fixed in 8.0.1-0.22.

Comment 3 Marek Polacek 2018-08-10 13:28:18 UTC
And fixed for GCC 7 too.

Comment 4 tesch1 2018-08-10 17:14:30 UTC
Nice!  Thanks!


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