diff options
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r-- | gcc/tree-cfg.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index aaf390b..f59a0c0 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -7972,14 +7972,19 @@ dump_function_to_file (tree fndecl, FILE *file, dump_flags_t flags) && decl_is_tm_clone (fndecl)); struct function *fun = DECL_STRUCT_FUNCTION (fndecl); - if (DECL_ATTRIBUTES (fndecl) != NULL_TREE) + tree fntype = TREE_TYPE (fndecl); + tree attrs[] = { DECL_ATTRIBUTES (fndecl), TYPE_ATTRIBUTES (fntype) }; + + for (int i = 0; i != 2; ++i) { + if (!attrs[i]) + continue; + fprintf (file, "__attribute__(("); bool first = true; tree chain; - for (chain = DECL_ATTRIBUTES (fndecl); chain; - first = false, chain = TREE_CHAIN (chain)) + for (chain = attrs[i]; chain; first = false, chain = TREE_CHAIN (chain)) { if (!first) fprintf (file, ", "); @@ -8032,7 +8037,11 @@ dump_function_to_file (tree fndecl, FILE *file, dump_flags_t flags) } } else - fprintf (file, "%s %s(", function_name (fun), tmclone ? "[tm-clone] " : ""); + { + print_generic_expr (file, TREE_TYPE (fntype), dump_flags); + fprintf (file, " %s %s(", function_name (fun), + tmclone ? "[tm-clone] " : ""); + } arg = DECL_ARGUMENTS (fndecl); while (arg) |