@@ -140,8 +140,16 @@ proc gfortran-dg-runtest { testcases fla
# we cycle through the option list, otherwise we don't
if [expr [search_for $test "dg-do run"]] {
set option_list $torture_with_loops
+ if [check_effective_target_lto] {
+ lappend option_list { -g -flto }
+ # lappend option_list { -g -O3 -fwhole-program -flto }
+ }
} else {
set option_list [list { -O } ]
+ # if [check_effective_target_lto] {
+ # lappend option_list { -g -flto }
+ # lappend option_list { -g -O3 -fwhole-program -flto }
+ # }
}
set nshort [file tail [file dirname $test]]/[file tail $test]