https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93555

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
--- gcc/omp-simd-clone.c.jj     2020-01-12 11:54:36.688409260 +0100
+++ gcc/omp-simd-clone.c        2020-02-04 18:08:11.271036096 +0100
@@ -1713,14 +1713,22 @@ expand_simd_clones (struct cgraph_node *
             already.  */
          tree id = simd_clone_mangle (node, clone);
          if (id == NULL_TREE)
-           continue;
+           {
+             if (i == 0)
+               clone->nargs += clone->inbranch;
+             continue;
+           }

          /* Only when we are sure we want to create the clone actually
             clone the function (or definitions) or create another
             extern FUNCTION_DECL (for prototypes without definitions).  */
          struct cgraph_node *n = simd_clone_create (node);
          if (n == NULL)
-           continue;
+           {
+             if (i == 0)
+               clone->nargs += clone->inbranch;
+             continue;
+           }

          n->simdclone = clone;
          clone->origin = node;

seems to work.

Reply via email to