https://gcc.gnu.org/g:2f852f3ea72bcd13cd02c2857daa9bbeae4ece99

commit r16-1558-g2f852f3ea72bcd13cd02c2857daa9bbeae4ece99
Author: Richard Biener <rguent...@suse.de>
Date:   Wed Jun 18 15:38:27 2025 +0200

    Fix dump_function_to_file use of dump_flags
    
    The function gets dump flags as 'flags' parameter, so shouldn't use
    dump_flags.
    
            * tree-cfg.cc (dump_function_to_file): Use flags, not dump_flags.

Diff:
---
 gcc/tree-cfg.cc | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/gcc/tree-cfg.cc b/gcc/tree-cfg.cc
index 1c5427ebf5b6..72763fd5a552 100644
--- a/gcc/tree-cfg.cc
+++ b/gcc/tree-cfg.cc
@@ -8339,7 +8339,7 @@ dump_function_to_file (tree fndecl, FILE *file, 
dump_flags_t flags)
            fprintf (file, ", ");
 
          tree name = get_attribute_name (chain);
-         print_generic_expr (file, name, dump_flags);
+         print_generic_expr (file, name, flags);
          if (TREE_VALUE (chain) != NULL_TREE)
            {
              fprintf (file, " (");
@@ -8350,13 +8350,13 @@ dump_function_to_file (tree fndecl, FILE *file, 
dump_flags_t flags)
                                "omp declare variant base"))
                {
                  tree a = TREE_VALUE (chain);
-                 print_generic_expr (file, TREE_PURPOSE (a), dump_flags);
+                 print_generic_expr (file, TREE_PURPOSE (a), flags);
                  fprintf (file, " match ");
                  print_omp_context_selector (file, TREE_VALUE (a),
-                                             dump_flags);
+                                             flags);
                }
              else
-               print_generic_expr (file, TREE_VALUE (chain), dump_flags);
+               print_generic_expr (file, TREE_VALUE (chain), flags);
              fprintf (file, ")");
            }
        }
@@ -8378,7 +8378,7 @@ dump_function_to_file (tree fndecl, FILE *file, 
dump_flags_t flags)
        }
 
       print_generic_expr (file, TREE_TYPE (TREE_TYPE (fndecl)),
-                         dump_flags | TDF_SLIM);
+                         flags | TDF_SLIM);
       fprintf (file, " __GIMPLE (%s",
               (fun->curr_properties & PROP_ssa) ? "ssa"
               : (fun->curr_properties & PROP_cfg) ? "cfg"
@@ -8391,7 +8391,7 @@ dump_function_to_file (tree fndecl, FILE *file, 
dump_flags_t flags)
            fprintf (file, ",%s(%" PRIu64 ")",
                     profile_quality_as_string (bb->count.quality ()),
                     bb->count.value ());
-         if (dump_flags & TDF_UID)
+         if (flags & TDF_UID)
            fprintf (file, ")\n%sD_%u (", function_name (fun),
                     DECL_UID (fndecl));
          else
@@ -8400,8 +8400,8 @@ dump_function_to_file (tree fndecl, FILE *file, 
dump_flags_t flags)
     }
   else
     {
-      print_generic_expr (file, TREE_TYPE (fntype), dump_flags);
-      if (dump_flags & TDF_UID)
+      print_generic_expr (file, TREE_TYPE (fntype), flags);
+      if (flags & TDF_UID)
        fprintf (file, " %sD.%u %s(", function_name (fun), DECL_UID (fndecl),
                 tmclone ? "[tm-clone] " : "");
       else
@@ -8412,9 +8412,9 @@ dump_function_to_file (tree fndecl, FILE *file, 
dump_flags_t flags)
   arg = DECL_ARGUMENTS (fndecl);
   while (arg)
     {
-      print_generic_expr (file, TREE_TYPE (arg), dump_flags);
+      print_generic_expr (file, TREE_TYPE (arg), flags);
       fprintf (file, " ");
-      print_generic_expr (file, arg, dump_flags);
+      print_generic_expr (file, arg, flags);
       if (DECL_CHAIN (arg))
        fprintf (file, ", ");
       arg = DECL_CHAIN (arg);

Reply via email to