This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/17524] New: ICE with initializing a variable of type void
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Sep 2004 16:30:57 -0000
- Subject: [Bug c++/17524] New: ICE with initializing a variable of type void
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Spinoff from PR 17344:
----------------------------------
template <typename T> struct intTraits {
static const T i = 0;
};
struct S {
S(intTraits<void>);
};
template <typename> struct A {};
int bar(S);
int bar(A<int>);
S *s;
int i = bar(*s);
------------------------
We shouldn't ICE here:
g/x> /home/bangerth/bin/gcc-4.0-pre/bin/c++ -c x.cc
x.cc: In instantiation of `intTraits<void>':
x.cc:15: instantiated from here
x.cc:2: error: instantiation of `intTraits<void>::i' as type `const void'
x.cc:2: error: `intTraits<void>::i' has incomplete type
x.cc:2: error: invalid in-class initialization of static data member of
non-integral type `<type error>'
x.cc:1: internal compiler error: tree check: expected class 't', have
'x' (error_mark) in finish_struct_1, at cp/class.c:5065
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
W.
--
Summary: ICE with initializing a variable of type void
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bangerth at dealii dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17524