|| sym->attr.if_source != IFSRC_DECL)
{
decl = gfc_get_extern_function_decl (sym);
- gfc_set_decl_location (decl, &sym->declared_at);
}
else
{
poplevel (1, 1);
BLOCK_SUPERCONTEXT (DECL_INITIAL (thunk_fndecl)) = thunk_fndecl;
DECL_SAVED_TREE (thunk_fndecl)
- = build3_v (BIND_EXPR, tmp, DECL_SAVED_TREE (thunk_fndecl),
- DECL_INITIAL (thunk_fndecl));
+ = fold_build3_loc (DECL_SOURCE_LOCATION (thunk_fndecl), BIND_EXPR,
+ void_type_node, tmp, DECL_SAVED_TREE (thunk_fndecl),
+ DECL_INITIAL (thunk_fndecl));
/* Output the GENERIC tree. */
dump_function (TDI_original, thunk_fndecl);
BLOCK_SUPERCONTEXT (DECL_INITIAL (fndecl)) = fndecl;
DECL_SAVED_TREE (fndecl)
- = build3_v (BIND_EXPR, decl, DECL_SAVED_TREE (fndecl),
- DECL_INITIAL (fndecl));
+ = fold_build3_loc (DECL_SOURCE_LOCATION (fndecl), BIND_EXPR, void_type_node,
+ decl, DECL_SAVED_TREE (fndecl), DECL_INITIAL (fndecl));
dump_function (TDI_original, fndecl);
cfun->function_end_locus = input_location;
BLOCK_SUPERCONTEXT (DECL_INITIAL (ftn_main)) = ftn_main;
DECL_SAVED_TREE (ftn_main)
- = build3_v (BIND_EXPR, decl, DECL_SAVED_TREE (ftn_main),
- DECL_INITIAL (ftn_main));
+ = fold_build3_loc (DECL_SOURCE_LOCATION (ftn_main), BIND_EXPR,
+ void_type_node, decl, DECL_SAVED_TREE (ftn_main),
+ DECL_INITIAL (ftn_main));
/* Output the GENERIC tree. */
dump_function (TDI_original, ftn_main);
BLOCK_SUPERCONTEXT (DECL_INITIAL (fndecl)) = fndecl;
DECL_SAVED_TREE (fndecl)
- = build3_v (BIND_EXPR, decl, DECL_SAVED_TREE (fndecl),
- DECL_INITIAL (fndecl));
+ = fold_build3_loc (DECL_SOURCE_LOCATION (fndecl), BIND_EXPR, void_type_node,
+ decl, DECL_SAVED_TREE (fndecl), DECL_INITIAL (fndecl));
/* Output the GENERIC tree. */
dump_function (TDI_original, fndecl);