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

--- Comment #3 from acsawdey at gcc dot gnu.org ---
Yeah it's pretty clear that something needs to be output, as with that code I
get an error like this:

In module imported at mma-module-2.C:1:1:
mma_foo0: In function ‘int bar(__vector_quad*, vec_t*, __vector_pair*)’:
mma_foo0: error: failed to read compiled module cluster 2: Bad file data
mma_foo0: note: compiled module file is ‘gcm.cache/mma_foo0.gcm’
mma-module-2.C:7:5: fatal error: failed to load binding ‘::foo0@mma_foo0’
    7 |     foo0 (dst, vec, pvecp);
      |     ^~~~


This is with a little test case of two files:

export module mma_foo0;

typedef unsigned char  vec_t __attribute__((vector_size(16)));

export void
foo0 (__vector_quad *dst, vec_t *vec, __vector_pair *pvecp)
{
  __vector_quad acc;
  __vector_pair vecp0 = *pvecp;
  vec_t vec1 = vec[1];

  __builtin_mma_xvf64ger (&acc, vecp0, vec1);
  __builtin_mma_xvf64gerpp (&acc, vecp0, vec1);
  __builtin_mma_xvf64gerpn (&acc, vecp0, vec1);
  dst[0] = acc;
}

--------

typedef unsigned char  vec_t __attribute__((vector_size(16)));

int bar(__vector_quad *dst, vec_t *vec, __vector_pair *pvecp)
{
    foo0 (dst, vec, pvecp);
}

Reply via email to