Thanks Jeff I have tried returning address as is. But the problem remains the same. I think problem may lie somewhere else. Actually control passes through "addr = targetm.delegitimize_address (addr);" statement between 200 to 300 thousand times before finally giving segfault. And it is variable. ~VSP -- View this message in context: http://gcc.1065356.n5.nabble.com/ICE-SEGFAULT-in-mem-rtx-GCC-4-5-1-tp1208515p1209023.html Sent from the gcc - Help mailing list archive at Nabble.com.