public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "agostino.cavarero at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/61072] New: template with non-type parameter of type std::string&
Date: Tue, 06 May 2014 07:25:00 -0000	[thread overview]
Message-ID: <bug-61072-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 61072
           Summary: template with non-type parameter of type std::string&
           Product: gcc
           Version: 3.4.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: agostino.cavarero at gmail dot com

Created attachment 32741
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32741&action=edit
preprocessed file causing the error

I was testing a simple program containing a template class with a non-type
parameter of class std::string&.
Upon compilation I got this:
undefined reference to `g++: Internal error: Segmentation fault (program
collect2)
Please submit a full bug report.

N.B. I think the program is not correct and I don't expect it to compile. I
just don't expect it to crush upon compilation.

Command used:
g++ -v -save-temps stringTemplateTest.cpp stringTemplateTestMain.cpp   

Output:
Reading specs from
/softntools/opt/gcc-3.4.2p3-boost-sles11/bin/../lib/gcc/x86_64-unknown-linux-gnu/3.4.2/specs
Configured with: ../../gcc-3.4.2/configure
--prefix=/opt/gcc-3.4.2p3-boost-sles11 --disable-multilib
--enable-languages=c,c++
Thread model: posix
gcc version 3.4.2

/softntools/opt/gcc-3.4.2p3-boost-sles11/bin/../libexec/gcc/x86_64-unknown-linux-gnu/3.4.2/cc1plus
-E -quiet -v -iprefix
/softntools/opt/gcc-3.4.2p3-boost-sles11/bin/../lib/gcc/x86_64-unknown-linux-gnu/3.4.2/
-D_GNU_SOURCE stringTemplateTest.cpp -mtune=k8 -o stringTemplateTest.ii
ignoring nonexistent directory
"/softntools/opt/gcc-3.4.2p3-boost-sles11/bin/../lib/gcc/x86_64-unknown-linux-gnu/3.4.2/../../../../x86_64-unknown-linux-gnu/include"
ignoring duplicate directory
"/opt/gcc-3.4.2p3-boost-sles11/lib/gcc/x86_64-unknown-linux-gnu/3.4.2/../../../../include/c++/3.4.2"
ignoring duplicate directory
"/opt/gcc-3.4.2p3-boost-sles11/lib/gcc/x86_64-unknown-linux-gnu/3.4.2/../../../../include/c++/3.4.2/x86_64-unknown-linux-gnu"
ignoring duplicate directory
"/opt/gcc-3.4.2p3-boost-sles11/lib/gcc/x86_64-unknown-linux-gnu/3.4.2/../../../../include/c++/3.4.2/backward"
ignoring duplicate directory
"/opt/gcc-3.4.2p3-boost-sles11/lib/gcc/x86_64-unknown-linux-gnu/3.4.2/include"
ignoring nonexistent directory
"/opt/gcc-3.4.2p3-boost-sles11/lib/gcc/x86_64-unknown-linux-gnu/3.4.2/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:

/softntools/opt/gcc-3.4.2p3-boost-sles11/bin/../lib/gcc/x86_64-unknown-linux-gnu/3.4.2/../../../../include/c++/3.4.2

/softntools/opt/gcc-3.4.2p3-boost-sles11/bin/../lib/gcc/x86_64-unknown-linux-gnu/3.4.2/../../../../include/c++/3.4.2/x86_64-unknown-linux-gnu

/softntools/opt/gcc-3.4.2p3-boost-sles11/bin/../lib/gcc/x86_64-unknown-linux-gnu/3.4.2/../../../../include/c++/3.4.2/backward

/softntools/opt/gcc-3.4.2p3-boost-sles11/bin/../lib/gcc/x86_64-unknown-linux-gnu/3.4.2/include
 /usr/local/include
 /opt/gcc-3.4.2p3-boost-sles11/include
 /usr/include
End of search list.

/softntools/opt/gcc-3.4.2p3-boost-sles11/bin/../libexec/gcc/x86_64-unknown-linux-gnu/3.4.2/cc1plus
-fpreprocessed stringTemplateTest.ii -quiet -dumpbase stringTemplateTest.cpp
-mtune=k8 -auxbase stringTemplateTest -version -o stringTemplateTest.s
GNU C++ version 3.4.2 (x86_64-unknown-linux-gnu)
    compiled by GNU C version 3.4.2.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
 as -V -Qy -o stringTemplateTest.o stringTemplateTest.s
GNU assembler version 2.20.0 (x86_64-suse-linux) using BFD version (GNU
Binutils; SUSE Linux Enterprise 11) 2.20.0.20100122-0.7.9

/softntools/opt/gcc-3.4.2p3-boost-sles11/bin/../libexec/gcc/x86_64-unknown-linux-gnu/3.4.2/cc1plus
-E -quiet -v -iprefix
/softntools/opt/gcc-3.4.2p3-boost-sles11/bin/../lib/gcc/x86_64-unknown-linux-gnu/3.4.2/
-D_GNU_SOURCE stringTemplateTestMain.cpp -mtune=k8 -o stringTemplateTestMain.ii
ignoring nonexistent directory
"/softntools/opt/gcc-3.4.2p3-boost-sles11/bin/../lib/gcc/x86_64-unknown-linux-gnu/3.4.2/../../../../x86_64-unknown-linux-gnu/include"
ignoring duplicate directory
"/opt/gcc-3.4.2p3-boost-sles11/lib/gcc/x86_64-unknown-linux-gnu/3.4.2/../../../../include/c++/3.4.2"
ignoring duplicate directory
"/opt/gcc-3.4.2p3-boost-sles11/lib/gcc/x86_64-unknown-linux-gnu/3.4.2/../../../../include/c++/3.4.2/x86_64-unknown-linux-gnu"
ignoring duplicate directory
"/opt/gcc-3.4.2p3-boost-sles11/lib/gcc/x86_64-unknown-linux-gnu/3.4.2/../../../../include/c++/3.4.2/backward"
ignoring duplicate directory
"/opt/gcc-3.4.2p3-boost-sles11/lib/gcc/x86_64-unknown-linux-gnu/3.4.2/include"
ignoring nonexistent directory
"/opt/gcc-3.4.2p3-boost-sles11/lib/gcc/x86_64-unknown-linux-gnu/3.4.2/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:

/softntools/opt/gcc-3.4.2p3-boost-sles11/bin/../lib/gcc/x86_64-unknown-linux-gnu/3.4.2/../../../../include/c++/3.4.2

/softntools/opt/gcc-3.4.2p3-boost-sles11/bin/../lib/gcc/x86_64-unknown-linux-gnu/3.4.2/../../../../include/c++/3.4.2/x86_64-unknown-linux-gnu

/softntools/opt/gcc-3.4.2p3-boost-sles11/bin/../lib/gcc/x86_64-unknown-linux-gnu/3.4.2/../../../../include/c++/3.4.2/backward

/softntools/opt/gcc-3.4.2p3-boost-sles11/bin/../lib/gcc/x86_64-unknown-linux-gnu/3.4.2/include
 /usr/local/include
 /opt/gcc-3.4.2p3-boost-sles11/include
 /usr/include
End of search list.

/softntools/opt/gcc-3.4.2p3-boost-sles11/bin/../libexec/gcc/x86_64-unknown-linux-gnu/3.4.2/cc1plus
-fpreprocessed stringTemplateTestMain.ii -quiet -dumpbase
stringTemplateTestMain.cpp -mtune=k8 -auxbase stringTemplateTestMain -version
-o stringTemplateTestMain.s
GNU C++ version 3.4.2 (x86_64-unknown-linux-gnu)
    compiled by GNU C version 3.4.2.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
 as -V -Qy -o stringTemplateTestMain.o stringTemplateTestMain.s
GNU assembler version 2.20.0 (x86_64-suse-linux) using BFD version (GNU
Binutils; SUSE Linux Enterprise 11) 2.20.0.20100122-0.7.9

/softntools/opt/gcc-3.4.2p3-boost-sles11/bin/../libexec/gcc/x86_64-unknown-linux-gnu/3.4.2/collect2
--eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2
/usr/lib/../lib64/crt1.o /usr/lib/../lib64/crti.o
/softntools/opt/gcc-3.4.2p3-boost-sles11/bin/../lib/gcc/x86_64-unknown-linux-gnu/3.4.2/crtbegin.o
-L/softntools/opt/gcc-3.4.2p3-boost-sles11/bin/../lib/gcc/x86_64-unknown-linux-gnu/3.4.2
-L/softntools/opt/gcc-3.4.2p3-boost-sles11/bin/../lib/gcc
-L/opt/gcc-3.4.2p3-boost-sles11/lib/gcc/x86_64-unknown-linux-gnu/3.4.2
-L/softntools/opt/gcc-3.4.2p3-boost-sles11/bin/../lib/gcc/x86_64-unknown-linux-gnu/3.4.2/../../../../lib64
-L/softntools/opt/gcc-3.4.2p3-boost-sles11/bin/../lib/gcc/x86_64-unknown-linux-gnu/3.4.2/../../..
-L/opt/gcc-3.4.2p3-boost-sles11/lib/gcc/x86_64-unknown-linux-gnu/3.4.2/../../../../lib64
-L/opt/gcc-3.4.2p3-boost-sles11/lib/gcc/x86_64-unknown-linux-gnu/3.4.2/../../..
-L/lib/../lib64 -L/usr/lib/../lib64 stringTemplateTest.o
stringTemplateTestMain.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc
/softntools/opt/gcc-3.4.2p3-boost-sles11/bin/../lib/gcc/x86_64-unknown-linux-gnu/3.4.2/crtend.o
/usr/lib/../lib64/crtn.o
stringTemplateTestMain.o: In function `main':
stringTemplateTestMain.cpp:(.text+0x12e): undefined reference to `g++: Internal
error: Segmentation fault (program collect2)
Please submit a full bug report.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.


             reply	other threads:[~2014-05-06  7:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-06  7:25 agostino.cavarero at gmail dot com [this message]
2014-05-06  7:26 ` [Bug c++/61072] " agostino.cavarero at gmail dot com
2014-05-06  7:37 ` pinskia at gcc dot gnu.org
2014-05-06  7:49 ` agostino.cavarero at gmail dot com

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-61072-4@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).