if (tomode == OOmode)
return N_("invalid conversion to type %<__vector_pair%>");
}
- else if (POINTER_TYPE_P (fromtype) && POINTER_TYPE_P (totype))
- {
- /* We really care about the modes of the base types. */
- frommode = TYPE_MODE (TREE_TYPE (fromtype));
- tomode = TYPE_MODE (TREE_TYPE (totype));
-
- /* Do not allow conversions to/from XOmode and OOmode pointer
- types, except to/from void pointers. */
- if (frommode != tomode
- && frommode != VOIDmode
- && tomode != VOIDmode)
- {
- if (frommode == XOmode)
- return N_("invalid conversion from type %<__vector_quad *%>");
- if (tomode == XOmode)
- return N_("invalid conversion to type %<__vector_quad *%>");
- if (frommode == OOmode)
- return N_("invalid conversion from type %<__vector_pair *%>");
- if (tomode == OOmode)
- return N_("invalid conversion to type %<__vector_pair *%>");
- }
- }
/* Conversion allowed. */
return NULL;
--- /dev/null
+/* PR target/106017 */
+/* { dg-options "-O1 -mdejagnu-cpu=power10" } */
+/* { dg-require-effective-target power10_ok } */
+
+/* Make sure we do not flag any errors on the following test cases. */
+
+void takeacc(__vector_quad *);
+void
+foo (void)
+{
+ __vector_quad arr[4];
+ takeacc (arr);
+}
+
+unsigned char *
+bar (__vector_quad *a)
+{
+ return (unsigned char *)a;
+}