public static void registerReferenceToGlobalVariable(Symbol variablename) {
    if (((TranslationUnit)(Stella.$CURRENTTRANSLATIONUNIT$.get())) != null) {
      { GlobalVariable global = variablename.lookupGlobalVariable();
        List referencedglobals = ((TranslationUnit)(Stella.$CURRENTTRANSLATIONUNIT$.get())).referencedGlobals;

        if ((global != null) &&
            (!referencedglobals.memberP(global))) {
          referencedglobals.insert(global);
        }
      }
    }
  }