Testcase for pr6552. I changed the code to use "ip" instead of "fp" because