tree-inline.c (tree_function_versioning): Check DF info existence before accessing it.
authorIlya Enkovich <ilya.enkovich@intel.com>
Thu, 5 Jun 2014 12:58:58 +0000 (12:58 +0000)
committerKirill Yukhin <kyukhin@gcc.gnu.org>
Thu, 5 Jun 2014 12:58:58 +0000 (12:58 +0000)
gcc/
* tree-inline.c (tree_function_versioning): Check DF info existence
before accessing it.

From-SVN: r211274

gcc/ChangeLog
gcc/tree-inline.c

index 525ef8f..b553eca 100644 (file)
@@ -1,3 +1,8 @@
+2014-06-05  Ilya Enkovich  <ilya.enkovich@intel.com>
+
+       * tree-inline.c (tree_function_versioning): Check DF info existence
+       before accessing it.
+
 2014-06-05  Marcus Shawcroft  <marcus.shawcroft@arm.com>
            Jiong Wang  <jiong.wang@arm.com>
 
index 7e75cce..dbf4b5d 100644 (file)
@@ -5345,8 +5345,9 @@ tree_function_versioning (tree old_decl, tree new_decl,
   DECL_ARGUMENTS (new_decl) = DECL_ARGUMENTS (old_decl);
   initialize_cfun (new_decl, old_decl,
                   old_entry_block->count);
-  DECL_STRUCT_FUNCTION (new_decl)->gimple_df->ipa_pta
-    = id.src_cfun->gimple_df->ipa_pta;
+  if (DECL_STRUCT_FUNCTION (new_decl)->gimple_df)
+    DECL_STRUCT_FUNCTION (new_decl)->gimple_df->ipa_pta
+      = id.src_cfun->gimple_df->ipa_pta;
 
   /* Copy the function's static chain.  */
   p = DECL_STRUCT_FUNCTION (old_decl)->static_chain_decl;