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++/14691] New: ICE in write_type at cp/mangle.c when using typeof


This short program fails with
gcc version 3.3
gcc version 3.5.0 20040317 (experimental)

(Idea for test program by John Spicer, Edison Design Group,
during WG21 meeting.)

The error message (with a slight variation in the line number) is:

typeof.cc: In function `int main()':
typeof.cc:11: internal compiler error: in write_type, at cp/mangle.c:1491
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.


template<class T> int f(T) { };

template<class T>
typeof(f<T*>(0)) g(T x) { }

struct X { };

int main()
{
  g(X());
}

-- 
           Summary: ICE in write_type at cp/mangle.c when using typeof
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jens dot maurer at gmx dot net
                CC: gcc-bugs at gcc dot gnu dot org
 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=14691


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