Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1321399

Summary: GCC, C++ template instantion failure
Product: Red Hat Enterprise Linux 7 Reporter: Johnny <cajibi>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED WONTFIX QA Contact: qe-baseos-tools-bugs
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 7.4CC: mpolacek, ohudlick
Target Milestone: rc   
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-05-17 15:16:34 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
The g++ preprocess output. none

Description Johnny 2016-03-26 09:02:51 UTC
Created attachment 1140541 [details]
The g++ preprocess output.

Description of problem:
When compile a C++11 program, the G++ 4.8.2 failed at a template instantiation.

Helper.hpp: In instantiation of 'struct Caller<int (*)(int), std::tuple<MyAnyType&>&, std::tuple<int>&, 1ul>':
Helper.hpp:102:130:   required from 'auto Wrapper2(FuncT, Args& ...) [with FuncT = int (*)(int); Args = {MyAnyType}]'
speed.cpp:38:41:   required from here
Helper.hpp:73:8: internal compiler error: in gen_type_die_with_usage, at dwarf2out.c:19499
 struct Caller<FuncT, ParamTuple, CallTypes, 1> 
        ^
Please submit a full bug report,


Version-Release number of selected component (if applicable):
g++ 4.8.2

How reproducible:
g++ -g -std=c++11 -o speed speed.cpp Client.o 

Steps to Reproduce:
1.
2.
3.

Actual results:
Compile failure

Expected results:


Additional info:
Attached the preprocess file

Comment 2 Marek Polacek 2016-03-29 13:11:38 UTC
This was fixed in http://gcc.gnu.org/r198099 or in http://gcc.gnu.org/r198098.  The former doesn't seem to be backportable.

Comment 3 Marek Polacek 2016-03-29 13:19:10 UTC
Verified that this still fails with r198098.  In any case, this seems like ICE-on-invalid, thus I'm afraid low priority.

Comment 4 Johnny 2016-03-29 15:02:48 UTC
Hi Marek

Thanks for you prompt response.
Actually, when I remove the -g flag, the compilation works. So I doubt the corruption was caused by the debug symbol generation.

Any idea?

Regards,
Johnny

Comment 5 Jakub Jelinek 2016-05-17 14:40:53 UTC
> Actually, when I remove the -g flag, the compilation works. So I doubt the
> corruption was caused by the debug symbol generation.

That is of course a sing that it is very much related to debug info generation.

Anyway, you are trying to compile C++14 source by a compiler which has almost no C++14 support (and all it has is experimental), and use -std=c++11, the internal error is only during error recovery from this.  Better use a Developer Toolset compiler that has full C++14 support.

Comment 6 RHEL Program Management 2016-05-17 15:16:34 UTC
Development Management has reviewed and declined this request.
You may appeal this decision by reopening this request.