This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/42336] [c++0x] ICE with pointer-to-member-function decltype argument in template function



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]