https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78691
--- Comment #2 from Alastair D'Silva <g...@d-silva.org> --- The same problem also occurs when compiling the linux x86 boot code arch/x86/boot/printf.c, which results in a very similar testcase: ~/tmp/gcc-c46915880dca92/bin/x86_64-unknown-linux-gnu-cc -m16 -Os -c testcase.i testcase.i: In function 'fn1': testcase.i:1:5: internal compiler error: tree check: expected integer_type or enumeral_type or boolean_type or real_type or fixed_point_type, have pointer_type in int_fits_type_p, at tree.c:9152 int fn1(char *p1, char *p2) { ^~~ Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. ~/tmp/gcc-c46915880dca92/bin/x86_64-unknown-linux-gnu-cc -v Using built-in specs. COLLECT_GCC=/home/adsilva/tmp/gcc-c46915880dca92/bin/x86_64-unknown-linux-gnu-cc COLLECT_LTO_WRAPPER=/home/adsilva/tmp/gcc-c46915880dca92/bin/../libexec/gcc/x86_64-unknown-linux-gnu/7.0.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: /workspace/.build/src/gcc-git/configure --build=x86_64-build_pc-linux-gnu --host=x86_64-build_pc-linux-gnu --target=x86_64-unknown-linux-gnu --prefix=/workspace/x-tools --with-sysroot=/workspace/x-tools/x86_64-unknown-linux-gnu/sysroot --enable-languages=c,c++ --with-pkgversion='crosstool-NG crosstool-ng-1.22.0-201-g11cb2dd' --enable-__cxa_atexit --enable-libmudflap --disable-libgomp --disable-libssp --disable-libquadmath --disable-libquadmath-support --enable-libsanitizer --with-gmp=/workspace/.build/x86_64-unknown-linux-gnu/buildtools --with-mpfr=/workspace/.build/x86_64-unknown-linux-gnu/buildtools --with-mpc=/workspace/.build/x86_64-unknown-linux-gnu/buildtools --with-isl=/workspace/.build/x86_64-unknown-linux-gnu/buildtools --enable-lto --enable-threads=posix --enable-target-optspace --with-linker-hash-style=both --enable-plugin --enable-gold --disable-nls --disable-multilib --with-local-prefix=/workspace/x-tools/x86_64-unknown-linux-gnu/sysroot --enable-long-long Thread model: posix gcc version 7.0.0 20161205 (experimental) (crosstool-NG crosstool-ng-1.22.0-201-g11cb2dd)