summaryrefslogtreecommitdiff
path: root/gcc/doc/sourcebuild.texi
diff options
context:
space:
mode:
authorjanis <janis@138bc75d-0d04-0410-961f-82ee72b054a4>2010-03-03 22:05:30 +0000
committerjanis <janis@138bc75d-0d04-0410-961f-82ee72b054a4>2010-03-03 22:05:30 +0000
commit6f49fb50853915b404a15265f0219ddaf98c4fe7 (patch)
treeb7aef3740414b72a1357ba8c9a64141be8bc2c72 /gcc/doc/sourcebuild.texi
parent233f4f25baa3847c23b3862f6b3bdc7691199a53 (diff)
downloadgcc-6f49fb50853915b404a15265f0219ddaf98c4fe7.tar.gz
* doc/sourcebuild.texi (Test directives): Document that arguments
include-opts and exclude-opts are now optional for dg-skip-if, dg-xfail-if, dg-xfail-run-if, and dg-shouldfail. * lib/target-supports-dg.exp (check-flags): Provide defaults for include-opts and exclude-opts; skip checking the flags if arguments are the same as the defaults. (dg-xfail-if): Verify the number of arguments, supply defaults for unspecified optional arguments. (dg-skip-if, dg-xfail-run-if): Verify the number of arguments. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157206 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/doc/sourcebuild.texi')
-rw-r--r--gcc/doc/sourcebuild.texi14
1 files changed, 8 insertions, 6 deletions
diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
index 033615bddf3..ee5545850ea 100644
--- a/gcc/doc/sourcebuild.texi
+++ b/gcc/doc/sourcebuild.texi
@@ -1019,7 +1019,7 @@ the test
@item 300
@end itemize
-@item @{ dg-skip-if @var{comment} @{ @var{selector} @} @{ @var{include-opts} @} @{ @var{exclude-opts} @} @}
+@item @{ dg-skip-if @var{comment} @{ @var{selector} @} [@{ @var{include-opts} @} [@{ @var{exclude-opts} @}]] @}
Arguments @var{include-opts} and @var{exclude-opts} are lists in which
each element is a string of zero or more GCC options.
Skip the test if all of the following conditions are met:
@@ -1029,11 +1029,13 @@ Skip the test if all of the following conditions are met:
@item for at least one of the option strings in @var{include-opts},
every option from that string is in the set of options with which
the test would be compiled; use @samp{"*"} for an @var{include-opts} list
-that matches any options
+that matches any options; that is the default if @var{include-opts} is
+not specified
@item for each of the option strings in @var{exclude-opts}, at least one
option from that string is not in the set of options with which the test
-would be compiled; use @samp{""} for an empty @var{exclude-opts} list
+would be compiled; use @samp{""} for an empty @var{exclude-opts} list;
+that is the default if @var{exclude-opts} is not specified
@end itemize
For example, to skip a test if option @code{-Os} is present:
@@ -1067,11 +1069,11 @@ but not if @code{-fpic} is also present:
/* @{ dg-skip-if "" @{ *-*-* @} @{ "-O2 -g" "-O3 -g" @} @{ "-fpic" @} @} */
@end smallexample
-@item @{ dg-xfail-if @var{comment} @{ @var{selector} @} @{ @var{include-opts} @} @{ @var{exclude-opts} @} @}
+@item @{ dg-xfail-if @var{comment} @{ @var{selector} @} [@{ @var{include-opts} @} [@{ @var{exclude-opts} @}]] @}
Expect the test to fail if the conditions (which are the same as for
@code{dg-skip-if}) are met. This does not affect the execute step.
-@item @{ dg-xfail-run-if @var{comment} @{ @var{selector} @} @{ @var{include-opts} @} @{ @var{exclude-opts} @} @}
+@item @{ dg-xfail-run-if @var{comment} @{ @var{selector} @} [@{ @var{include-opts} @} [@{ @var{exclude-opts} @}]] @}
Expect the execute step of a test to fail if the conditions (which are
the same as for @code{dg-skip-if}) and @code{dg-xfail-if}) are met.
@@ -1089,7 +1091,7 @@ is not covered by the effective-target keyword.
This directive must appear after any @code{dg-do} directive in the test
and before any @code{dg-additional-sources} directive.
-@item @{ dg-shouldfail @var{comment} @{ @var{selector} @} @{ @var{include-opts} @} @{ @var{exclude-opts} @} @}
+@item @{ dg-shouldfail @var{comment} [@{ @var{selector} @} [@{ @var{include-opts} @} [@{ @var{exclude-opts} @}]]] @}
Expect the test executable to return a nonzero exit status if the
conditions (which are the same as for @code{dg-skip-if}) are met.