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]

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


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