* lib/ubsan-dg.exp (check_effective_target_fsanitize_undefined):
[official-gcc.git] / gcc / testsuite / lib / lto.exp
blob5182558c7b72cf5974144ba8ce75591c0483ca32
1 # Copyright (C) 2009-2014 Free Software Foundation, Inc.
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 3 of the License, or
6 # (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with GCC; see the file COPYING3. If not see
15 # <http://www.gnu.org/licenses/>.
17 # Contributed by Diego Novillo <dnovillo@google.com>
19 # Prune messages that aren't useful.
21 proc lto_prune_warns { text } {
23 verbose "lto_prune_warns: entry: $text" 2
25 # Many tests that use visibility will still pass on platforms that don't support it.
26 regsub -all "(^|\n)\[^\n\]*: warning: visibility attribute not supported in this configuration; ignored\[^\n\]*" $text "" text
28 # Allow mixed-language LTO tests to pass with make check-c++0x
29 regsub -all "(^|\n)\[^\n\]*: warning: command line option '-std=\[^\n\]*" $text "" text
31 # And any stray location lines.
32 regsub -all "(^|\n)\[^\n\]*: In function \[^\n\]*" $text "" text
33 regsub -all "(^|\n)In file included from \[^\n\]*" $text "" text
34 regsub -all "(^|\n)\[ \t\]*from \[^\n\]*" $text "" text
36 # Sun ld warns about common symbols with differing sizes. Unlike GNU ld
37 # --warn-common (off by default), they cannot be disabled.
38 regsub -all "(^|\n)ld: warning: symbol \[`'\]\[^\n\]*' has differing sizes:" $text "" text
39 regsub -all "(^|\n)\[ \t\]*\[\(\]file \[^\n\]* value=\[^\n\]*; file \[^\n\]* value=\[^\n\]*\[)\];" $text "" text
40 regsub -all "(^|\n)\[ \t\]*\[^\n\]* definition taken" $text "" text
42 verbose "lto_prune_warns: exit: $text" 2
44 return $text
47 # lto_init -- called at the start of each subdir of tests
49 proc lto_init { args } {
50 global LTO_OPTIONS
52 if {[info exists args] && $args == "no-mathlib"} {
53 global board_info
54 global saved_mathlib
56 set dest [target_info name]
57 if [board_info $dest exists mathlib] {
58 set saved_mathlib [board_info $dest mathlib]
60 set board_info($dest,mathlib) " "
63 # Each test is run with the compiler options from this list.
64 # The default option lists can be overridden by LTO_OPTIONS="[list
65 # {opts_1} {opts_2}... {opts_n}]" where opts_i are lists of options.
66 # You can put this in the environment before site.exp is written or
67 # add it to site.exp directly.
68 if ![info exists LTO_OPTIONS] {
69 if [check_linker_plugin_available] {
70 set LTO_OPTIONS [list \
71 {-O0 -flto -flto-partition=none -fuse-linker-plugin} \
72 {-O2 -flto -flto-partition=none -fuse-linker-plugin -fno-fat-lto-objects } \
73 {-O0 -flto -flto-partition=1to1 -fno-use-linker-plugin } \
74 {-O2 -flto -flto-partition=1to1 -fno-use-linker-plugin } \
75 {-O0 -flto -fuse-linker-plugin -fno-fat-lto-objects } \
76 {-O2 -flto -fuse-linker-plugin} \
78 } else {
79 set LTO_OPTIONS [list \
80 {-O0 -flto -flto-partition=none } \
81 {-O2 -flto -flto-partition=none } \
82 {-O0 -flto -flto-partition=1to1 } \
83 {-O2 -flto -flto-partition=1to1 } \
84 {-O0 -flto } \
85 {-O2 -flto} \
92 # lto_finish -- called at the end of each subdir of tests if mathlib is
93 # changed.
96 proc lto_finish { } {
97 global board_info
98 global saved_mathlib
100 set dest [target_info name]
101 if [info exists saved_mathlib] {
102 set board_info($dest,mathlib) $saved_mathlib
103 } elseif [board_info $dest exists mathlib] {
104 unset board_info($dest,mathlib)
108 # Subsets of tests can be selectively disabled by members of this list:
109 # - ATTRIBUTE: disable all tests using the __attribute__ extension,
110 # - COMPLEX: disable all tests using the complex types feature,
111 # - COMPLEX_INT: disable all tests using the complex integral types extension,
112 # - VA: disable all tests using the variable number of arguments feature,
113 # - VLA_IN_STRUCT: disable all tests using the variable-length arrays as
114 # structure members extension,
115 # - ZERO_ARRAY: disable all tests using the zero-sized arrays extension.
116 # The default skip lists can be overriden by
117 # LTO_SKIPS="[list {skip_1}...{skip_n}]"
118 # where skip_i are skip identifiers. You can put this in the environment
119 # before site.exp is written or add it to site.exp directly.
120 if ![info exists LTO_SKIPS] {
121 set LTO_SKIPS [list {}]
124 global lto_skip_list
125 set lto_skip_list $LTO_SKIPS
127 load_lib dg.exp
128 load_lib gcc-dg.exp
129 load_lib gcc.exp
131 # lto-obj -- compile to an object file
133 # SOURCE is the source file
134 # DEST is the object file
135 # OPTALL is the list of compiler options to use with all tests
136 # OPTFILE is the list of compiler options to use with this file
137 # OPTSTR is the options to print with test messages
138 # XFAILDATA is the xfail data to be passed to the compiler
139 proc lto-obj { source dest optall optfile optstr xfaildata } {
140 global testcase
141 global tool
142 global compiler_conditional_xfail_data
143 global lto_skip_list
145 # Add the skip specifiers.
146 foreach skip $lto_skip_list {
147 if { ![string match $skip ""] } {
148 lappend optall "-DSKIP_$skip"
152 # Set up the options for compiling this file.
153 set options ""
154 lappend options "additional_flags=$optall $optfile"
156 set compiler_conditional_xfail_data $xfaildata
158 # Allow C source files to mix freely with other languages
159 if [ string match "*.c" $source ] then {
160 set comp_output [gcc_target_compile "$source" "$dest" object $options]
161 } else {
162 set comp_output [${tool}_target_compile "$source" "$dest" object $options]
164 # Prune unimportant visibility warnings before checking output.
165 set comp_output [lto_prune_warns $comp_output]
166 ${tool}_check_compile "$testcase $dest assemble" $optstr $dest $comp_output
169 # lto-link-and-maybe-run -- link the object files and run the executable
170 # if compile_type is set to "run"
172 # TESTNAME is the mixture of object files to link
173 # OBJLIST is the list of object files to link
174 # DEST is the name of the executable
175 # OPTALL is a list of compiler and linker options to use for all tests
176 # OPTFILE is a list of compiler and linker options to use for this test
177 # OPTSTR is the list of options to list in messages
178 proc lto-link-and-maybe-run { testname objlist dest optall optfile optstr } {
179 global testcase
180 global tool
181 global compile_type
182 global board_info
184 # Check that all of the objects were built successfully.
185 foreach obj [split $objlist] {
186 if ![file_on_host exists $obj] then {
187 unresolved "$testcase $testname link $optstr"
188 unresolved "$testcase $testname execute $optstr"
189 return
193 # Set up the options for linking this test.
194 set options ""
195 lappend options "additional_flags=$optall $optfile"
197 set target_board [target_info name]
198 set relocatable 0
200 # Some LTO tests do relocatable linking. Some target boards set
201 # a linker script which can't be used for relocatable linking.
202 # Use the default linker script instead.
203 if { [lsearch -exact [split "$optall $optfile"] "-r"] >= 0 } {
204 set relocatable 1
207 if { $relocatable } {
208 set saved_ldscript [board_info $target_board ldscript]
209 set board_info($target_board,ldscript) ""
212 # Link the objects into an executable.
213 set comp_output [${tool}_target_compile "$objlist" $dest executable \
214 "$options"]
216 if { $relocatable } {
217 set board_info($target_board,ldscript) $saved_ldscript
220 # Prune unimportant visibility warnings before checking output.
221 set comp_output [lto_prune_warns $comp_output]
223 if ![${tool}_check_compile "$testcase $testname link" $optstr \
224 $dest $comp_output] then {
225 unresolved "$testcase $testname execute $optstr"
226 return
229 # Return if we only needed to link.
230 if { ![string compare "link" $compile_type] } {
231 return
234 # Run the self-checking executable.
235 if ![string match "*/*" $dest] then {
236 set dest "./$dest"
238 set result [${tool}_load $dest "" ""]
239 set status [lindex $result 0]
240 if { $status == "pass" } then {
241 file_on_host delete $dest
243 $status "$testcase $testname execute $optstr"
246 # lto-get-options-main -- get target requirements for a test and
247 # options for the primary source file and the test as a whole
249 # SRC is the full pathname of the primary source file.
250 proc lto-get-options-main { src } {
251 global compile_type
252 global dg-extra-ld-options
253 global dg-suppress-ld-options
255 set dg-extra-ld-options ""
256 set dg-suppress-ld-options ""
258 # dg-options sets a variable called dg-extra-tool-flags.
259 set dg-extra-tool-flags ""
261 # dg-options sets a variable called tool_flags.
262 set tool_flags ""
264 # dg-require-* sets dg-do-what.
265 upvar dg-do-what dg-do-what
266 upvar dg-final-code dg-final-code
267 set dg-final-code ""
269 set tmp [dg-get-options $src]
270 verbose "getting options for $src: $tmp"
271 foreach op $tmp {
272 set cmd [lindex $op 0]
273 verbose "cmd is $cmd"
274 if { [string match "dg-skip-if" $cmd] \
275 || [string match "dg-require-*" $cmd] } {
276 set status [catch "$op" errmsg]
277 if { $status != 0 } {
278 perror "src: $errmsg for \"$op\"\n"
279 unresolved "$src: $errmsg for \"$op\""
280 return
282 } elseif { [string match "dg-lto-options" $cmd] } {
283 set op [lreplace $op 0 0 "dg-options"]
284 set status [catch "$op" errmsg]
285 if { $status != 0 } {
286 perror "src: $errmsg for \"$op\"\n"
287 unresolved "$src: $errmsg for \"$op\""
288 return
290 } elseif { ![string compare "dg-xfail-if" $cmd] \
291 || ![string compare "dg-options" $cmd] } {
292 warning "lto.exp does not support $cmd in primary source file"
293 } elseif { ![string compare "dg-lto-do" $cmd] } {
294 if { [llength $op] > 3 } {
295 set kw [lindex [lindex $op 3] 0]
296 if [string match "target" $kw] {
297 perror "$src: dg-lto-do does not support \"target\""
298 } elseif [string match "xfail" $kw] {
299 perror "$src: dg-lto-do does not support \"xfail\""
300 } else {
301 perror "$src: dg-lto-do takes a single argument"
304 set dgdo [lindex $op 2]
305 verbose "dg-lto-do command for \"$op\" is $dgdo"
306 if { ![string compare "assemble" $dgdo] } {
307 set compile_type "assemble"
308 } elseif { ![string compare "run" $dgdo] } {
309 set compile_type "run"
310 } elseif { ![string compare "link" $dgdo] } {
311 set compile_type "link"
312 } else {
313 warning "lto.exp does not support dg-lto-do $dgdo"
315 } elseif { ![string compare "dg-extra-ld-options" $cmd] } {
316 if { [llength $op] > 4 } {
317 error "[lindex $op 0]: too many arguments"
318 } else {
319 if { [llength $op] == 3
320 || ([llength $op] > 3
321 && [dg-process-target [lindex $op 3]] == "S") } {
322 set dg-extra-ld-options [lindex $op 2]
323 verbose \
324 "dg-extra-ld-options for main is ${dg-extra-ld-options}"
327 } elseif { ![string compare "dg-suppress-ld-options" $cmd] } {
328 if { [llength $op] > 4 } {
329 error "[lindex $op 0]: too many arguments"
330 } else {
331 if { [llength $op] == 3
332 || ([llength $op] > 3
333 && [dg-process-target [lindex $op 3]] == "S") } {
334 set dg-suppress-ld-options [lindex $op 2]
335 verbose \
336 "dg-suppress-ld-options for main is ${dg-suppress-ld-options}"
339 } elseif { ![string compare "dg-final" $cmd] } {
340 if { [llength $op] > 3 } {
341 error "[lindex $op 0]: too many arguments"
342 } else {
343 append dg-final-code "[lindex $op 2]\n"
345 } else {
346 # Ignore unrecognized dg- commands, but warn about them.
347 warning "lto.exp does not support $cmd"
351 # Return flags to use for compiling the primary source file and for
352 # linking.
353 verbose "dg-extra-tool-flags for main is ${dg-extra-tool-flags}"
354 return ${dg-extra-tool-flags}
358 # lto-get-options -- get special tool flags to use for a secondary
359 # source file
361 # SRC is the full pathname of the source file.
362 # The result is a list of options to use.
364 # This code is copied from proc dg-test in dg.exp from DejaGNU.
365 proc lto-get-options { src } {
366 # dg-options sets a variable called dg-extra-tool-flags.
367 set dg-extra-tool-flags ""
369 # dg-xfail-if sets compiler_conditional_xfail_data.
370 global compiler_conditional_xfail_data
371 set compiler_conditional_xfail_data ""
373 # dg-xfail-if needs access to dg-do-what.
374 upvar dg-do-what dg-do-what
376 set tmp [dg-get-options $src]
377 foreach op $tmp {
378 set cmd [lindex $op 0]
379 if { ![string compare "dg-options" $cmd] \
380 || ![string compare "dg-xfail-if" $cmd] } {
381 set status [catch "$op" errmsg]
382 if { $status != 0 } {
383 perror "src: $errmsg for \"$op\"\n"
384 unresolved "$src: $errmsg for \"$op\""
385 return
387 } elseif { [string match "dg-require-*" $cmd] } {
388 warning "lto.exp does not support $cmd in secondary source files"
389 } else {
390 # Ignore unrecognized dg- commands, but warn about them.
391 warning "lto.exp does not support $cmd in secondary source files"
395 return ${dg-extra-tool-flags}
398 # lto-execute -- compile multi-file tests
400 # SRC1 is the full pathname of the main file of the testcase.
401 # SID identifies a test suite in the names of temporary files.
402 proc lto-execute { src1 sid } {
403 global srcdir tmpdir
404 global lto_option_list
405 global tool
406 global verbose
407 global testcase
408 global gluefile
409 global compiler_conditional_xfail_data
410 global dg-do-what-default
411 global compile_type
412 global dg-extra-ld-options
413 global dg-suppress-ld-options
414 global LTO_OPTIONS
415 global dg-final-code
416 global testname_with_flags
418 # Get extra flags for this test from the primary source file, and
419 # process other dg-* options that this suite supports. Warn about
420 # unsupported flags.
421 verbose "lto-execute: $src1" 1
422 set compile_type "run"
423 set dg-do-what [list ${dg-do-what-default} "" P]
424 set extra_flags(0) [lto-get-options-main $src1]
425 set compile_xfail(0) ""
427 # If the main file defines dg-options, those flags are used to
428 # overwrite the default lto_option_list taken from LTO_OPTIONS.
429 if { [string length $extra_flags(0)] > 0 } {
430 set lto_option_list $extra_flags(0)
431 set extra_flags(0) ""
432 } else {
433 set lto_option_list $LTO_OPTIONS
436 # Set up the names of the other source files.
437 set dir [file dirname $src1]
438 set base [file rootname $src1]
439 set base [string range $base [string length $dir] end]
440 regsub "_0" $base "" base
441 regsub "/" $base "" base
442 set src_list $src1
443 set i 1
444 set done 0
445 while { !$done } {
446 set names [glob -nocomplain -types f -- "${dir}/${base}_${i}.*"]
447 if { [llength ${names}] > 1 } {
448 warning "lto-execute: more than one file matched ${dir}/${base}_${i}.*"
450 if { [llength ${names}] == 1 } {
451 lappend src_list [lindex ${names} 0]
452 incr i
453 } else {
454 set num_srcs ${i}
455 set done 1
459 # Use the dg-options mechanism to specify extra flags for each
460 # of the secondary files.
461 # The extra flags in each file are used to compile that file, and the
462 # extra flags in *_0.* are also used for linking.
463 verbose "\tsrc_list is: $src_list"
464 for {set i 1} {$i < $num_srcs} {incr i} {
465 set extra_flags($i) [lto-get-options [lindex $src_list $i]]
466 set compile_xfail($i) $compiler_conditional_xfail_data
469 # Define the names of the object files.
470 set obj_list ""
471 for {set i 0} {$i < $num_srcs} {incr i} {
472 lappend obj_list "${sid}_${base}_${i}.o"
475 # Get the base name of this test, for use in messages.
476 set testcase [lindex ${src_list} 0]
478 # Remove the $srcdir and $tmpdir prefixes from $src1. (It would
479 # be possible to use "regsub" here, if we were careful to escape
480 # all regular expression characters in $srcdir and $tmpdir, but
481 # that would be more complicated that this approach.)
482 if {[string first "$srcdir/" "${testcase}"] == 0} {
483 set testcase [string range "${testcase}" [string length "$srcdir/"] end]
485 if {[string first "$tmpdir/" "$testcase"] == 0} {
486 set testcase [string range "$testcase" [string length "$tmpdir/"] end]
487 set testcase "tmpdir-$testcase"
489 # If we couldn't rip $srcdir out of `src1' then just do the best we can.
490 # The point is to reduce the unnecessary noise in the logs. Don't strip
491 # out too much because different testcases with the same name can confuse
492 # `test-tool'.
493 if [string match "/*" $testcase] then {
494 set testcase "[file tail [file dirname $src1]]/[file tail $src1]"
497 # Check whether this test is supported for this target.
498 if { [lindex ${dg-do-what} 1 ] == "N" } {
499 unsupported "$testcase"
500 verbose "$testcase not supported on this target, skipping it" 3
501 return
503 # Should be safe for non-fortran too but be paranoid..
504 if {$sid eq "f_lto"} {
505 list-module-names $src_list
507 regsub "_0.*" $testcase "" testcase
509 # Set up the base name of executable files so they'll be unique.
510 regsub -all "\[./\]" $testcase "-" execbase
512 # Loop through all of the option lists used for this test.
513 set count 0
514 foreach option $lto_option_list {
515 verbose "Testing $testcase, $option"
517 # There's a unique name for each executable we generate.
518 set execname "${execbase}-${count}1.exe"
519 incr count
521 file_on_host delete $execname
523 # Compile pieces with the compiler under test.
524 set i 0
525 foreach src $src_list obj $obj_list {
526 lto-obj $src $obj $option $extra_flags($i) $option \
527 $compile_xfail($i)
528 incr i
531 # Link (using the compiler under test), run, and clean up tests.
532 if { ![string compare "run" $compile_type] \
533 || ![string compare "link" $compile_type] } {
535 # Filter out any link options we were asked to suppress.
536 set reduced {}
537 foreach x [split $option] {
538 if {[lsearch ${dg-suppress-ld-options} $x] == -1} {
539 lappend reduced $x
542 set filtered [join $reduced " "]
544 lto-link-and-maybe-run \
545 "[lindex $obj_list 0]-[lindex $obj_list end]" \
546 $obj_list $execname $filtered ${dg-extra-ld-options} \
547 $filtered
551 # Are there any further tests to perform?
552 # Note that if the program has special run-time requirements, running
553 # of the program can be delayed until here. Ditto for other situations.
554 # It would be a bit cumbersome though.
556 if ![string match ${dg-final-code} ""] {
557 regsub -all "\\\\(\[{}\])" ${dg-final-code} "\\1" dg-final-code
558 # Note that the use of `args' here makes this a varargs proc.
559 proc dg-final-proc { args } ${dg-final-code}
560 verbose "Running dg-final tests." 3
561 verbose "dg-final-proc:\n[info body dg-final-proc]" 4
562 if [catch "dg-final-proc $src1" errmsg] {
563 perror "$src1: error executing dg-final: $errmsg"
564 # ??? The call to unresolved here is necessary to clear
565 # `errcnt'. What we really need is a proc like perror that
566 # doesn't set errcnt. It should also set exit_status to 1.
567 unresolved "$src1: error executing dg-final: $errmsg"
571 # Clean up object files.
572 set files [glob -nocomplain ${sid}_*.o]
573 if { $files != "" } {
574 foreach objfile $files {
575 if { ![info exists gluefile] || $objfile != $gluefile } {
576 eval "file_on_host delete $objfile"
581 # Clean up after -save-temps. The LTO tests don't use dg-test, so
582 # testname-for-summary needs to be defined explicitly for each
583 # file that needs to be removed.
584 set testname_with_flags $execname
586 eval "cleanup-saved-temps"
588 for {set i 0} {$i < $num_srcs} {incr i} {
589 set testname_with_flags "${base}_${i}"
590 eval "cleanup-saved-temps"
591 set testname_with_flags "${sid}_${base}_${i}"
592 eval "cleanup-saved-temps"
595 unset testname_with_flags
597 if { ![string compare "run" $compile_type] \
598 || ![string compare "link" $compile_type] } {
599 file_on_host delete $execname
601 # Should be safe for non-fortran too but be paranoid..
602 if {$sid eq "f_lto"} {
603 cleanup-modules ""
608 # Utility for scanning a symbol in the final executable, invoked via dg-final.
609 # Call pass if pattern is present, otherwise fail.
611 # Argument 0 is the regexp to match.
612 # Argument 1 handles expected failures and the like
613 proc scan-symbol { args } {
614 global nm
615 global base_dir
616 upvar 2 execname execname
618 if { [llength $args] >= 2 } {
619 switch [dg-process-target [lindex $args 1]] {
620 "S" { }
621 "N" { return }
622 "F" { setup_xfail "*-*-*" }
623 "P" { }
627 # Find nm like we find g++ in g++.exp.
628 if ![info exists nm] {
629 set nm [findfile $base_dir/../../../binutils/nm \
630 $base_dir/../../../binutils/nm \
631 [findfile $base_dir/../../nm $base_dir/../../nm \
632 [findfile $base_dir/nm $base_dir/nm \
633 [transform nm]]]]
634 verbose -log "nm is $nm"
637 set output_file "[glob -nocomplain $execname]"
638 if { $output_file == "" } {
639 fail "scan-symbol $args: dump file does not exist"
640 return
643 set fd [open "| $nm $output_file" r]
644 set text [read $fd]
645 close $fd
647 if [regexp -- [lindex $args 0] $text] {
648 pass "scan-symbol $args"
649 } else {
650 fail "scan-symbol $args"
654 # Call pass if object readelf is ok, otherwise fail.
655 # example: /* { dg-final { object-readelf Tag_ABI_enum_size int} } */
656 proc object-readelf { args } {
657 global readelf
658 global base_dir
659 upvar 2 execname execname
661 if { [llength $args] < 2 } {
662 error "object-readelf: too few arguments"
663 return
665 if { [llength $args] > 3 } {
666 error "object-readelf: too many arguments"
667 return
669 if { [llength $args] >= 3 } {
670 switch [dg-process-target [lindex $args 2]] {
671 "S" { }
672 "N" { return }
673 "F" { setup_xfail "*-*-*" }
674 "P" { }
678 # Find size like we find g++ in g++.exp.
679 if ![info exists readelf] {
680 set readelf [findfile $base_dir/../../../binutils/readelf \
681 $base_dir/../../../binutils/readelf \
682 [findfile $base_dir/../../readelf $base_dir/../../readelf \
683 [findfile $base_dir/readelf $base_dir/readelf \
684 [transform readelf]]]]
685 verbose -log "readelf is $readelf"
688 set what [lindex $args 0]
689 set with [lindex $args 1]
691 if ![file_on_host exists $execname] {
692 verbose -log "$execname does not exist"
693 unresolved "object-readelf $what "
694 return
697 set output [remote_exec host "$readelf -A" "$execname"]
698 set status [lindex $output 0]
699 if { $status != 0 } {
700 verbose -log "object-readelf: $readelf failed"
701 unresolved "object-readelf $what $execname"
702 return
705 set text [lindex $output 1]
706 set lines [split $text "\n"]
708 set done 0
709 set i 0
710 while { !$done } {
711 set line_tex [lindex $lines $i]
712 if { [llength ${line_tex}] > 1} {
713 incr i
714 if [regexp -- $what $line_tex] {
715 set match [regexp -- $with $line_tex]
716 set done 1
718 } else {
719 set done 1
723 verbose -log "$what size is $with;"
724 if { $match == 1 } {
725 pass "object-readelf $what size is correct."
726 } else {
727 fail "object-readelf $what size is incorrect."