Add missing non-NULL check in cgraphclones
authorJan Hubicka <jh@suse.cz>
Tue, 3 Nov 2020 19:31:23 +0000 (20:31 +0100)
committerJan Hubicka <jh@suse.cz>
Tue, 3 Nov 2020 19:31:23 +0000 (20:31 +0100)
2020-11-03  Jan Hubicka  <hubicka@ucw.cz>

PR ipa/97698
* cgraphclones.c (duplicate_thunk_for_node): Check that info is
non-NULL.

gcc/cgraphclones.c

index b5793f90b64bcd626229719e552522129f980fd7..36ca6477139881eb0ff2fffe5f2d229fea4467a5 100644 (file)
@@ -239,7 +239,7 @@ duplicate_thunk_for_node (cgraph_node *thunk, cgraph_node *node)
   new_thunk->thunk = thunk->thunk;
   new_thunk->unique_name = in_lto_p;
   new_thunk->former_clone_of = thunk->decl;
-  if (info->param_adjustments)
+  if (info && info->param_adjustments)
     clone_info::get_create (new_thunk)->param_adjustments
           = info->param_adjustments;
   new_thunk->unit_id = thunk->unit_id;