Hi!

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

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

0xadf61a crash_signal
        ../../gcc/toplev.c:335
0x571a0e tree_check2(tree_node*, char const*, int, char const*, tree_code, 
tree_code)
        ../../gcc/tree.h:2667
0x8f5424 ipa_get_callee_param_type
        ../../gcc/ipa-prop.c:1513
0x8f5662 ipa_compute_jump_functions_for_edge
        ../../gcc/ipa-prop.c:1561
0x8f5c20 ipa_compute_jump_functions
        ../../gcc/ipa-prop.c:1649
0x8f7337 ipa_analyze_node(cgraph_node*)
        ../../gcc/ipa-prop.c:2169
0x10e85d0 ipcp_generate_summary
        ../../gcc/ipa-cp.c:3624

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)
{
  GIMPLE_CHECK (gs, GIMPLE_CALL);
  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  <ja...@redhat.com>

        * 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
     return;
   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))
     return;
 


        Jakub

Reply via email to