This is the mail archive of the
`gcc-patches@gcc.gnu.org`
mailing list for the GCC project.

Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|

Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |

Other format: | [Raw text] |

*From*: Mark Mitchell <mark at codesourcery dot com>*To*: Aldy Hernandez <aldyh at redhat dot com>*Cc*: Jason Merrill <jason at redhat dot com>, Richard Henderson <rth at redhat dot com>, gcc-patches at gcc dot gnu dot org*Date*: Mon, 13 Jun 2005 13:42:03 -0700*Subject*: Re: broken arithmetic operations on vectors (c and c++)*References*: <20050610134430.GA22224@redhat.com> <20050610204651.GB23605@redhat.com> <20050613132514.GA6815@redhat.com> <xypbr6anv6c.fsf@miranda.boston.redhat.com> <42ADA658.1040809@codesourcery.com> <20050613183043.GA9677@redhat.com> <42ADD1C0.6030003@codesourcery.com> <20050613194505.GA19884@redhat.com>

Why not just the moral equivalent of:

same_type_p (langhooks.signed_type(t1), langhooks.signed_type(t2))

Oooo. Nice.

Ok, I used the equality operator, since that's how it seems we compare types throughout the FEs.

Here is an updated patch which I'm testing. It's for the C and C++ front ends. C was borked as well.

In testing I noticed gcc.dg/simd-1b.c had most of the tests XFAILed. They now work. I've re-enabled them.

How does this look?

I'm concerned about the pointer-equality test, but, because c_common_signed_type grabs the TYPE_MAIN_VARIANT, it should work for scalars, as RTH says. I think that to make this a bit more bulletproof, you should (a) add a comment noting that c_common_signed_type does that, and (b) assert that the inputs are INTEGER_TYPE or REAL_TYPE. Perhaps even change the name of the function to same_scalar_type_ignoring_signedness.

-- Mark Mitchell CodeSourcery, LLC mark@codesourcery.com (916) 791-8304

**Follow-Ups**:**Re: broken arithmetic operations on vectors (c and c++)***From:*Aldy Hernandez

**Re: broken arithmetic operations on vectors (c and c++)***From:*Aldy Hernandez

**References**:**RFA: PR c++/10611 arithmetic operations on vectors***From:*Aldy Hernandez

**Re: RFA: PR c++/10611 arithmetic operations on vectors***From:*Richard Henderson

**broken arithmetic operations on vectors (c and c++)***From:*Aldy Hernandez

**Re: broken arithmetic operations on vectors (c and c++)***From:*Jason Merrill

**Re: broken arithmetic operations on vectors (c and c++)***From:*Mark Mitchell

**Re: broken arithmetic operations on vectors (c and c++)***From:*Aldy Hernandez

**Re: broken arithmetic operations on vectors (c and c++)***From:*Mark Mitchell

**Re: broken arithmetic operations on vectors (c and c++)***From:*Aldy Hernandez

Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|

Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |