OSDN Git Service

* gcc.dg/graphite/pr38409.c: Fixed commit problem.
[pf3gnuchains/gcc-fork.git] / gcc / function.c
index 0320871..29fe1b0 100644 (file)
@@ -1766,7 +1766,9 @@ aggregate_value_p (const_tree exp, const_tree fntype)
       {
       case CALL_EXPR:
        fndecl = get_callee_fndecl (fntype);
-       fntype = fndecl ? TREE_TYPE (fndecl) : 0;
+       fntype = (fndecl
+                 ? TREE_TYPE (fndecl)
+                 : TREE_TYPE (CALL_EXPR_FN (fntype)));
        break;
       case FUNCTION_DECL:
        fndecl = fntype;
@@ -3987,6 +3989,8 @@ allocate_struct_function (tree fndecl, bool abstract_p)
   OVERRIDE_ABI_FORMAT (fndecl);
 #endif
 
+  invoke_set_current_function_hook (fndecl);
+
   if (fndecl != NULL_TREE)
     {
       DECL_STRUCT_FUNCTION (fndecl) = cfun;
@@ -4012,8 +4016,6 @@ allocate_struct_function (tree fndecl, bool abstract_p)
       cfun->va_list_gpr_size = VA_LIST_MAX_GPR_SIZE;
       cfun->va_list_fpr_size = VA_LIST_MAX_FPR_SIZE;
     }
-
-  invoke_set_current_function_hook (fndecl);
 }
 
 /* This is like allocate_struct_function, but pushes a new cfun for FNDECL