]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* c-ubsan.c (ubsan_instrument_shift): Use type0.
authormpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 25 May 2015 15:46:01 +0000 (15:46 +0000)
committermpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 25 May 2015 15:46:01 +0000 (15:46 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223646 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/c-family/ChangeLog
gcc/c-family/c-ubsan.c

index b73558a881911c18984590f42c254e9822f49768..df874d6d23186442c10ed91baa130a07ffbb482d 100644 (file)
@@ -1,3 +1,7 @@
+2015-05-25  Marek Polacek  <polacek@redhat.com>
+
+       * c-ubsan.c (ubsan_instrument_shift): Use type0.
+
 2015-05-22  Marek Polacek  <polacek@redhat.com>
 
        PR c/47043
index dbbdc5bf1c46b869d51dc8ba0e33ac859e4c8381..8fbc66c36eb1e872b8b04727d9edb4563d16cebb 100644 (file)
@@ -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,