ipa: Fix segfault ICE with fdump-tree-einline on TARGET_OPTION_MISMATCH

If a target rejects inlining via the TARGET_CAN_INLINE_P hook for
reasons other than optimization options, the compiler currently
crashes with a segfault. The MIPS target
(mips.cc:mips_can_inline_p), for e.g., rejects inlining on
conflicting target attributes, and compiling
gcc.target/mips/mips16-attributes-5.c with -fdump-tree-einline
segfaults - report_inline_failed_reason passes
target_opts_for_fn's result to cl_target_option_print_diff
even if NULL.

Fix by checking for NULL for before calling
cl_target_option_print_diff.

gcc/ChangeLog:

	* ipa-inline.cc (report_inline_failed_reason): Check for NULL
	before calling cl_target_option_print_diff.
1 file changed