]> sourceware.org Git - systemtap.git/commitdiff
PR18455: globals type_details are null in initial typres
authorAbegail Jakop <ajakop@redhat.com>
Wed, 9 Sep 2015 19:53:48 +0000 (15:53 -0400)
committerAbegail Jakop <ajakop@redhat.com>
Wed, 23 Sep 2015 21:39:16 +0000 (17:39 -0400)
elaborate.cxx: in the intial type pass, follow semantic_pass_types()
and set globals' type_details to null, since globals are not supposed
to have detailed types. this fixes the semko/autocast05.stp failure.

elaborate.cxx

index c616b8406779ac56004d78672ac49d696758cd99..aca7dab1ca37d6f8442598697920d599640c0903 100644 (file)
@@ -4789,9 +4789,19 @@ struct initial_typeresolution_info : public typeresolution_info
 
 static void initial_typeres_pass(systemtap_session& s)
 {
-  // an initial type analysis pass. just go over the functions
-  // and probe bodies with doing too much
+  // minimal type resolution based off of semantic_pass_types(), without
+  // checking for complete type resolutions or autocast expanding
   initial_typeresolution_info ti(s);
+
+  // Globals never have detailed types.
+  // If we null them now, then all remaining vardecls can be detailed.
+  for (unsigned j=0; j<s.globals.size(); j++)
+    {
+      vardecl* gd = s.globals[j];
+      if (!gd->type_details)
+        gd->type_details = ti.null_type;
+    }
+
   ti.assert_resolvability = false;
   while (1)
     {
This page took 0.036483 seconds and 5 git commands to generate.