------- Additional Comments From rguenth at gcc dot gnu dot org 2005-08-30 08:58 ------- It's weird we only fail with f being a template function. In fact, only in this case we reach the point where we try the invalid folding.
Nevertheless, I have an (obvious) patch. Testing in progress. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23624