Bug 1331329 - g++ crashes on my variable template. "internal compiler error: in instantiate_decl, at cp/pt.c:20294"
Summary: g++ crashes on my variable template. "internal compiler error: in instantiate...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 23
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-28 10:17 UTC by Jacek Galowicz
Modified: 2016-04-28 14:27 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-28 14:27:17 UTC
Type: Bug


Attachments (Terms of Use)
The preprocessed source which g++ stored in my temp folder asking me to provide it in this bug report (1.79 KB, text/plain)
2016-04-28 10:17 UTC, Jacek Galowicz
no flags Details

Description Jacek Galowicz 2016-04-28 10:17:36 UTC
Created attachment 1151795 [details]
The preprocessed source which g++ stored in my temp folder asking me to provide it in this bug report

Description of problem:
g++ 3.5 crashes on my code


Version-Release number of selected component (if applicable):
g++ (GCC) 5.3.1 20151207 (Red Hat 5.3.1-2)

How reproducible:
Just compile my reduced example code.

Steps to Reproduce:
1. g++ main.cpp -std=c++14

Actual results:
jacek.galowicz ~ $ g++ main.cpp -std=c++14
main.cpp: In instantiation of ‘constexpr const bool a::foo<int*>’:
main.cpp:13:29:   required from here
main.cpp:8:29: internal compiler error: in instantiate_decl, at cp/pt.c:20294
 static const constexpr bool foo {ab::foo<T>};
                             ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/ccKPovGO.out file, please attach this to your bugreport.

Expected results:
I expected the code to compile without errors.

Additional info:
Full preprocessed source is attached.

Comment 1 Marek Polacek 2016-04-28 10:32:22 UTC
I can't reproduce with gcc-c++-5.3.1-6.fc23.x86_64.  Can you please update your g++ and try again?

Comment 2 Jacek Galowicz 2016-04-28 14:21:53 UTC
I can confirm that this is not happening on a machine with gcc-c++-5.3.1-6.fc23.x86_64.

Comment 3 Marek Polacek 2016-04-28 14:27:17 UTC
Thanks, closing then.


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