This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/42336] [c++0x] ICE with pointer-to-member-function decltype argument in template function
- From: "jason at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Dec 2009 21:54:03 -0000
- Subject: [Bug c++/42336] [c++0x] ICE with pointer-to-member-function decltype argument in template function
- References: <bug-42336-17896@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from jason at gcc dot gnu dot org 2009-12-15 21:54 -------
The problem here is that after we're done parsing the translation unit, we do
IPA optimizations, and IPA decides to change the type of X::func from a
METHOD_TYPE to a FUNCTION_TYPE.
Then later we're emitting debug information about b<X>, and ask the compiler
for that name. So we try to substitute X into decltype(&T::func) to see if the
argument we have is the same as the default argument. But at this point
T::func resolves to a function with FUNCTION_TYPE, whereas we were expecting
one with METHOD_TYPE, and boom.
I suppose we can't do any tsubsting after IPA runs.
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-12-15 21:54:02
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42336