From 60591d4e4bb70526301501cfeb292639434baa3f Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Wed, 23 Aug 2017 13:44:20 +0000 Subject: [PATCH] function.c (fndecl_name): Use verbosity 1 (no arguments) for lang_hooks.decl_printable_name. 2017-08-23 Richard Biener * function.c (fndecl_name): Use verbosity 1 (no arguments) for lang_hooks.decl_printable_name. * print-rtl-function.c (print_rtx_function): Likewise. * tree-pretty-print.c (dump_function_header): Likewise. * g++.dg/cpp1y/constexpr-instantiate.C: Adjust. * g++.dg/tree-ssa/pr45605.C: Likewise. * gnat.dg/noinline2.ad: Likewise.b * gnat.dg/renaming6.ad: Likewise.b * gnat.dg/renaming6.ad: Likewise.s * gnat.dg/specs/noinline3.ad: Likewise.s From-SVN: r251308 --- gcc/ChangeLog | 7 +++++++ gcc/function.c | 2 +- gcc/print-rtl-function.c | 2 +- gcc/testsuite/ChangeLog | 9 +++++++++ gcc/testsuite/g++.dg/cpp1y/constexpr-instantiate.C | 4 ++-- gcc/testsuite/g++.dg/tree-ssa/pr45605.C | 2 +- gcc/testsuite/gnat.dg/noinline2.adb | 2 +- gcc/testsuite/gnat.dg/renaming6.adb | 6 +++--- gcc/testsuite/gnat.dg/renaming6.ads | 2 +- gcc/testsuite/gnat.dg/specs/noinline3.ads | 2 +- gcc/tree-pretty-print.c | 2 +- 11 files changed, 28 insertions(+), 12 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4d221a203a8..f0c1e53b936 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2017-08-23 Richard Biener + + * function.c (fndecl_name): Use verbosity 1 (no arguments) for + lang_hooks.decl_printable_name. + * print-rtl-function.c (print_rtx_function): Likewise. + * tree-pretty-print.c (dump_function_header): Likewise. + 2017-08-23 Richard Biener PR lto/81940 diff --git a/gcc/function.c b/gcc/function.c index 7fce0c530b8..41c4e1e27ce 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -6259,7 +6259,7 @@ fndecl_name (tree fndecl) { if (fndecl == NULL) return "(nofn)"; - return lang_hooks.decl_printable_name (fndecl, 2); + return lang_hooks.decl_printable_name (fndecl, 1); } /* Returns the name of function FN. */ diff --git a/gcc/print-rtl-function.c b/gcc/print-rtl-function.c index ac8963ec6bb..55edb7e3f13 100644 --- a/gcc/print-rtl-function.c +++ b/gcc/print-rtl-function.c @@ -227,7 +227,7 @@ print_rtx_function (FILE *outfile, function *fn, bool compact) tree fdecl = fn->decl; - const char *dname = lang_hooks.decl_printable_name (fdecl, 2); + const char *dname = lang_hooks.decl_printable_name (fdecl, 1); fprintf (outfile, "(function \"%s\"\n", dname); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ff50edf6d38..c5da2bac2f4 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2017-08-23 Richard Biener + + * g++.dg/cpp1y/constexpr-instantiate.C: Adjust. + * g++.dg/tree-ssa/pr45605.C: Likewise. + * gnat.dg/noinline2.ad: Likewise.b + * gnat.dg/renaming6.ad: Likewise.b + * gnat.dg/renaming6.ad: Likewise.s + * gnat.dg/specs/noinline3.ad: Likewise.s + 2017-08-23 Richard Biener PR lto/81940 diff --git a/gcc/testsuite/g++.dg/cpp1y/constexpr-instantiate.C b/gcc/testsuite/g++.dg/cpp1y/constexpr-instantiate.C index ab2021b91bd..84707b9e869 100644 --- a/gcc/testsuite/g++.dg/cpp1y/constexpr-instantiate.C +++ b/gcc/testsuite/g++.dg/cpp1y/constexpr-instantiate.C @@ -17,5 +17,5 @@ bool g (int x) { return f (x); } template bool f(int); // Verify that the defintions of both f() and g() are emitted. -// { dg-final { scan-tree-dump-times "\nconstexpr bool f\\\(" 1 "optimized" } } -// { dg-final { scan-tree-dump-times "\nbool g\\\(" 1 "optimized" } } +// { dg-final { scan-tree-dump-times ";; Function f" 1 "optimized" } } +// { dg-final { scan-tree-dump-times ";; Function g" 1 "optimized" } } diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr45605.C b/gcc/testsuite/g++.dg/tree-ssa/pr45605.C index 5460021ae62..1a34249eb2a 100644 --- a/gcc/testsuite/g++.dg/tree-ssa/pr45605.C +++ b/gcc/testsuite/g++.dg/tree-ssa/pr45605.C @@ -37,4 +37,4 @@ int main() { /* We should devirtualize call to D::Run */ -/* { dg-final { scan-tree-dump-times "D::Run \\(" 1 "fre1" } } */ +/* { dg-final { scan-tree-dump-times "D::Run \\(" 3 "fre1" } } */ diff --git a/gcc/testsuite/gnat.dg/noinline2.adb b/gcc/testsuite/gnat.dg/noinline2.adb index 3abb33aaa68..121aee3de91 100644 --- a/gcc/testsuite/gnat.dg/noinline2.adb +++ b/gcc/testsuite/gnat.dg/noinline2.adb @@ -18,4 +18,4 @@ package body Noinline2 is end Noinline2; --- { dg-final { scan-tree-dump-times "noinline2.inner" 2 "optimized" } } +-- { dg-final { scan-tree-dump-times "noinline2.inner" 4 "optimized" } } diff --git a/gcc/testsuite/gnat.dg/renaming6.adb b/gcc/testsuite/gnat.dg/renaming6.adb index aff90e4b1f8..e26c1dffce0 100644 --- a/gcc/testsuite/gnat.dg/renaming6.adb +++ b/gcc/testsuite/gnat.dg/renaming6.adb @@ -15,16 +15,16 @@ package body Renaming6 is function Get_J return Integer is begin - return J; + return X; end; procedure Set_J (Val : Integer) is begin - J := Val; + X := Val; end; end Renaming6; -- { dg-final { scan-tree-dump-times "atomic_load" 2 "original" } } -- { dg-final { scan-tree-dump-times "atomic_store" 2 "original" } } --- { dg-final { scan-tree-dump-not "j" "original" } } +-- { dg-final { scan-tree-dump-not "x" "original" } } diff --git a/gcc/testsuite/gnat.dg/renaming6.ads b/gcc/testsuite/gnat.dg/renaming6.ads index 5cfef5b999f..1d9fbf5c015 100644 --- a/gcc/testsuite/gnat.dg/renaming6.ads +++ b/gcc/testsuite/gnat.dg/renaming6.ads @@ -6,7 +6,7 @@ package Renaming6 is function Get_I return Integer; procedure Set_I (Val : Integer); - J : Integer renames I; + X : Integer renames I; function Get_J return Integer; procedure Set_J (Val : Integer); diff --git a/gcc/testsuite/gnat.dg/specs/noinline3.ads b/gcc/testsuite/gnat.dg/specs/noinline3.ads index 0828b88cf26..764ab48bbd9 100644 --- a/gcc/testsuite/gnat.dg/specs/noinline3.ads +++ b/gcc/testsuite/gnat.dg/specs/noinline3.ads @@ -5,4 +5,4 @@ with Noinline3_Pkg; package Noinline3 is new Noinline3_Pkg (0); --- { dg-final { scan-tree-dump-times "noinline3.inner" 2 "optimized" } } +-- { dg-final { scan-tree-dump-times "noinline3.inner" 4 "optimized" } } diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c index c7509af198b..14c7caa60af 100644 --- a/gcc/tree-pretty-print.c +++ b/gcc/tree-pretty-print.c @@ -4047,7 +4047,7 @@ dump_function_header (FILE *dump_file, tree fdecl, dump_flags_t flags) struct cgraph_node *node = cgraph_node::get (fdecl); struct function *fun = DECL_STRUCT_FUNCTION (fdecl); - dname = lang_hooks.decl_printable_name (fdecl, 2); + dname = lang_hooks.decl_printable_name (fdecl, 1); if (DECL_ASSEMBLER_NAME_SET_P (fdecl)) aname = (IDENTIFIER_POINTER -- 2.30.2