+2015-09-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ * gcc.target/i386/inline_error.c (int bar): Use dg-message for note.
+ * gcc.target/i386/pr57756.c (static __inline int caller): Likewise.
+ * gcc.target/i386/pr59789.c (f1): Likewise.
+ * gcc.target/i386/intrinsics_5.c (__m128i foo): Likewise.
+ * gcc.target/i386/intrinsics_6.c: Likewise.
+ * gcc.dg/winline-5.c (int t): Likewise.
+ * gcc.dg/winline-9.c (t): Likewise.
+ * gcc.dg/always_inline2.c (q): Likewise.
+ * gcc.dg/winline-2.c (inline int t): Likewise.
+ * gcc.dg/winline-6.c: Likewise.
+ * gcc.dg/winline-10.c (void g): Likewise.
+ * gcc.dg/pr49243.c (void parse): Likewise.
+ * gcc.dg/always_inline3.c (q2): Likewise.
+ * gcc.dg/winline-3.c: Likewise.
+ * gcc.dg/winline-7.c (inline void *t): Likewise.
+
2015-09-22 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/67666
tree return_slot;
tree modify_dest;
tree return_bounds = NULL;
- location_t saved_location;
struct cgraph_edge *cg_edge;
cgraph_inline_failed_t reason;
basic_block return_block;
edge e;
gimple_stmt_iterator gsi, stmt_gsi;
- bool successfully_inlined = FALSE;
+ bool successfully_inlined = false;
bool purge_dead_abnormal_edges;
gcall *call_stmt;
unsigned int i;
- /* Set input_location here so we get the right instantiation context
- if we call instantiate_decl from inlinable_function_p. */
- /* FIXME: instantiate_decl isn't called by inlinable_function_p. */
- saved_location = input_location;
+ /* The gimplifier uses input_location in too many places, such as
+ internal_get_tmp_var (). */
+ location_t saved_location = input_location;
input_location = gimple_location (stmt);
/* From here on, we're only interested in CALL_EXPRs. */
{
error ("inlining failed in call to always_inline %q+F: %s", fn,
cgraph_inline_failed_string (reason));
- error ("called from here");
+ if (gimple_location (stmt) != UNKNOWN_LOCATION)
+ inform (gimple_location (stmt), "called from here");
+ else if (DECL_SOURCE_LOCATION (cfun->decl) != UNKNOWN_LOCATION)
+ inform (DECL_SOURCE_LOCATION (cfun->decl),
+ "called from this function");
}
else if (warn_inline
&& DECL_DECLARED_INLINE_P (fn)
/* Avoid warnings during early inline pass. */
&& symtab->global_info_ready)
{
- warning (OPT_Winline, "inlining failed in call to %q+F: %s",
- fn, _(cgraph_inline_failed_string (reason)));
- warning (OPT_Winline, "called from here");
+ if (warning (OPT_Winline, "inlining failed in call to %q+F: %s",
+ fn, _(cgraph_inline_failed_string (reason))))
+ {
+ if (gimple_location (stmt) != UNKNOWN_LOCATION)
+ inform (gimple_location (stmt), "called from here");
+ else if (DECL_SOURCE_LOCATION (cfun->decl) != UNKNOWN_LOCATION)
+ inform (DECL_SOURCE_LOCATION (cfun->decl),
+ "called from this function");
+ }
}
goto egress;
}
{
id->block = make_node (BLOCK);
BLOCK_ABSTRACT_ORIGIN (id->block) = fn;
- BLOCK_SOURCE_LOCATION (id->block) = LOCATION_LOCUS (input_location);
+ BLOCK_SOURCE_LOCATION (id->block)
+ = LOCATION_LOCUS (gimple_location (stmt));
prepend_lexical_block (gimple_block (stmt), id->block);
}
cg_edge->callee->remove ();
id->block = NULL_TREE;
- successfully_inlined = TRUE;
+ successfully_inlined = true;
egress:
input_location = saved_location;