1252867Sdelphij# Copyright 2014-2020 Free Software Foundation, Inc. 2252867Sdelphij 3252867Sdelphij# This program is free software; you can redistribute it and/or modify 4252867Sdelphij# it under the terms of the GNU General Public License as published by 5252867Sdelphij# the Free Software Foundation; either version 3 of the License, or 6252867Sdelphij# (at your option) any later version. 7252867Sdelphij# 8252867Sdelphij# This program is distributed in the hope that it will be useful, 9252867Sdelphij# but WITHOUT ANY WARRANTY; without even the implied warranty of 10252867Sdelphij# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11252867Sdelphij# GNU General Public License for more details. 12252867Sdelphij# 13252867Sdelphij# You should have received a copy of the GNU General Public License 14252867Sdelphij# along with this program. If not, see <http://www.gnu.org/licenses/>. 15252867Sdelphij 16252867Sdelphij# This file is part of the gdb testsuite 17252867Sdelphij 18252867Sdelphijif {[skip_cplus_tests]} { continue } 19252867Sdelphij 20252867Sdelphijstandard_testfile .cc 21252867Sdelphij 22252867Sdelphijif {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} { 23252867Sdelphij return -1 24252867Sdelphij} 25252867Sdelphij 26252867Sdelphijif {![runto_main]} { 27252867Sdelphij return -1 28252867Sdelphij} 29252867Sdelphij 30252867Sdelphijgdb_breakpoint [gdb_get_line_number "Break here"] 31252867Sdelphijgdb_continue_to_breakpoint "Break here" 32252867Sdelphij 33252867Sdelphijgdb_test "p g(f(12345))" ".* = 12345" "g(f())" 34252867Sdelphijgdb_test "p q(p())" ".* = {a = 12345678}" "q(p())" 35252867Sdelphijgdb_test "p p() + r()" ".* = {a = 22345678}" "p() + r()" 36252867Sdelphijgdb_test "p q(p() + r())" ".* = {a = 22345678}" "q(p() + r())" 37252867Sdelphijgdb_test "p g(f(6700) + f(89))" ".* = 6789" "g(f() + f())" 38252867Sdelphijgdb_test "p g(f(g(f(300) + f(40))) + f(5))" ".* = 345" \ 39252867Sdelphij "g(f(g(f() + f())) + f())" 40252867Sdelphijgdb_test "p getb(makeb(), 789)" ".* = 789" "getb(makeb(), ...)" 41252867Sdelphijgdb_test "p *c" ".* = {a = 5678}" "*c" 42252867Sdelphijgdb_test "p *c + *c" ".* = {a = 11356}" "*c + *c" 43252867Sdelphijgdb_test "p q(*c + *c)" ".* = {a = 11356}" "q(*c + *c)" 44252867Sdelphijgdb_test "p make_int().get_type ()" ".* = INT" "make_int().get_type ()" 45252867Sdelphij