re PR sanitizer/80932 (UBSAN: false positive as a result of distribution: c1*(c2...
authorMarek Polacek <polacek@redhat.com>
Thu, 8 Jun 2017 12:38:27 +0000 (12:38 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Thu, 8 Jun 2017 12:38:27 +0000 (12:38 +0000)
PR sanitize/80932
* c-c++-common/ubsan/pr80932.c: Test with ints, not with long ints.

From-SVN: r249010

gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/ubsan/pr80932.c

index 677b7d1d67c902b26499d7171a075a97f4a6a6b8..59b25749f4b5a7ee1e6c5b43b9f2eb62f1f0cd5a 100644 (file)
@@ -1,3 +1,8 @@
+2017-06-08  Marek Polacek  <polacek@redhat.com>
+
+       PR sanitize/80932
+       * c-c++-common/ubsan/pr80932.c: Test with ints, not with long ints.
+
 2017-08-08  Julia Koval  <julia.koval@intel.com>
 
        PR target/73350,80862
index a833712d383addaea955b2ee868e86b6b96a0dc6..92903f7e0ee4c5577d33e54282f9a1429aea8090 100644 (file)
@@ -4,10 +4,10 @@
 
 int x = 1;
 
-long int
+int
 foo (void)
 {
-  return ((long) (13801962912760474560ULL * x) - (long) (15334142073106273231ULL * x)) * -6;
+  return ((int) (2855545792U * x) - (int) (3269399503U * x)) * -5;
 }
 
 int