public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/22405] New: ICE in when instantiating a template function, for illegal code
@ 2005-07-11  9:53 martin at mpa-garching dot mpg dot de
  2005-07-11 10:47 ` [Bug c++/22405] " martin at mpa-garching dot mpg dot de
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: martin at mpa-garching dot mpg dot de @ 2005-07-11  9:53 UTC (permalink / raw)
  To: gcc-bugs

Current g++ produces an ICE when compiling the following code snippet:

template <typename T> void foo(T &arg) {
  arg+=1;
  }

template <typename T> void foo(T &arg) {
  arg+=2;
  }

template void foo(float &arg);


~/tmp>g++ -v bug.cc
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: /scratch/gcc/configure --quiet
--prefix=/afs/mpa/data/martin/ugcc --enable-languages=c++,f95
--enable-mapped-location --with-gmp=/afs/mpa/data/martin/mygmp
Thread model: posix
gcc version 4.1.0 20050711 (experimental)
 /afs/mpa/data/martin/ugcc/libexec/gcc/i686-pc-linux-gnu/4.1.0/cc1plus -quiet -v
-D_GNU_SOURCE bug.cc -quiet -dumpbase bug.cc -mtune=pentiumpro -auxbase bug
-version -o /tmp/cctt6fLt.s
ignoring nonexistent directory
"/afs/mpa/data/martin/ugcc/lib/gcc/i686-pc-linux-gnu/4.1.0/../../../../i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /afs/mpa/data/martin/ugcc/lib/gcc/i686-pc-linux-gnu/4.1.0/../../../../include/c++/4.1.0
 /afs/mpa/data/martin/ugcc/lib/gcc/i686-pc-linux-gnu/4.1.0/../../../../include/c++/4.1.0/i686-pc-linux-gnu
 /afs/mpa/data/martin/ugcc/lib/gcc/i686-pc-linux-gnu/4.1.0/../../../../include/c++/4.1.0/backward
 /usr/local/include
 /afs/mpa/data/martin/ugcc/include
 /afs/mpa/data/martin/ugcc/lib/gcc/i686-pc-linux-gnu/4.1.0/include
 /usr/include
End of search list.
GNU C++ version 4.1.0 20050711 (experimental) (i686-pc-linux-gnu)
        compiled by GNU C version 4.1.0 20050711 (experimental).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 4d7d2981a00322530f4db8cbc706d5cf
bug.cc:5:38: error: redefinition of 'template<class T> void foo(T&)'
bug.cc:1:38: error: 'template<class T> void foo(T&)' previously declared here
bug.cc:9:29: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

-- 
           Summary: ICE in when instantiating a template function, for
                    illegal code
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: martin at mpa-garching dot mpg dot de
                CC: gcc-bugs at gcc dot gnu dot org,martin at mpa-garching
                    dot mpg dot de
 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=22405


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

end of thread, other threads:[~2005-09-27 15:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-11  9:53 [Bug c++/22405] New: ICE in when instantiating a template function, for illegal code martin at mpa-garching dot mpg dot de
2005-07-11 10:47 ` [Bug c++/22405] " martin at mpa-garching dot mpg dot de
2005-07-11 14:42 ` [Bug c++/22405] [4.1 Regression] " pinskia at gcc dot gnu dot org
2005-07-11 15:58 ` pinskia at gcc dot gnu dot org
2005-07-11 16:02 ` pinskia at gcc dot gnu dot org
2005-07-25 13:41 ` [Bug c++/22405] [4.0.1/4.1 " reichelt at gcc dot gnu dot org
2005-07-25 13:54 ` reichelt at gcc dot gnu dot org
2005-09-27 15:59 ` mmitchel 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).