[Bug lto/59326] FAIL: gcc.dg/vect/vect-simd-clone-*.c

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Nov 28 13:32:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59326

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #3)
> Fix for that:
> 
> Index: gcc/omp-low.c
> ===================================================================
> --- gcc/omp-low.c       (revision 205484)
> +++ gcc/omp-low.c       (working copy)
> @@ -11734,8 +11734,13 @@ static unsigned int
>  ipa_omp_simd_clone (void)
>  {
>    struct cgraph_node *node;
> -  FOR_EACH_FUNCTION (node)
> -    expand_simd_clones (node);
> +  FOR_EACH_DEFINED_FUNCTION (node)
> +    {
> +      if (!cgraph_function_with_gimple_body_p (node))
> +       continue;
> +      cgraph_get_body (node);
> +      expand_simd_clones (node);
> +    }
>    return 0;
>  }
> 
> 
> and now it magically works.

But then it won't handle the !node->definition cloning (it isn't actually
cloning in that case, just creating another DECL_EXTERNAL FUNCTION_DECL with
adjusted arguments).  So it really needs to be FOR_EACH_FUNCTION, but perhaps
can avoid the cgraph_function_with_gimple_body_p/cgraph_get_body stuff if
!node->definition.



More information about the Gcc-bugs mailing list