http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56698
--- Comment #1 from Mike Hommey <mh+gcc at glandium dot org> 2013-03-23 18:11:16 UTC --- Interestingly, if I modify CalculateFileIndex to return 3 instead of 0, the error doesn't happen. So it might be a case of confusing gcc warning/error message.