* [Bug c++/47488] [4.4,4.5,4.6 Regression] (sizeof|decltype) + template + string literals: ICE in write_template_arg_literal, at cp/mangle.c
2011-01-27 11:04 [Bug c++/47488] New: [C++0x] decltype + template + string literals: ICE in write_template_arg_literal, at cp/mangle.c flast at flast dot jp
@ 2011-01-27 11:11 ` redi at gcc dot gnu.org
2011-01-27 11:23 ` redi at gcc dot gnu.org
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: redi at gcc dot gnu.org @ 2011-01-27 11:11 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47488
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011.01.27 10:56:51
Summary|[C++0x] decltype + template |[4.4,4.5,4.6 Regression]
|+ string literals: ICE in |(sizeof|decltype) +
|write_template_arg_literal, |template + string literals:
|at cp/mangle.c |ICE in
| |write_template_arg_literal,
| |at cp/mangle.c
Ever Confirmed|0 |1
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-01-27 10:56:52 UTC ---
This c++98 variation using sizeof instead of decltype gives an ICE in the same
place:
template < typename T >
int f( const T &, const char * );
template<int> struct N { };
template < typename T >
N<sizeof( f( T(), "" ) )> g( const T &t );
void h()
{
g( 0 );
}
This is a regression since 4.1 which doesn't ICE:
testcase.cpp: In function 'void h()':
testcase.cpp:11: sorry, unimplemented: call_expr cannot be mangled due to a
defect in the C++ ABI
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/47488] [4.4,4.5,4.6 Regression] (sizeof|decltype) + template + string literals: ICE in write_template_arg_literal, at cp/mangle.c
2011-01-27 11:04 [Bug c++/47488] New: [C++0x] decltype + template + string literals: ICE in write_template_arg_literal, at cp/mangle.c flast at flast dot jp
2011-01-27 11:11 ` [Bug c++/47488] [4.4,4.5,4.6 Regression] (sizeof|decltype) " redi at gcc dot gnu.org
@ 2011-01-27 11:23 ` redi at gcc dot gnu.org
2011-01-27 20:25 ` hjl.tools at gmail dot com
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: redi at gcc dot gnu.org @ 2011-01-27 11:23 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47488
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-01-27 11:09:50 UTC ---
For this variation where f<T> is not deduced, 4.4 says "sorry, unimplemented"
but doesn't ICE, 4.5 and 4.6 ICE in the same place:
template < typename T >
int f( const char * );
template<int> struct N { };
template < typename T >
N<sizeof( f<T>( "" ) )> g( const T &t );
void h()
{
g( 0 );
}
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/47488] [4.4,4.5,4.6 Regression] (sizeof|decltype) + template + string literals: ICE in write_template_arg_literal, at cp/mangle.c
2011-01-27 11:04 [Bug c++/47488] New: [C++0x] decltype + template + string literals: ICE in write_template_arg_literal, at cp/mangle.c flast at flast dot jp
2011-01-27 11:11 ` [Bug c++/47488] [4.4,4.5,4.6 Regression] (sizeof|decltype) " redi at gcc dot gnu.org
2011-01-27 11:23 ` redi at gcc dot gnu.org
@ 2011-01-27 20:25 ` hjl.tools at gmail dot com
2011-01-27 20:27 ` hjl.tools at gmail dot com
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: hjl.tools at gmail dot com @ 2011-01-27 20:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47488
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at redhat dot com
--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> 2011-01-27 20:17:06 UTC ---
(In reply to comment #2)
> For this variation where f<T> is not deduced, 4.4 says "sorry, unimplemented"
> but doesn't ICE, 4.5 and 4.6 ICE in the same place:
>
> template < typename T >
> int f( const char * );
>
> template<int> struct N { };
>
> template < typename T >
> N<sizeof( f<T>( "" ) )> g( const T &t );
>
> void h()
> {
> g( 0 );
> }
It is caused by revision 140120:
http://gcc.gnu.org/ml/gcc-cvs/2008-09/msg00279.html
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/47488] [4.4,4.5,4.6 Regression] (sizeof|decltype) + template + string literals: ICE in write_template_arg_literal, at cp/mangle.c
2011-01-27 11:04 [Bug c++/47488] New: [C++0x] decltype + template + string literals: ICE in write_template_arg_literal, at cp/mangle.c flast at flast dot jp
` (2 preceding siblings ...)
2011-01-27 20:25 ` hjl.tools at gmail dot com
@ 2011-01-27 20:27 ` hjl.tools at gmail dot com
2011-02-08 15:21 ` [Bug c++/47488] [4.4/4.5/4.6 " rguenth at gcc dot gnu.org
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: hjl.tools at gmail dot com @ 2011-01-27 20:27 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47488
--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> 2011-01-27 20:19:23 UTC ---
(In reply to comment #1)
> This c++98 variation using sizeof instead of decltype gives an ICE in the same
> place:
>
> template < typename T >
> int f( const T &, const char * );
>
> template<int> struct N { };
>
> template < typename T >
> N<sizeof( f( T(), "" ) )> g( const T &t );
>
> void h()
> {
> g( 0 );
> }
>
>
It is also caused by revision 140120:
http://gcc.gnu.org/ml/gcc-cvs/2008-09/msg00279.html
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/47488] [4.4/4.5/4.6 Regression] (sizeof|decltype) + template + string literals: ICE in write_template_arg_literal, at cp/mangle.c
2011-01-27 11:04 [Bug c++/47488] New: [C++0x] decltype + template + string literals: ICE in write_template_arg_literal, at cp/mangle.c flast at flast dot jp
` (3 preceding siblings ...)
2011-01-27 20:27 ` hjl.tools at gmail dot com
@ 2011-02-08 15:21 ` rguenth at gcc dot gnu.org
2011-02-22 9:51 ` jakub at gcc dot gnu.org
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-02-08 15:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47488
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.4.6
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/47488] [4.4/4.5/4.6 Regression] (sizeof|decltype) + template + string literals: ICE in write_template_arg_literal, at cp/mangle.c
2011-01-27 11:04 [Bug c++/47488] New: [C++0x] decltype + template + string literals: ICE in write_template_arg_literal, at cp/mangle.c flast at flast dot jp
` (4 preceding siblings ...)
2011-02-08 15:21 ` [Bug c++/47488] [4.4/4.5/4.6 " rguenth at gcc dot gnu.org
@ 2011-02-22 9:51 ` jakub at gcc dot gnu.org
2011-03-08 16:05 ` jason at gcc dot gnu.org
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-02-22 9:51 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47488
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/47488] [4.4/4.5/4.6 Regression] (sizeof|decltype) + template + string literals: ICE in write_template_arg_literal, at cp/mangle.c
2011-01-27 11:04 [Bug c++/47488] New: [C++0x] decltype + template + string literals: ICE in write_template_arg_literal, at cp/mangle.c flast at flast dot jp
` (5 preceding siblings ...)
2011-02-22 9:51 ` jakub at gcc dot gnu.org
@ 2011-03-08 16:05 ` jason at gcc dot gnu.org
2011-03-08 17:06 ` jason at gcc dot gnu.org
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jason at gcc dot gnu.org @ 2011-03-08 16:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47488
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
CC| |jason at gcc dot gnu.org
AssignedTo|unassigned at gcc dot |jason at gcc dot gnu.org
|gnu.org |
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/47488] [4.4/4.5/4.6 Regression] (sizeof|decltype) + template + string literals: ICE in write_template_arg_literal, at cp/mangle.c
2011-01-27 11:04 [Bug c++/47488] New: [C++0x] decltype + template + string literals: ICE in write_template_arg_literal, at cp/mangle.c flast at flast dot jp
` (6 preceding siblings ...)
2011-03-08 16:05 ` jason at gcc dot gnu.org
@ 2011-03-08 17:06 ` jason at gcc dot gnu.org
2011-03-08 17:31 ` [Bug c++/47488] sorry, unimplemented: string literal in function template signature jason at gcc dot gnu.org
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jason at gcc dot gnu.org @ 2011-03-08 17:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47488
--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> 2011-03-08 17:06:20 UTC ---
So, the basic problem is that we still don't know how to mangle string
constants, it just changed from a sorry to an ICE. There was a mangling
proposed on the ABI list, but while looking at it I realized that it isn't
sufficient--it produces a multiply defined symbol for
template <typename T> constexpr T f(const T* p) { return p[0]; }
template<int> struct N { };
template <typename T> void g(T, N<f((const T*)"1")>) { }
template <typename T> void g(T, N<f((const T*)"2")>) { }
int main()
{
g('1', N<'1'>());
g('2', N<'2'>());
}
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/47488] sorry, unimplemented: string literal in function template signature
2011-01-27 11:04 [Bug c++/47488] New: [C++0x] decltype + template + string literals: ICE in write_template_arg_literal, at cp/mangle.c flast at flast dot jp
` (7 preceding siblings ...)
2011-03-08 17:06 ` jason at gcc dot gnu.org
@ 2011-03-08 17:31 ` jason at gcc dot gnu.org
2011-03-08 17:32 ` [Bug c++/47488] [4.4/4.5/4.6 Regression] (sizeof|decltype) + template + string literals: ICE in write_template_arg_literal, at cp/mangle.c jason at gcc dot gnu.org
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jason at gcc dot gnu.org @ 2011-03-08 17:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47488
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|ice-on-valid-code |ABI, rejects-valid
Priority|P2 |P3
Version|4.4.4 |4.6.0
Target Milestone|4.4.6 |4.6.0
Summary|[4.4/4.5/4.6 Regression] |sorry, unimplemented:
|(sizeof|decltype) + |string literal in function
|template + string literals: |template signature
|ICE in |
|write_template_arg_literal, |
|at cp/mangle.c |
--- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> 2011-03-08 17:31:11 UTC ---
I've checked in a patch to restore the sorry, but we still need to implement a
mangling.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/47488] [4.4/4.5/4.6 Regression] (sizeof|decltype) + template + string literals: ICE in write_template_arg_literal, at cp/mangle.c
2011-01-27 11:04 [Bug c++/47488] New: [C++0x] decltype + template + string literals: ICE in write_template_arg_literal, at cp/mangle.c flast at flast dot jp
` (8 preceding siblings ...)
2011-03-08 17:31 ` [Bug c++/47488] sorry, unimplemented: string literal in function template signature jason at gcc dot gnu.org
@ 2011-03-08 17:32 ` jason at gcc dot gnu.org
2011-03-08 17:39 ` [Bug c++/47488] sorry, unimplemented: string literal in function template signature jason at gcc dot gnu.org
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jason at gcc dot gnu.org @ 2011-03-08 17:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47488
--- Comment #6 from Jason Merrill <jason at gcc dot gnu.org> 2011-03-08 17:30:54 UTC ---
Author: jason
Date: Tue Mar 8 17:30:46 2011
New Revision: 170783
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170783
Log:
PR c++/47488
* mangle.c (write_template_arg_literal) [STRING_CST]: Sorry.
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/mangle.c
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/47488] sorry, unimplemented: string literal in function template signature
2011-01-27 11:04 [Bug c++/47488] New: [C++0x] decltype + template + string literals: ICE in write_template_arg_literal, at cp/mangle.c flast at flast dot jp
` (9 preceding siblings ...)
2011-03-08 17:32 ` [Bug c++/47488] [4.4/4.5/4.6 Regression] (sizeof|decltype) + template + string literals: ICE in write_template_arg_literal, at cp/mangle.c jason at gcc dot gnu.org
@ 2011-03-08 17:39 ` jason at gcc dot gnu.org
2011-03-08 17:40 ` jason at gcc dot gnu.org
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jason at gcc dot gnu.org @ 2011-03-08 17:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47488
--- Comment #8 from Jason Merrill <jason at gcc dot gnu.org> 2011-03-08 17:39:16 UTC ---
Author: jason
Date: Tue Mar 8 17:39:10 2011
New Revision: 170785
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170785
Log:
PR c++/47488
* mangle.c (write_template_arg_literal) [STRING_CST]: Sorry.
Modified:
branches/gcc-4_4-branch/gcc/cp/ChangeLog
branches/gcc-4_4-branch/gcc/cp/mangle.c
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/47488] sorry, unimplemented: string literal in function template signature
2011-01-27 11:04 [Bug c++/47488] New: [C++0x] decltype + template + string literals: ICE in write_template_arg_literal, at cp/mangle.c flast at flast dot jp
` (10 preceding siblings ...)
2011-03-08 17:39 ` [Bug c++/47488] sorry, unimplemented: string literal in function template signature jason at gcc dot gnu.org
@ 2011-03-08 17:40 ` jason at gcc dot gnu.org
2011-03-25 19:59 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jason at gcc dot gnu.org @ 2011-03-08 17:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47488
--- Comment #9 from Jason Merrill <jason at gcc dot gnu.org> 2011-03-08 17:40:33 UTC ---
Author: jason
Date: Tue Mar 8 17:40:27 2011
New Revision: 170786
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170786
Log:
PR c++/47488
* mangle.c (write_template_arg_literal) [STRING_CST]: Sorry.
Modified:
branches/gcc-4_5-branch/gcc/cp/ChangeLog
branches/gcc-4_5-branch/gcc/cp/mangle.c
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/47488] sorry, unimplemented: string literal in function template signature
2011-01-27 11:04 [Bug c++/47488] New: [C++0x] decltype + template + string literals: ICE in write_template_arg_literal, at cp/mangle.c flast at flast dot jp
` (11 preceding siblings ...)
2011-03-08 17:40 ` jason at gcc dot gnu.org
@ 2011-03-25 19:59 ` jakub at gcc dot gnu.org
2011-04-28 15:59 ` rguenth at gcc dot gnu.org
2013-11-05 22:04 ` jewillco at osl dot iu.edu
14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-03-25 19:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47488
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.6.0 |4.6.1
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-03-25 19:52:12 UTC ---
GCC 4.6.0 is being released, adjusting target milestone.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/47488] sorry, unimplemented: string literal in function template signature
2011-01-27 11:04 [Bug c++/47488] New: [C++0x] decltype + template + string literals: ICE in write_template_arg_literal, at cp/mangle.c flast at flast dot jp
` (12 preceding siblings ...)
2011-03-25 19:59 ` jakub at gcc dot gnu.org
@ 2011-04-28 15:59 ` rguenth at gcc dot gnu.org
2013-11-05 22:04 ` jewillco at osl dot iu.edu
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-04-28 15:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47488
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.6.1 |---
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/47488] sorry, unimplemented: string literal in function template signature
2011-01-27 11:04 [Bug c++/47488] New: [C++0x] decltype + template + string literals: ICE in write_template_arg_literal, at cp/mangle.c flast at flast dot jp
` (13 preceding siblings ...)
2011-04-28 15:59 ` rguenth at gcc dot gnu.org
@ 2013-11-05 22:04 ` jewillco at osl dot iu.edu
14 siblings, 0 replies; 16+ messages in thread
From: jewillco at osl dot iu.edu @ 2013-11-05 22:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47488
Jeremiah Willcock <jewillco at osl dot iu.edu> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jewillco at osl dot iu.edu
--- Comment #11 from Jeremiah Willcock <jewillco at osl dot iu.edu> ---
This problem still exists as of GCC 4.9.0 snapshot 20131013, with the same test
case failing.
^ permalink raw reply [flat|nested] 16+ messages in thread