From 2a1dcf27473f87a94d374238362300f88f4cd7ed Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Fri, 16 Jan 2015 14:16:46 +0100 Subject: [PATCH] builtins.c (expand_builtin_acc_on_device): Check target for NULL. * builtins.c (expand_builtin_acc_on_device): Check target for NULL. From-SVN: r219735 --- gcc/ChangeLog | 4 ++++ gcc/builtins.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index efab15707c5..4010ace26a6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2015-01-16 Uros Bizjak + + * builtins.c (expand_builtin_acc_on_device): Check target for NULL. + 2015-01-16 Matthew Wahab PR target/64149 diff --git a/gcc/builtins.c b/gcc/builtins.c index 9a6a11b2ce6..bf5acbcc228 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -5930,7 +5930,7 @@ expand_builtin_acc_on_device (tree exp, rtx target) v2 = GEN_INT (GOMP_DEVICE_HOST); #endif machine_mode target_mode = TYPE_MODE (integer_type_node); - if (!REG_P (target) || GET_MODE (target) != target_mode) + if (!target || !register_operand (target, target_mode)) target = gen_reg_rtx (target_mode); emit_move_insn (target, const1_rtx); rtx_code_label *done_label = gen_label_rtx (); -- 2.30.2