Bug 62302 - [5 Regression] Change in the comdat used for constructors
Summary: [5 Regression] Change in the comdat used for constructors
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 5.0
: P1 normal
Target Milestone: 5.0
Assignee: Jason Merrill
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-29 03:28 UTC by Rafael Avila de Espindola
Modified: 2014-08-31 21:07 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2014-08-29 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Avila de Espindola 2014-08-29 03:28:19 UTC
It looks like an unintended consequence of r211434 wast that given

template <typename T> struct foo { foo(); };
template <typename T> foo<T>::foo() {}
template class foo<int>;

gcc now prints

.section	.text._ZN3fooIiEC2Ev,"axG",@progbits,_ZN3fooIiEC2Ev,comdat

before it did

.section	.text._ZN3fooIiEC2Ev,"axG",@progbits,_ZN3fooIiEC5Ev,comdat

Note the change in comdat.
Comment 1 Jason Merrill 2014-08-31 21:06:39 UTC
Author: jason
Date: Sun Aug 31 21:06:08 2014
New Revision: 214770

URL: https://gcc.gnu.org/viewcvs?rev=214770&root=gcc&view=rev
Log:
	PR c++/62302
	* optimize.c (cdtor_comdat_group): Just look at the
	DECL_ASSEMBLER_NAME of the 'tors.

Added:
    trunk/gcc/testsuite/g++.dg/abi/comdat1.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/optimize.c
Comment 2 Jason Merrill 2014-08-31 21:07:23 UTC
Fixed.