Bug 1331329

Summary: g++ crashes on my variable template. "internal compiler error: in instantiate_decl, at cp/pt.c:20294"
Product: [Fedora] Fedora Reporter: Jacek Galowicz <jacek>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 23CC: davejohansen, jakub, jwakely, law, mpolacek
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-28 14:27:17 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:
Attachments:
Description Flags
The preprocessed source which g++ stored in my temp folder asking me to provide it in this bug report none

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.