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++/12099] New: ICE (segfault) with int-parameterized class template used as function parameter


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: ICE (segfault) with int-parameterized class template
                    used as function parameter
           Product: gcc
           Version: 3.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hg211 at ural2 dot hszk dot bme dot hu
                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

This sample causes ICE on all gcc versions I tried:
gcc version 2.95.4 20011002 (Debian prerelease)
gcc version 3.0.4
gcc version 3.2.3 (Debian)
gcc version 3.3.2 20030812 (Debian prerelease)

if you remove the '*0', the code compiles with 3.2.3 & 3.3.2

-- the code:

template <typename TYPE>
struct foo {
	static const int value = 0;
};

template <int v>
struct Int2Type {
};

template <typename PAR0, typename PAR1>
void fv(PAR1 v, Int2Type<foo<PAR1>::value*0>) {
}

void bar(int f) {
	fv<int>(f, Int2Type<0>());
}


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