This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch]: Fix some corner cases in get_callee_fn and aggregate_value_p
- From: Kai Tietz <Kai dot Tietz at onevision dot com>
- To: "Richard Guenther" <richard dot guenther at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 26 Nov 2008 10:57:30 +0100
- Subject: Re: [patch]: Fix some corner cases in get_callee_fn and aggregate_value_p
Hi Richard,
"Richard Guenther" <richard.guenther@gmail.com> wrote on 26.11.2008
10:39:17:
> On Wed, Nov 26, 2008 at 9:36 AM, Kai Tietz <Kai.Tietz@onevision.com>
wrote:
> > Hi,
> >
> > while reviewing the call abi patch for x86_64, I found the following
> > issues. Maybe they are of some relevants as I noticed they are
happening.
> > The patch in get_callee_fn for allowing check for addr being a
> > FUNCTION_DECL seems to be of not much relevant here, but at least
there is
> > a check in front checking for
> > a readonly function pointer, which verifies that TREE_CODE(addr) isn't
> > already a FUNCTION_DECL.
>
> The function.c part makes sense, but I don't see how what the tree.c
> part tests for is valid - did that really happen? Testcase?
No, have no testcase for the tree.c part. I just noticed that for
...
/* If this is a readonly function pointer, extract its initial value. */
if (DECL_P (addr) && TREE_CODE (addr) != FUNCTION_DECL
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
&& TREE_READONLY (addr) && ! TREE_THIS_VOLATILE (addr)
&& DECL_INITIAL (addr))
addr = DECL_INITIAL (addr);
...
for this case is checked. So I assumed, that this check is bogus, or there
must be really a case for what this could happens.
> You didn't state if/how you bootstrapped and tested this.
I bootstraped it for x86_64-pc-linux64 and for x86_64-pc-mingw32 without
seeing any regressions.
Cheers,
Kai
| (\_/) This is Bunny. Copy and paste Bunny
| (='.'=) into your signature to help him gain
| (")_(") world domination.