This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: Include TOOL_OPTIONS in check-flags
- From: Matthew Sachs <matthewg at zevils dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Matthew Sachs <msachs at apple dot com>
- Date: Fri, 9 Jun 2006 19:06:11 -0400
- Subject: PATCH: Include TOOL_OPTIONS in check-flags
TOOL_OPTIONS are not currently checked by check-flags, which is used
for e.g. dg-skip-if. This means that tests which do something like /
* { dg-skip-if "" { *-*-* } { "-m64" } { "" } } */ will not be
skipped if -m64 is included via runtest --tool_opts="-m64".
Tested by doing:
cd gcc/testsuite
mkdir test.dg
cp gcc.dg/dg.exp test.dg
cat > gcc.dg/a.c <<EOF
/* { dg-do compile } */
/* { dg-skip-if "" { *-*-* } { "-m64" } { "" } } */
void foo() {}
EOF
grep -v dg-skip-if gcc.dg/a.c > gcc.dg/b.c
/usr/src/dejagnu-1.4.4/runtest --tool gcc --tool_opts="-m64" test.dg/
dg.exp
# Check that both tests pass.
# Apply patch.
/usr/src/dejagnu-1.4.4/runtest --tool gcc --tool_opts="-m64" test.dg/
dg.exp
# Check the a is UNSUPPORTED and b is PASS.
/usr/src/dejagnu-1.4.4/runtest --tool gcc test.dg/dg.exp
# Check that a and b are both PASS.
OK to commit? ChangeLog:
2006-06-09 Matthew Sachs <msachs@apple.com>
* lib/target-supports-dg.exp (check-flags): Include TOOL_OPTIONS in
the list of compiler flags; this causes those flags to be checked
for things like dg-skip-if.
Attachment:
check-flags.diff.txt
Description: Text document