This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch: Consistently generate widening multiplies
On Thu, 22 Apr 2010, Bernd Schmidt wrote:
> On 04/22/2010 05:43 PM, H.J. Lu wrote:
> > gcc.target/i386/wmul-1.c is 32bit only. It fails on 64bit target:
> >
> > Executing on host: /export/gnu/import/svn/gcc-test/bld/gcc/xgcc
> > -B/export/gnu/import/svn/gcc-test/bld/gcc/
> > /export/gnu/import/svn/gcc-test/src-trunk/gcc/testsuite/gcc.target/i386/wmul-1.c
> > -O2 -S -o wmul-1.s (timeout = 300)
> > PASS: gcc.target/i386/wmul-1.c (test for excess errors)
> > FAIL: gcc.target/i386/wmul-1.c scan-assembler-times imull 2
>
> Adding
>
> /* { dg-options "-m32" } */
>
> should fix it, shouldn't it?
It's essentially never correct for a gcc.target/i386 test to use -m32 or
-m64 explicitly. The multilib options go after the dg-options and
override them, so if a test needs to run in 32-bit or 64-bit mode then
specifying those options in dg-options will not achieve that effect; the
tests will fail in multilib testing. Instead, use
/* { dg-require-effective-target ilp32 } */
for a 32-bit-only test.
--
Joseph S. Myers
joseph@codesourcery.com