------- 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

Reply via email to