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]

Re: vector comparisons in C++


On Thu, Sep 20, 2012 at 10:01 PM, Marc Glisse <marc.glisse@inria.fr> wrote:
> On Sat, 1 Sep 2012, Marc Glisse wrote:
>
>> I have some issues with the vector-compare-2.c torture test. It passes a
>> vector by value (argument and return type), which is likely to warn
>> (although for some reason it doesn't for me, with today's compiler). And it
>> takes -Wno-psabi through a .x file, but those are not read in c-c++-common,
>> so I put it in dg-options. I would have changed the function to use
>> pointers, but I don't know if it specifically wants to test passing by
>> value...
>
>
> Hello,
>
> Pat Haugen just explained it to me: there was a default -w option in the old
> location of the testcase. However, there isn't in the new one. I am thus
> proposing the following, which restores the old behavior. Note that
> -Wno-psabi is still needed as it is not implied by -w.

Ok.

Thanks,
Richard.

> 2012-09-20  Marc Glisse  <marc.glisse@inria.fr>
>
>         PR c++/54427
>         * c-c++-common/torture/vector-compare-2.c: Add -w.
>
> --
> Marc Glisse
> Index: c-c++-common/torture/vector-compare-2.c
> ===================================================================
> --- c-c++-common/torture/vector-compare-2.c     (revision 191585)
> +++ c-c++-common/torture/vector-compare-2.c     (working copy)
> @@ -1,12 +1,12 @@
>  /* { dg-do run } */
> -/* { dg-options "-Wno-psabi" } */
> +/* { dg-options "-Wno-psabi -w" } */
>  #define vector(elcount, type)  \
>  __attribute__((vector_size((elcount)*sizeof(type)))) type
>
>  /* Check that constant folding in
>     these simple cases works.  */
>  vector (4, int)
>  foo (vector (4, int) x)
>  {
>    return   (x == x) + (x != x) + (x >  x)
>          + (x <  x) + (x >= x) + (x <= x);
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]