diff options
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/ipa-inline.c | 14 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/pr87955.c | 10 |
4 files changed, 30 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 18acf49..ddc99e3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,12 @@ 2018-11-13 David Malcolm <dmalcolm@redhat.com> + PR ipa/87955 + * ipa-inline.c (report_inline_failed_reason): Guard calls to + cl_target_option_print_diff and cl_optimization_print_diff with + if (dump_file). + +2018-11-13 David Malcolm <dmalcolm@redhat.com> + * doc/invoke.texi (-fsave-optimization-record): Note that the output is compressed. * optinfo-emit-json.cc: Include <zlib.h>. diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index e04ede7..173808a 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -244,13 +244,15 @@ report_inline_failed_reason (struct cgraph_edge *e) e->callee->ultimate_alias_target ()->lto_file_data->file_name); } if (e->inline_failed == CIF_TARGET_OPTION_MISMATCH) - cl_target_option_print_diff - (dump_file, 2, target_opts_for_fn (e->caller->decl), - target_opts_for_fn (e->callee->ultimate_alias_target ()->decl)); + if (dump_file) + cl_target_option_print_diff + (dump_file, 2, target_opts_for_fn (e->caller->decl), + target_opts_for_fn (e->callee->ultimate_alias_target ()->decl)); if (e->inline_failed == CIF_OPTIMIZATION_MISMATCH) - cl_optimization_print_diff - (dump_file, 2, opts_for_fn (e->caller->decl), - opts_for_fn (e->callee->ultimate_alias_target ()->decl)); + if (dump_file) + cl_optimization_print_diff + (dump_file, 2, opts_for_fn (e->caller->decl), + opts_for_fn (e->callee->ultimate_alias_target ()->decl)); } } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 979f597..d2f0fd3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-11-13 David Malcolm <dmalcolm@redhat.com> + + PR ipa/87955 + * gcc.target/i386/pr87955.c: New test. + 2018-11-12 Aldy Hernandez <aldyh@redhat.com> * gcc.dg/tree-ssa/pr64130.c: Adjust for new value_range pretty diff --git a/gcc/testsuite/gcc.target/i386/pr87955.c b/gcc/testsuite/gcc.target/i386/pr87955.c new file mode 100644 index 0000000..ed87da6 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr87955.c @@ -0,0 +1,10 @@ +/* { dg-options "-O2 -fopt-info-inline-missed" } */ + +float a; + +__attribute__((__target__("fpmath=387"))) +int b() { + return a; +} + +int c() { return b(); } /* { dg-missed "not inlinable: c/\[0-9\]* -> b/\[0-9\]*, target specific option mismatch" } */ |