This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/44505] [4.6 Regression] gcc.c-torture/execute/frame-address.c
- From: "hubicka at ucw dot cz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Jun 2010 16:13:59 -0000
- Subject: [Bug middle-end/44505] [4.6 Regression] gcc.c-torture/execute/frame-address.c
- References: <bug-44505-682@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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