From 9677ef526d25f762510c15cb2485375528bc52ce Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Mon, 25 May 2015 15:46:01 +0000 Subject: [PATCH] * c-ubsan.c (ubsan_instrument_shift): Use type0. From-SVN: r223646 --- gcc/c-family/ChangeLog | 4 ++++ gcc/c-family/c-ubsan.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index b73558a8819..df874d6d231 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,7 @@ +2015-05-25 Marek Polacek + + * c-ubsan.c (ubsan_instrument_shift): Use type0. + 2015-05-22 Marek Polacek PR c/47043 diff --git a/gcc/c-family/c-ubsan.c b/gcc/c-family/c-ubsan.c index dbbdc5bf1c4..8fbc66c36eb 100644 --- a/gcc/c-family/c-ubsan.c +++ b/gcc/c-family/c-ubsan.c @@ -173,7 +173,7 @@ ubsan_instrument_shift (location_t loc, enum tree_code code, x < 0 || ((unsigned) x >> (uprecm1 - y)) if > 1, is undefined. */ if (code == LSHIFT_EXPR - && !TYPE_UNSIGNED (TREE_TYPE (op0)) + && !TYPE_UNSIGNED (type0) && (cxx_dialect >= cxx11)) { tree x = fold_build2 (MINUS_EXPR, op1_utype, uprecm1, -- 2.30.2