OSDN Git Service

* gcc.c-torture/execute/20030222-1.x: New file.
[pf3gnuchains/gcc-fork.git] / gcc / cgraphbuild.c
index 2f8d3b0..19e1983 100644 (file)
@@ -62,6 +62,24 @@ record_reference (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
        }
       break;
 
+    case OMP_PARALLEL:
+      if (flag_unit_at_a_time)
+       {
+         if (OMP_PARALLEL_FN (*tp))
+           cgraph_mark_needed_node (cgraph_node (OMP_PARALLEL_FN (*tp)));
+       }
+      break;
+
+    case OMP_TASK:
+      if (flag_unit_at_a_time)
+       {
+         if (OMP_TASK_FN (*tp))
+           cgraph_mark_needed_node (cgraph_node (OMP_TASK_FN (*tp)));
+         if (OMP_TASK_COPYFN (*tp))
+           cgraph_mark_needed_node (cgraph_node (OMP_TASK_COPYFN (*tp)));
+       }
+      break;
+
     default:
       /* Save some cycles by not walking types and declaration as we
         won't find anything useful there anyway.  */
@@ -97,7 +115,7 @@ initialize_inline_failed (struct cgraph_node *node)
                           "considered for inlining");
       else if (!node->local.inlinable)
        e->inline_failed = N_("function not inlinable");
-      else if (CALL_CANNOT_INLINE_P (e->call_stmt))
+      else if (CALL_STMT_CANNOT_INLINE_P (e->call_stmt))
        e->inline_failed = N_("mismatched arguments");
       else
        e->inline_failed = N_("function not considered for inlining");
@@ -152,7 +170,7 @@ build_cgraph_edges (void)
       }
 
   /* Look for initializers of constant variables and private statics.  */
-  for (step = cfun->unexpanded_var_list;
+  for (step = cfun->local_decls;
        step;
        step = TREE_CHAIN (step))
     {
@@ -170,8 +188,10 @@ build_cgraph_edges (void)
   return 0;
 }
 
-struct tree_opt_pass pass_build_cgraph_edges =
+struct gimple_opt_pass pass_build_cgraph_edges =
 {
+ {
+  GIMPLE_PASS,
   NULL,                                        /* name */
   NULL,                                        /* gate */
   build_cgraph_edges,                  /* execute */
@@ -183,8 +203,8 @@ struct tree_opt_pass pass_build_cgraph_edges =
   0,                                   /* properties_provided */
   0,                                   /* properties_destroyed */
   0,                                   /* todo_flags_start */
-  0,                                   /* todo_flags_finish */
-  0                                    /* letter */
+  0                                    /* todo_flags_finish */
+ }
 };
 
 /* Record references to functions and other variables present in the
@@ -238,8 +258,10 @@ rebuild_cgraph_edges (void)
   return 0;
 }
 
-struct tree_opt_pass pass_rebuild_cgraph_edges =
+struct gimple_opt_pass pass_rebuild_cgraph_edges =
 {
+ {
+  GIMPLE_PASS,
   NULL,                                        /* name */
   NULL,                                        /* gate */
   rebuild_cgraph_edges,                        /* execute */
@@ -252,5 +274,5 @@ struct tree_opt_pass pass_rebuild_cgraph_edges =
   0,                                   /* properties_destroyed */
   0,                                   /* todo_flags_start */
   0,                                   /* todo_flags_finish */
-  0                                    /* letter */
+ }
 };