public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "florian dot goujeon at wanadoo dot fr" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/37766]  New: [C++0x] ICE with function's default reference template parameter
Date: Wed, 08 Oct 2008 05:37:00 -0000	[thread overview]
Message-ID: <bug-37766-16789@http.gcc.gnu.org/bugzilla/> (raw)

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


             reply	other threads:[~2008-10-08  5:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-08  5:37 florian dot goujeon at wanadoo dot fr [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-37766-16789@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).