aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/lib/lto.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/lib/lto.exp')
-rw-r--r--gcc/testsuite/lib/lto.exp10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/lib/lto.exp b/gcc/testsuite/lib/lto.exp
index 7f2d7ecec83..cccd64220bc 100644
--- a/gcc/testsuite/lib/lto.exp
+++ b/gcc/testsuite/lib/lto.exp
@@ -191,6 +191,16 @@ proc lto-get-options-main { src } {
|| ![string compare "dg-options" $cmd] } {
warning "lto.exp does not support $cmd in primary source file"
} elseif { ![string compare "dg-lto-do" $cmd] } {
+ if { [llength $op] > 3 } {
+ set kw [lindex [lindex $op 3] 0]
+ if [string match "target" $kw] {
+ perror "$src: dg-lto-do does not support \"target\""
+ } elseif [string match "xfail" $kw] {
+ perror "$src: dg-lto-do does not support \"xfail\""
+ } else {
+ perror "$src: dg-lto-do takes a single argument"
+ }
+ }
set dgdo [lindex $op 2]
verbose "dg-lto-do command for \"$op\" is $dgdo"
if { ![string compare "assemble" $dgdo] } {