From bf9bd203c3acd94614b93ba0187148a1deda043c Mon Sep 17 00:00:00 2001 From: fche Date: Tue, 13 Sep 2005 00:45:24 +0000 Subject: [PATCH] 2005-09-12 Frank Ch. Eigler PR 1335 * translate.cxx (c_tmpcounter::visit_functioncall): Correct recursion sequence. * testsuite/buildok/nineteen.stp: New test case. --- ChangeLog | 7 +++++++ testsuite/buildok/nineteen.stp | 21 +++++++++++++++++++++ translate.cxx | 4 +--- 3 files changed, 29 insertions(+), 3 deletions(-) create mode 100755 testsuite/buildok/nineteen.stp diff --git a/ChangeLog b/ChangeLog index d08f6202b..e91f1b1ad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-09-12 Frank Ch. Eigler + + PR 1335 + * translate.cxx (c_tmpcounter::visit_functioncall): Correct + recursion sequence. + * testsuite/buildok/nineteen.stp: New test case. + 2005-09-12 Graydon Hoare PR 1306 diff --git a/testsuite/buildok/nineteen.stp b/testsuite/buildok/nineteen.stp new file mode 100755 index 000000000..be12b6f73 --- /dev/null +++ b/testsuite/buildok/nineteen.stp @@ -0,0 +1,21 @@ +#! stap -p4 + +function msg1 (x) { + log(x) +} +function msg2 (x,y) { + log(x." ".y) +} + +probe begin { + msg1("55"); + msg1(string(55)) + + msg2("100", "GOOD") + msg2("GOOD", string(100)) + +# the next line caused a compile failure when uncommented; PR 1335 + msg2(string(100), "GOOD") + + exit() +} diff --git a/translate.cxx b/translate.cxx index 6b00cd9e6..9f057043d 100644 --- a/translate.cxx +++ b/translate.cxx @@ -2259,10 +2259,8 @@ c_tmpcounter::visit_functioncall (functioncall *e) { tmpvar t = parent->gensym (r->formal_args[i]->type); t.declare (*parent); + e->args[i]->visit (this); } - - for (unsigned i=0; iargs.size(); i++) - e->args[i]->visit (this); } -- 2.43.5