This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/15285] New: [3.4 regression] instantiate_type ICE when forming pointer to template function


The compiler throws an ICE when trying to form a pointer to an instance of a
template function from within a different template function.  This worked in
gcc-3.3.3 and is also broken in the mainline.

***tf.C****************

void foo(void (*func)()) {}

template<typename T>
void bar()
{}

template<typename T>
void baz()
{
        foo(&bar<long>);
}

**********************

$ g++ tf.C
tf.C: In member function `void Class<Type>::foo(Object*)':
tf.C:18: internal compiler error: in instantiate_type, at cp/class.c:6164

$ g++ -v
Reading specs from /home/bob/bin/gcc-3.4/lib/gcc/i686-pc-linux-gnu/3.4.0/specs
Configured with: ../gcc/configure --enable-threads=posix
--enable-languages=c,c++ --prefix=/home/bob/bin/gcc-3.4
Thread model: posix
gcc version 3.4.0

-- 
           Summary: [3.4 regression] instantiate_type ICE when forming
                    pointer to template function
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: revans at trlm dot com
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-pc-linux-gnu


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]