public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/37766]  New: [C++0x] ICE with function's default reference template parameter
@ 2008-10-08  5:37 florian dot goujeon at wanadoo dot fr
  2008-10-08  5:43 ` [Bug c++/37766] " florian dot goujeon at wanadoo dot fr
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: florian dot goujeon at wanadoo dot fr @ 2008-10-08  5:37 UTC (permalink / raw)
  To: gcc-bugs

The following piece of code:

=====================================================
#include <string>

const std::string space(" ");

template<const std::string& Str = space>
void f()
{
}

int main()
{
    f<>();
}
=====================================================


leads to a compiler internal error:
=====================================================
$ g++ -std=c++0x main.cpp space.cpp
main.cpp: In function 'int main()':
main.cpp:3: internal compiler error: Segmentation fault
=====================================================


This bug occurs with any reference template parameter (i.e. not only
std::string&).



I hope my reports are helpful :)

$ g++ -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc/configure --enable-languages='c c++' --disable-nls :
(reconfigured) ../gcc/configure --enable-languages='c c++' : (reconfigured)
../gcc/configure --enable-languages='c c++' --enable-shared --disable-static
--disable-nls
Thread model: posix
gcc version 4.4.0 20081005 (experimental) (GCC)


-- 
           Summary: [C++0x] ICE with function's default reference template
                    parameter
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: florian dot goujeon at wanadoo dot fr
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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

end of thread, other threads:[~2009-10-18  5:17 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-08  5:37 [Bug c++/37766] New: [C++0x] ICE with function's default reference template parameter florian dot goujeon at wanadoo dot fr
2008-10-08  5:43 ` [Bug c++/37766] " florian dot goujeon at wanadoo dot fr
2008-12-24 19:14 ` pinskia at gcc dot gnu dot org
2008-12-24 19:15 ` pinskia at gcc dot gnu dot org
2008-12-24 20:13 ` pinskia at gcc dot gnu dot org
2008-12-28 23:03 ` reichelt at gcc dot gnu dot org
2009-07-12 22:03 ` reichelt at gcc dot gnu dot org
2009-10-12  5:35 ` jason at gcc dot gnu dot org
2009-10-12 21:04 ` jason at gcc dot gnu dot org
2009-10-12 21:49 ` jason at gcc dot gnu dot org
2009-10-18  5:13 ` jason at gcc dot gnu dot org
2009-10-18  5:17 ` jason 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).