The attached stuff is a patch for PR 10728: http://sourceware.org/bugzilla/show_bug.cgi?id=10728 "infinite loop evaluating pointer difference w/o complete debug info" The bug was in valarith.c : value_ptrdiff--if the type structs showed size == 0, things came unstuck. This patch fixes that by issuing a warning and assuming size = 1. The patch includes testcase source files and and an expects file. The gdb.sum diff between the unpatched and patched make check is also attached. Chris Moller, Red Hat