http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51313
Bug #: 51313 Summary: [C++0x] ICE: tree check: expected class 'constant', have 'unary' (nop_expr) in null_ptr_cst_p, at cp/call.c:556 Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: y121...@gmail.com The ICE occurred with -std=c++0x option. If not use -std=c++0x option then the ICE not occurred Codes (a.cpp): #include<iostream> #include<cctype> int main() { std::cout << isdigit(0); } Compiler errors: $ g++4.7 -std=c++0x a.cpp a.cpp: In function 'int main()': a.cpp:6:25: internal compiler error: tree check: expected class 'constant', have 'unary' (nop_expr) in null_ptr_cst_p , at cp/call.c:556 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. Version info: $ g++4.7 -v Built by Equation Solution <http://www.Equation.com>. Using built-in specs. COLLECT_GCC=C:\cygwin\home\RiSK\misc\gcc4.7\bin\g++.exe COLLECT_LTO_WRAPPER=c:/cygwin/home/risk/misc/gcc4.7/bin/../libexec/gcc/i686-pc-mingw32/4.7.0/lto-wrapper.exe Target: i686-pc-mingw32 Configured with: ../gcc-4.7-20111119-mingw/configure --host=i686-pc-mingw32 --build=x86_64-unknown-linux-gnu --target =i686-pc-mingw32 --prefix=/home/gfortran/gcc-home/binary/mingw32/native/x86_32/gcc/4.7-20111119 --with-gcc --with-gnu -as --with-gnu-ld --with-host-libstdcxx='-lstdc++ -lsupc++ -lm' --with-ppl=/home/gfortran/gcc-home/binary/mingw32/nat ive/x86_32/ppl --with-cloog=/home/gfortran/gcc-home/binary/mingw32/native/x86_32/cloog --with-gmp=/home/gfortran/gcc- home/binary/mingw32/native/x86_32/gmp --with-mpfr=/home/gfortran/gcc-home/binary/mingw32/native/x86_32/mpfr --with-mp c=/home/gfortran/gcc-home/binary/mingw32/native/x86_32/mpc --with-sysroot=/home/gfortran/gcc-home/binary/mingw32/cros s/x86_32/gcc/4.7-20111119 --disable-shared --disable-nls --disable-tls --disable-win32-registry --enable-libquadmath- support --enable-libquadmath --enable-languages=c,c++,fortran --enable-libgomp --enable-threads=win32 --enable-lto -- enable-static --enable-shared=lto-plugin --enable-plugins --enable-ld=yes --enable-cloog-backend=ppl Thread model: win32 gcc version 4.7.0 20111119 (experimental) (GCC)