]> sourceware.org Git - systemtap.git/commitdiff
2005-09-12 Frank Ch. Eigler <fche@elastic.org>
authorfche <fche>
Tue, 13 Sep 2005 00:45:24 +0000 (00:45 +0000)
committerfche <fche>
Tue, 13 Sep 2005 00:45:24 +0000 (00:45 +0000)
PR 1335
* translate.cxx (c_tmpcounter::visit_functioncall): Correct
recursion sequence.
* testsuite/buildok/nineteen.stp: New test case.

ChangeLog
testsuite/buildok/nineteen.stp [new file with mode: 0755]
translate.cxx

index d08f6202b3b1532b2c6e813dac5fe52771f1f96b..e91f1b1adea677b507dbdd7913e7624ec4c56eb0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-09-12  Frank Ch. Eigler  <fche@elastic.org>
+
+       PR 1335
+       * translate.cxx (c_tmpcounter::visit_functioncall): Correct
+       recursion sequence.
+       * testsuite/buildok/nineteen.stp: New test case.
+
 2005-09-12  Graydon Hoare  <graydon@redhat.com>
 
        PR 1306
diff --git a/testsuite/buildok/nineteen.stp b/testsuite/buildok/nineteen.stp
new file mode 100755 (executable)
index 0000000..be12b6f
--- /dev/null
@@ -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()
+}
index 6b00cd9e65ed486ff2c0162569fe3963fb28807a..9f057043de8a17a4ca3f1dbb25266914a7409572 100644 (file)
@@ -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; i<e->args.size(); i++)
-    e->args[i]->visit (this);
 }
 
 
This page took 0.184659 seconds and 5 git commands to generate.