The following implements -fdump-tree-original dumping for cobol,
mimicing what the D frontend does.
gcc/cobol/
* gengen.cc (gg_finalize_function): Dump to TDI_original.
#include "cbldiag.h"
#include "symbols.h"
#include "gengen.h"
+#include "dumpfile.h"
// We are limiting the programmer to functions with 512 or fewer arguments.
// Don't like it? Cry me a river.
cgraph_node::finalize_function (current_function->function_decl, true);
}
+ dump_function (TDI_original, current_function->function_decl);
+
if( gg_trans_unit.function_stack.back().context_count )
{
cbl_internal_error("Residual context count!");