Dump the return type of functions in gimple dumps
authorDavid Malcolm <dmalcolm@redhat.com>
Tue, 29 Apr 2014 15:02:16 +0000 (15:02 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Tue, 29 Apr 2014 15:02:16 +0000 (15:02 +0000)
gcc/
* tree-cfg.c (dump_function_to_file): Dump the return type of
functions, in a line to itself before the function body, mimicking
the layout of a C function.

gcc/testsuite/
* gcc.dg/tree-ssa/pr23401.c: Update the expected number of
occurrences of "int" in the gimple dump to reflect that the return
types of functions now show up in such dumps.
* gcc.dg/tree-ssa/pr27810.c: Likewise.

From-SVN: r209902

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/pr23401.c
gcc/testsuite/gcc.dg/tree-ssa/pr27810.c
gcc/tree-cfg.c

index f22fe1d136a22c110c7abd1c7cfcc761932c6e5e..c62e2a2922cbc34ec2213c6c4714d15f72aa793d 100644 (file)
@@ -1,3 +1,9 @@
+2014-04-29  David Malcolm  <dmalcolm@redhat.com>
+
+       * tree-cfg.c (dump_function_to_file): Dump the return type of
+       functions, in a line to itself before the function body, mimicking
+       the layout of a C function.
+
 2014-04-29  Jakub Jelinek  <jakub@redhat.com>
 
        PR tree-optimization/60971
index 689f4e847fbf969b387d3106470256a3895de857..e49afd5a400b63258c31008757157cfa276e3198 100644 (file)
@@ -1,3 +1,10 @@
+2014-04-29  David Malcolm  <dmalcolm@redhat.com>
+
+       * gcc.dg/tree-ssa/pr23401.c: Update the expected number of
+       occurrences of "int" in the gimple dump to reflect that the return
+       types of functions now show up in such dumps.
+       * gcc.dg/tree-ssa/pr27810.c: Likewise.
+
 2014-04-29  Jakub Jelinek  <jakub@redhat.com>
 
        PR tree-optimization/60971
index 1d30ac7519f5369ffe5fc0c6ebc07324b9f14ef5..3940692cd6c396d2d2b06f55397d4ae2f46de27d 100644 (file)
@@ -19,6 +19,6 @@ int ffff(int i)
 
 /* We should not use extra temporaries apart from for i1 + i2.  */
 
-/* { dg-final { scan-tree-dump-times "int" 5 "gimple" } } */
+/* { dg-final { scan-tree-dump-times "int" 6 "gimple" } } */
 /* { dg-final { scan-tree-dump-times "int D\\\." 1 "gimple" } } */
 /* { dg-final { cleanup-tree-dump "gimple" } } */
index c7da3bd5d06b7669ec0aa141f1977ad6e2f1cbe8..6d0904bb06b34f9849b2e588c3080fa5e18d9171 100644 (file)
@@ -13,6 +13,6 @@ int qqq (int a)
 /* We should not use an extra temporary for the result of the
    function call.  */
 
-/* { dg-final { scan-tree-dump-times "int" 3 "gimple" } } */
+/* { dg-final { scan-tree-dump-times "int" 4 "gimple" } } */
 /* { dg-final { scan-tree-dump-times "int D\\\." 1 "gimple" } } */
 /* { dg-final { cleanup-tree-dump "gimple" } } */
index 0fb2681c72368940ee3de5b156c48e12220ad9a9..a5f09ea9d9e5f428ef6d8cf03d5aedea5b3f292b 100644 (file)
@@ -7086,6 +7086,12 @@ dump_function_to_file (tree fndecl, FILE *file, int flags)
   struct function *fun = DECL_STRUCT_FUNCTION (fndecl);
 
   current_function_decl = fndecl;
+
+  /* Print the return type of the function: */
+  print_generic_expr (file, TREE_TYPE (TREE_TYPE (fun->decl)),
+                     dump_flags | TDF_SLIM);
+  fprintf (file, "\n");
+
   fprintf (file, "%s %s(", function_name (fun), tmclone ? "[tm-clone] " : "");
 
   arg = DECL_ARGUMENTS (fndecl);