------- Comment #4 from hubicka at ucw dot cz 2010-06-16 16:13 ------- Subject: Re: [4.6 Regression] gcc.c-torture/execute/frame-address.c
> Confirmed on powerpc-linux. check_fa tail calls check_fa_mid, ignoring the > fact that check_fa_mid is passed the address of a check_fa local var. This seems like valid transform to me. check_fa_mid is recognized as const so caller know that even if local variable is passed, it is not going to read it. So i would say that the testcase is semi-invalid at least. What about adding a asm statement clobbering memory to check_fa_work to avoid the failure? On the other hand I was worng to assume that built_in_frame_address does not make function not-const or pure since it returns address of local frame that is useless after returning from function. With parameter greater than 0 it is not true. I wonder if we care enough about builtin_eh_frame to make it worthwhile to special case this in ipa-pure-const? It does not 100% fit into the framework since the calling statement is available only to non-WPA compilation. Honza -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44505