public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/50870] New: [C++0x] ICE with decltype, operator->, and default template arguments
@ 2011-10-25 19:16 daniel.kruegler at googlemail dot com
  2011-10-26 18:06 ` [Bug c++/50870] " paolo.carlini at oracle dot com
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: daniel.kruegler at googlemail dot com @ 2011-10-25 19:16 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 50870
           Summary: [C++0x] ICE with decltype, operator->, and default
                    template arguments
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: daniel.kruegler@googlemail.com
                CC: jason@redhat.com


This is a follow-up of bug 50864.

gcc 4.7.0 20111022 (experimental) with compiler option 

-std=c++0x -Wall

(with or without -pedantic) causes an ICE for the following code 

//---
struct impl {
  template <class T> static T create();
};

#define USE_CLASS

#ifdef USE_CLASS
template<class T, class U,
  class = decltype(impl::create<T>()->impl::create<U>()) // line 9
>
struct tester{};

tester<impl*, int> ti;
#else
template<class T, class U,
  class = decltype(impl::create<T>()->impl::create<U>()) // line 16
>
int test() { return 0; }

int i = test<impl*, int>();
#endif
//---

If USE_CLASS is defined:

"main.cpp|9|internal compiler error: Segmentation fault"

otherwise:

"main.cpp|16|internal compiler error: Segmentation fault"

Both code branches should be accepted.


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

end of thread, other threads:[~2011-11-08  1:12 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-25 19:16 [Bug c++/50870] New: [C++0x] ICE with decltype, operator->, and default template arguments daniel.kruegler at googlemail dot com
2011-10-26 18:06 ` [Bug c++/50870] " paolo.carlini at oracle dot com
2011-10-26 18:07 ` paolo at gcc dot gnu.org
2011-10-26 22:10 ` [Bug c++/50870] [C++0x] [4.6/4.7 Regression] " paolo.carlini at oracle dot com
2011-10-27 11:49 ` rguenth at gcc dot gnu.org
2011-10-28  9:52 ` paolo.carlini at oracle dot com
2011-10-28 15:54 ` hjl.tools at gmail dot com
2011-10-28 16:41 ` paolo.carlini at oracle dot com
2011-10-28 19:41 ` hjl.tools at gmail dot com
2011-10-28 23:24 ` paolo.carlini at oracle dot com
2011-11-07 22:24 ` jason at gcc dot gnu.org
2011-11-07 22:58 ` jason at gcc dot gnu.org
2011-11-08  0:48 ` jason at gcc dot gnu.org
2011-11-08  1:36 ` jason at gcc dot gnu.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).