Bug 46903 - [4.6 Regression][C++0x] ICE unexpected expression of kind template_id_expr
Summary: [4.6 Regression][C++0x] ICE unexpected expression of kind template_id_expr
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.6.0
: P1 normal
Target Milestone: 4.6.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
: 47020 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-12-12 12:26 UTC by Rubidium
Modified: 2011-01-14 23:55 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2010-12-12 12:33:44


Attachments
Test case, compile with C++0x. (93 bytes, application/octet-stream)
2010-12-12 12:26 UTC, Rubidium
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rubidium 2010-12-12 12:26:51 UTC
Created attachment 22723 [details]
Test case, compile with C++0x.

The attached test case fails with an ICE:
test.ii:6:18: internal compiler error: unexpected expression ‘CreateA<A>’ of kind template_id_expr

Using: g++-trunk -std=gnu++0x test.ii
With g++-trunk (GCC) 4.6.0 20101211 (experimental) (revision 167723)

It compiles fine with gcc 4.5.1, 4.4.5 and 4.3.5.
Comment 1 Paolo Carlini 2010-12-12 12:33:44 UTC
Looks like a regression.
Comment 2 Jason Merrill 2011-01-13 00:45:59 UTC
Mine.
Comment 3 Jason Merrill 2011-01-14 13:08:16 UTC
Author: jason
Date: Fri Jan 14 13:08:11 2011
New Revision: 168783

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168783
Log:
	PR c++/46903
	* typeck2.c (check_narrowing): Only check arithmetic types.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-regress1.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/typeck2.c
    trunk/gcc/testsuite/ChangeLog
Comment 4 Paolo Carlini 2011-01-14 13:33:54 UTC
Fixed.
Comment 5 Jason Merrill 2011-01-14 23:55:12 UTC
*** Bug 47020 has been marked as a duplicate of this bug. ***