public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hjl.tools at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug testsuite/59971] New: multilib_flags is placed with the wrong order
Date: Tue, 28 Jan 2014 21:11:00 -0000	[thread overview]
Message-ID: <bug-59971-4@http.gcc.gnu.org/bugzilla/> (raw)

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59971

            Bug ID: 59971
           Summary: multilib_flags is placed with the wrong order
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: testsuite
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hjl.tools at gmail dot com

Some testcases need explicit GCC options to properly run, like
gcc.target/i386/sse2-init-v2di-2.c has

/* { dg-options "-O2 -msse4 -march=core2 -dp" } */

-march=core2 is specified explicitly.  But with multlib, we get


[hjl@gnu-18 gcc]$ make check-gcc RUNTESTFLAGS="--target_board='unix{-march=k8}'
i386.exp=sse2-init-v2di-2.c"      
make[1]: Entering directory `/export/build/gnu/gcc/build-x86_64-linux/gcc'
test -d plugin || mkdir plugin
test -d testsuite || mkdir testsuite
test -d testsuite/gcc || mkdir testsuite/gcc
(rootme=`${PWDCMD-pwd}`; export rootme; \
srcdir=`cd /export/gnu/import/git/gcc/gcc; ${PWDCMD-pwd}` ; export srcdir ; \
cd testsuite/gcc; \
rm -f tmp-site.exp; \
sed '/set tmpdir/ s|testsuite$|testsuite/gcc|' \
    < ../../site.exp > tmp-site.exp; \
/bin/sh ${srcdir}/../move-if-change tmp-site.exp site.exp; \
EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo
${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \
if [ -f ${rootme}/../expect/expect ] ; then  \
   TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \
    export TCL_LIBRARY ; fi ; \
runtestflags= ; \
if [ -n "" ] ; then \
  runtestflags=""; \
elif [ -n "" ] ; then \
  parts="`echo '  ' \
      | sed 's/=[^ ]* / /g'`"; \
  for part in `find $srcdir/testsuite/gcc* -name \*.exp` ; do \
    part=`basename $part` ; \
    case " $parts $runtestflags " in \
      *" $part "*) ;; \
      *) runtestflags="$runtestflags $part" ;; \
    esac ; \
  done ; \
fi ; \
`if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo
${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool gcc
--target_board='unix{-march=k8}' i386.exp=sse2-init-v2di-2.c $runtestflags)
WARNING: Couldn't find the global config file.
Test Run By hjl on Tue Jan 28 12:40:33 2014
Native configuration is x86_64-unknown-linux-gnu

        === gcc tests ===

Schedule of variations:
    unix/-march=k8

Running target unix/-march=k8
Using /usr/share/dejagnu/baseboards/unix.exp as board description file for
target.
Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
Using /export/gnu/import/git/gcc/gcc/testsuite/config/default.exp as
tool-and-target-specific interface file.
Running /export/gnu/import/git/gcc/gcc/testsuite/gcc.target/i386/i386.exp ...
FAIL: gcc.target/i386/sse2-init-v2di-2.c scan-assembler-times vec_concatv2di/3
1

        === gcc Summary ===

# of expected passes        11
# of unexpected failures    1
/export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc  version 4.9.0 20140128
(experimental) (GCC) 

make[1]: [check-parallel-gcc] Error 1 (ignored)
make[1]: Leaving directory `/export/build/gnu/gcc/build-x86_64-linux/gcc'

The problem is -march=k8 is placed after -march=core2:

[hjl@gnu-18 gcc]$  grep gcc.target/i386/sse2-init-v2di-2.c
testsuite/gcc/gcc.log 
Executing on host: /export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc/build-x86_64-linux/gcc/
/export/gnu/import/git/gcc/gcc/testsuite/gcc.target/i386/sse2-init-v2di-2.c 
-fno-diagnostics-show-caret -fdiagnostics-color=never  -O2 -msse4 -march=core2
-dp -ffat-lto-objects -S  -march=k8 -o sse2-init-v2di-2.s    (timeout = 300)
spawn -ignore SIGHUP /export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc/build-x86_64-linux/gcc/
/export/gnu/import/git/gcc/gcc/testsuite/gcc.target/i386/sse2-init-v2di-2.c
-fno-diagnostics-show-caret -fdiagnostics-color=never -O2 -msse4 -march=core2
-dp -ffat-lto-objects -S -march=k8 -o sse2-init-v2di-2.s
PASS: gcc.target/i386/sse2-init-v2di-2.c (test for excess errors)
FAIL: gcc.target/i386/sse2-init-v2di-2.c scan-assembler-times vec_concatv2di/3
1
[hjl@gnu-18 gcc]$ 

It is done by target.exp in dejagnu:

    if {[board_info $dest exists multilib_flags]} {
        append add_flags " [board_info $dest multilib_flags]"
    }

It doesn't work well with such gcc testcases.  It works if we change it to

    if {[board_info $dest exists multilib_flags]} {
        set add_flags "[board_info $dest multilib_flags] $add_flags"
    }


             reply	other threads:[~2014-01-28 21:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-28 21:11 hjl.tools at gmail dot com [this message]
2015-02-13 16:18 ` [Bug testsuite/59971] " hjl.tools at gmail dot com
2015-04-22 12:02 ` jakub at gcc dot gnu.org
2015-04-22 16:42 ` hjl.tools at gmail dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-59971-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).