Commit 479d960b by Aldy Hernandez Committed by Aldy Hernandez

call.c (standard_conversion): Opaque pointers interconvert.

2003-08-11  Aldy Hernandez  <aldyh@redhat.com>

        * cp/call.c (standard_conversion): Opaque pointers interconvert.

        * testsuite/g++.dg/other/opaque-3.C: New.

From-SVN: r70371
parent e885821f
2003-08-11 Aldy Hernandez <aldyh@redhat.com>
* call.c (standard_conversion): Opaque pointers interconvert.
* testsuite/g++.dg/other/opaque-3.C: New.
2003-08-11 Mark Mitchell <mark@codesourcery.com> 2003-08-11 Mark Mitchell <mark@codesourcery.com>
* typeck.c (merge_types): Handle cv-qualified pointer-to-member * typeck.c (merge_types): Handle cv-qualified pointer-to-member
......
...@@ -647,6 +647,12 @@ standard_conversion (tree to, tree from, tree expr) ...@@ -647,6 +647,12 @@ standard_conversion (tree to, tree from, tree expr)
if ((tcode == POINTER_TYPE || TYPE_PTR_TO_MEMBER_P (to)) if ((tcode == POINTER_TYPE || TYPE_PTR_TO_MEMBER_P (to))
&& expr && null_ptr_cst_p (expr)) && expr && null_ptr_cst_p (expr))
conv = build_conv (STD_CONV, to, conv); conv = build_conv (STD_CONV, to, conv);
else if (tcode == POINTER_TYPE && fcode == POINTER_TYPE
&& TREE_CODE (TREE_TYPE (to)) == VECTOR_TYPE
&& TREE_CODE (TREE_TYPE (from)) == VECTOR_TYPE
&& ((*targetm.vector_opaque_p) (TREE_TYPE (to))
|| (*targetm.vector_opaque_p) (TREE_TYPE (from))))
conv = build_conv (STD_CONV, to, conv);
else if ((tcode == INTEGER_TYPE && fcode == POINTER_TYPE) else if ((tcode == INTEGER_TYPE && fcode == POINTER_TYPE)
|| (tcode == POINTER_TYPE && fcode == INTEGER_TYPE)) || (tcode == POINTER_TYPE && fcode == INTEGER_TYPE))
{ {
......
/* { dg-do compile { target powerpc-*-eabi* } } */
/* { dg-options "-mcpu=8540 -mabi=spe" } */
__ev64_opaque__ o;
#define v __attribute__((vector_size(8)))
v unsigned int *p;
void m()
{
o = __builtin_spe_evldd(p, 5);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment