public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/42336]  New: [c++0x] ICE with pointer-to-member-function decltype argument in template function
@ 2009-12-08 22:48 aaz at althenia dot net
  2009-12-09  9:53 ` [Bug c++/42336] " paolo dot carlini at oracle dot com
                   ` (28 more replies)
  0 siblings, 29 replies; 30+ messages in thread
From: aaz at althenia dot net @ 2009-12-08 22:48 UTC (permalink / raw)
  To: gcc-bugs

The following reduced program produces an ICE when compiled with
-std=c++0x -O2 -g.

=====================================================
struct X {
  void func() {}
};

template<typename T, typename U = decltype(&T::func)>
void b(T) {}

int main() {
  b(X()); /* line 9 */
  X().func();

  return 0;
}
=====================================================

1.cc: In function 'void b(T) [with T = X, U = void (X::*)()]':
1.cc:9:9: internal compiler error: in build_ptrmem_type, at cp/decl.c:7202


And the following variation produces a different ICE.

===================================================
struct X {
  void func() {}
};

template<typename T, typename = decltype(&T::func)>
struct A {};

template<typename T>
void b(T) {}

int main() {
  b(A<X>());
  X().func();

  return 0;
}
===================================================

Internal compiler error: Error reporting routines re-entered.


-- 
           Summary: [c++0x] ICE with pointer-to-member-function decltype
                    argument in template function
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: aaz at althenia dot net
 GCC build triplet: x86_64-portbld-freebsd8.0
  GCC host triplet: x86_64-portbld-freebsd8.0
GCC target triplet: x86_64-portbld-freebsd8.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42336


^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2010-02-22 13:18 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-08 22:48 [Bug c++/42336] New: [c++0x] ICE with pointer-to-member-function decltype argument in template function aaz at althenia dot net
2009-12-09  9:53 ` [Bug c++/42336] " paolo dot carlini at oracle dot com
2009-12-10  0:08 ` aaz at althenia dot net
2009-12-15  1:47 ` jason at gcc dot gnu dot org
2009-12-15  9:22 ` paolo dot carlini at oracle dot com
2009-12-15 11:29 ` paolo dot carlini at oracle dot com
2009-12-15 11:48 ` dodji at seketeli dot org
2009-12-15 20:04 ` jason at gcc dot gnu dot org
2009-12-15 21:54 ` jason at gcc dot gnu dot org
2009-12-15 22:25 ` [Bug c++/42336] ICE with pointer-to-member-function " jason at gcc dot gnu dot org
2009-12-21 23:06 ` [Bug c++/42336] [4.5 Regression] " reichelt at gcc dot gnu dot org
2010-01-02 16:01 ` rguenth at gcc dot gnu dot org
2010-01-07 18:16 ` jamborm at gcc dot gnu dot org
2010-01-07 21:18 ` jason at gcc dot gnu dot org
2010-01-08 12:54 ` rguenth at gcc dot gnu dot org
2010-01-08 13:23 ` jamborm at gcc dot gnu dot org
2010-01-10 22:51 ` hubicka at gcc dot gnu dot org
2010-01-10 22:56 ` rguenth at gcc dot gnu dot org
2010-01-10 23:42 ` hubicka at gcc dot gnu dot org
2010-01-12 19:46 ` jason at redhat dot com
2010-01-19 10:27 ` rguenth at gcc dot gnu dot org
2010-01-19 10:28 ` [Bug c++/42336] [4.5 Regression] ICE with pointer-to-member-function argument in template function with -fipa-sra rguenth at gcc dot gnu dot org
2010-01-19 20:10 ` jason at gcc dot gnu dot org
2010-01-20 18:59 ` rguenth at gcc dot gnu dot org
2010-01-29 14:31 ` dodji at gcc dot gnu dot org
2010-01-29 15:49 ` dodji at seketeli dot org
2010-02-03  0:02 ` jason at gcc dot gnu dot org
2010-02-07  4:49 ` hjl at gcc dot gnu dot org
2010-02-09  9:46 ` jamborm at gcc dot gnu dot org
2010-02-22 13:18 ` rguenth at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).