This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH, i386] PR63211 broken type-punning in avx* tests.
- From: Ilya Tocar <tocarip dot intel at gmail dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: Kirill Yukhin <kirill dot yukhin at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 3 Apr 2015 17:52:07 +0300
- Subject: Re: [PATCH, i386] PR63211 broken type-punning in avx* tests.
- Authentication-results: sourceware.org; auth=none
- References: <20150403110229 dot GB23405 at msticlxl7 dot ims dot intel dot com> <CAFULd4Zeq2UKXqCPO4r6mNci5CFzWarN=YaXWULUFf2PPZew9g at mail dot gmail dot com>
On 03 Apr 13:39, Uros Bizjak wrote:
> On Fri, Apr 3, 2015 at 1:02 PM, Ilya Tocar <firstname.lastname@example.org> wrote:
> > I've looked into avx* tests and many of them (even those that don't fail
> > in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63211) use invalid type
> > punning. Properly fixing them looks like a lot of work, so I propose
> > just adding -fno-strict-aliasing to them.
> > This patch was obtained by running
> > sed -i "s/-O2/-O2 -fno-strict-aliasing/g" ../gcc/testsuite/gcc.target/i386/avx*-2.c
> > Ok for stage1?
> I don't like this approach. If the testcase is broken, then it should
> be fixed, not worked around.
IMHO those tests don't need to be alias conformant.
There are plenty of tests for aliasing rules,
and avx tests verify intrinsics implementaion. There are plenty of real
programs braking alias rules, so why can't we have non-conformant tests?