This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Recent IPA regression with internal functions


I've merged today gomp-4_0-branch from the trunk, but I'm seeing various

The ICEs look like (e.g. on libgomp.c/simd-1.c (and other simd tests):

0xadf61a crash_signal
0x571a0e tree_check2(tree_node*, char const*, int, char const*, tree_code, tree_code)
0x8f5424 ipa_get_callee_param_type
0x8f5662 ipa_compute_jump_functions_for_edge
0x8f5c20 ipa_compute_jump_functions
0x8f7337 ipa_analyze_node(cgraph_node*)
0x10e85d0 ipcp_generate_summary

The problem is in ipa_get_callee_param_type:
1509	  int n;
1510	  tree type = (e->callee
1511		       ? TREE_TYPE (e->callee->symbol.decl)
1512		       : gimple_call_fntype (e->call_stmt));
1513	  tree t = TYPE_ARG_TYPES (type);

e->call_stmt in this case is an internal builtin function, and
builtin internal functions don't have a fntype:
static inline tree
gimple_call_fntype (const_gimple gs)
  if (gimple_call_internal_p (gs))
    return NULL_TREE;
  return gs->gimple_call.u.fntype;

The following patch fixes this.  Is this ok?  I don't see ever that
it would be worth to try to do anything with internal calls, especially
when they are all magic.

2013-09-13  Jakub Jelinek  <>

	* ipa-prop.c (ipa_compute_jump_functions_for_edge): Return early
	for internal calls.

--- gcc/ipa-prop.c.jj	2013-09-13 16:48:54.000000000 +0200
+++ gcc/ipa-prop.c	2013-09-13 17:28:28.086058903 +0200
@@ -1551,6 +1551,8 @@ ipa_compute_jump_functions_for_edge (str
   vec_safe_grow_cleared (args->jump_functions, arg_num);
+  if (gimple_call_internal_p (call))
+    return;
   if (ipa_func_spec_opts_forbid_analysis_p (cs->caller))


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]