]>
Commit | Line | Data |
---|---|---|
213516ef | 1 | # Copyright 1997-2023 Free Software Foundation, Inc. |
c906108c SS |
2 | |
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 | |
e22f8b7c | 5 | # the Free Software Foundation; either version 3 of the License, or |
c906108c | 6 | # (at your option) any later version. |
e22f8b7c | 7 | # |
c906108c SS |
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. | |
e22f8b7c | 12 | # |
c906108c | 13 | # You should have received a copy of the GNU General Public License |
e22f8b7c | 14 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
c906108c | 15 | |
c906108c | 16 | |
f8b41b00 | 17 | standard_testfile |
c906108c | 18 | |
c906108c SS |
19 | # This test must be compiled with -O2 if using gcc. |
20 | ||
f8b41b00 | 21 | set options debug |
65a33d75 | 22 | if {[test_compiler_info gcc-*-*]} { |
f8b41b00 | 23 | lappend options additional_flags=-O2 additional_flags=-fno-inline |
c906108c SS |
24 | } |
25 | ||
5b362f04 | 26 | if {[prepare_for_testing "failed to prepare" $testfile $srcfile $options]} { |
f8b41b00 TT |
27 | return -1 |
28 | } | |
c906108c | 29 | |
65a33d75 | 30 | if {[runto middle]} { |
c906108c | 31 | # PR 3016 |
44097287 FN |
32 | # warning: Hit heuristic-fence-post without finding |
33 | # warning: enclosing function for pc 0x1006ead0 | |
65a33d75 | 34 | if {[test_compiler_info gcc-*-*]} { |
3831839c | 35 | setup_xfail "mips64*-*-elf" |
c906108c | 36 | } |
44097287 FN |
37 | # The call chain is main -> top -> middle. But gcc can optimize a tail |
38 | # call to a jump, so the stack may contain either main -> top -> middle | |
39 | # or main -> middle. | |
40 | gdb_test "backtrace" "#0.*middle.*#\[12\].*main.*" | |
c906108c SS |
41 | } |
42 | return 0 |