Bug 25997 - ICE in make_typename_type while parsing member template invocation
Summary: ICE in make_typename_type while parsing member template invocation
Status: RESOLVED DUPLICATE of bug 19253
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.0.2
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-27 16:28 UTC by Gary Holt
Modified: 2006-01-27 16:31 UTC (History)
6 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gary Holt 2006-01-27 16:28:50 UTC
The following code causes an ICE.  This code is certainly invalid as it stands, though it is derived from something larger which I think is valid.

namespace SArray {

class ColumnMajor;

template <typename T, int rank> class Array;

}

template <typename T, int rank>
void xxx(const SArray::Array<T, rank> & arr)
{
    SArray::Array<T, rank> arr_contiguous = arr;
    arr_contiguous.force_ordering<typename SArray::ColumnMajor>();
}


Here is the compiler output:

% g++ -v test.cpp
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.0.2/configure --prefix=/usr/local/stow/gcc-4.0.2
Thread model: posix
gcc version 4.0.2
 /usr/local/stow/gcc-4.0.2/libexec/gcc/i686-pc-linux-gnu/4.0.2/cc1plus -quiet -v -D_GNU_SOURCE test.cpp -quiet -dumpbase test.cpp -mtune=pentiumpro -auxbase test -version -o /tmp/ccuyp00K.s
ignoring nonexistent directory "/usr/local/stow/gcc-4.0.2/lib/gcc/i686-pc-linux-gnu/4.0.2/../../../../i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/stow/gcc-4.0.2/lib/gcc/i686-pc-linux-gnu/4.0.2/../../../../include/c++/4.0.2
 /usr/local/stow/gcc-4.0.2/lib/gcc/i686-pc-linux-gnu/4.0.2/../../../../include/c++/4.0.2/i686-pc-linux-gnu
 /usr/local/stow/gcc-4.0.2/lib/gcc/i686-pc-linux-gnu/4.0.2/../../../../include/c++/4.0.2/backward
 /usr/local/include
 /usr/local/stow/gcc-4.0.2/include
 /usr/local/stow/gcc-4.0.2/lib/gcc/i686-pc-linux-gnu/4.0.2/include
 /usr/include
End of search list.
GNU C++ version 4.0.2 (i686-pc-linux-gnu)
        compiled by GNU C version 3.3.5 20050117 (prerelease) (SUSE Linux).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
test.cpp: In function âvoid xxx(const SArray::Array<T, rank>&)â:
test.cpp:13: internal compiler error: in make_typename_type, at cp/decl.c:2568
Please submit a full bug report,
with preprocessed source if appropriate.
Comment 1 Drea Pinski 2006-01-27 16:31:45 UTC
Fixed in 4.0.3, This is a dup of bug 19253.

*** This bug has been marked as a duplicate of 19253 ***