Hi! This very likely isn't the only instance of such a kind of problem in the GCC testsuite ;-) -- but it's one that I've run into, and analyzed: On 2011-09-27T19:23:22+0200, Jan Hubicka wrote: > this patch updates testsuite to cover both fat and slim LTO when linker plugin > is used [...] This change here: > *** lib/lto.exp (revision 179274) > --- lib/lto.exp (working copy) > *************** proc lto_init { args } { > *** 66,79 **** > # You can put this in the environment before site.exp is written or > # add it to site.exp directly. > if ![info exists LTO_OPTIONS] { > ! set LTO_OPTIONS [list \ > ! {-O0 -flto -flto-partition=none } \ > ! {-O2 -flto -flto-partition=none } \ > ! {-O0 -flto -flto-partition=1to1 } \ > ! {-O2 -flto -flto-partition=1to1 } \ > ! {-O0 -flto} \ > ! {-O2 -flto} \ > ! ] > } > } > > --- 66,89 ---- > # You can put this in the environment before site.exp is written or > # add it to site.exp directly. > if ![info exists LTO_OPTIONS] { > ! if [check_linker_plugin_available] { > ! set LTO_OPTIONS [list \ > ! {-O0 -flto -flto-partition=none -fuse-linker-plugin} \ > ! {-O2 -flto -flto-partition=none -fuse-linker-plugin -fno-fat-lto-objects } \ > ! {-O0 -flto -flto-partition=1to1 -fno-use-linker-plugin } \ > ! {-O2 -flto -flto-partition=1to1 -fno-use-linker-plugin } \ > ! {-O0 -flto -fuse-linker-plugin -fno-fat-lto-objects } \ > ! {-O2 -flto -fuse-linker-plugin} \ > ! ] > ! } else { > ! set LTO_OPTIONS [list \ > ! {-O0 -flto -flto-partition=none } \ > ! {-O2 -flto -flto-partition=none } \ > ! {-O0 -flto -flto-partition=1to1 } \ > ! {-O2 -flto -flto-partition=1to1 } \ > ! {-O0 -flto } \ > ! {-O2 -flto} \ > ! } > } > } ... is problematic: initializing the persistent 'LTO_OPTIONS' dependent on 'check_linker_plugin_available' that is (potentially) variable per testing variant ('RUNTESTFLAGS=--target_board=unix\{-m64,-m32\}', for example). Similarly: > *** lib/c-torture.exp (revision 179274) > --- lib/c-torture.exp (working copy) > *************** if [info exists ADDITIONAL_TORTURE_OPTIO > *** 52,61 **** > > set LTO_TORTURE_OPTIONS "" > if [check_effective_target_lto] { > ! set LTO_TORTURE_OPTIONS [list \ > ! { -O2 -flto -flto-partition=none } \ > ! { -O2 -flto } > ! ] > } > > global GCC_UNDER_TEST > --- 52,69 ---- > > set LTO_TORTURE_OPTIONS "" > if [check_effective_target_lto] { > ! # When having plugin test both slim and fat LTO and plugin/nonplugin > ! # path. > ! if [check_linker_plugin_available] { > ! set LTO_TORTURE_OPTIONS [list \ > ! { -O2 -flto -fno-use-linker-plugin -flto-partition=none } \ > ! { -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects } > ! ] > ! } else { > ! set LTO_TORTURE_OPTIONS [list \ > ! { -O2 -flto -flto-partition=none } \ > ! { -O2 -flto -fuse-linker-plugin } > ! } > } ..., and: > *** lib/gcc-dg.exp (revision 179274) > --- lib/gcc-dg.exp (working copy) > *************** if [info exists ADDITIONAL_TORTURE_OPTIO > *** 69,78 **** > > set LTO_TORTURE_OPTIONS "" > if [check_effective_target_lto] { > ! set LTO_TORTURE_OPTIONS [list \ > ! { -O2 -flto -flto-partition=none } \ > ! { -O2 -flto } > ! ] > } > > > --- 69,86 ---- > > set LTO_TORTURE_OPTIONS "" > if [check_effective_target_lto] { > ! # When having plugin test both slim and fat LTO and plugin/nonplugin > ! # path. > ! if [check_linker_plugin_available] { > ! set LTO_TORTURE_OPTIONS [list \ > ! { -O2 -flto -fno-use-linker-plugin -flto-partition=none } \ > ! { -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects } > ! ] > ! } else { > ! set LTO_TORTURE_OPTIONS [list \ > ! { -O2 -flto -flto-partition=none } \ > ! { -O2 -flto -fuse-linker-plugin } > ! } > } OK to push the attached "Let each 'lto_init' determine the default 'LTO_OPTIONS', and 'torture-init' the 'LTO_TORTURE_OPTIONS'"? Grüße Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955