[Bug c++/42338] [c++0x] ICE on decltype usage with templates
redi at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Dec 18 00:42:00 GMT 2009
------- Comment #2 from redi at gcc dot gnu dot org 2009-12-18 00:42 -------
I suspect this is the same issue, as it also passes a null argument to
write_expression
$ cat ice.cc
template<typename T>
auto f(T t) -> decltype(++t, 0)
{
++t;
return 0;
}
int main()
{
f((int*)0);
}
$ ~/gcc/4.x/bin/g++ -std=c++0x ice.cc
ice.cc: In instantiation of 'decltype (((++ t), 0)) f(T) [with T = int*,
decltype (((++ t), 0)) = int]':
ice.cc:10:14: instantiated from here
ice.cc:6:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42338
More information about the Gcc-bugs
mailing list