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

--- Comment #6 from Peter Bergner <bergner at gcc dot gnu.org> ---
(In reply to Martin Jambor from comment #5)
> The following should fix it.  I'll try a bit more to come up with a testcase
> that would not require __builtin_vec_vsx_st but so far my simple attempts
> failed. 

This patch to the small test case I attached still ICEs for me using the same
compiler options:

@@ -84,7 +84,7 @@
 template <typename cj, int> cj cp;
 template <typename bu, typename cj, int> void cl(bu *cr, cj cs) { ct(cr, cs);
}
 typedef __attribute__((altivec(vector__))) double co;
-void ct(double *cr, co cs) { __builtin_vec_vsx_st(cs, 0, cr); }
+void ct(double *cr, co cs) { *(co *)cr = cs; }
 struct cq {
   co q;
 };

I'll give your patch a try.

Reply via email to