From 2e82a4615abc70d4ab75f15948d3396728822dfa Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Fri, 4 Oct 2019 11:40:40 +0000 Subject: [PATCH] loop-3.c: Fix undefined behavior. 2019-10-04 Richard Biener * gcc.c-torture/execute/loop-3.c: Fix undefined behavior. From-SVN: r276572 --- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.c-torture/execute/loop-3.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 950c7483ae2..3e5a945b092 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2019-10-04 Richard Biener + + * gcc.c-torture/execute/loop-3.c: Fix undefined behavior. + 2019-10-04 Yuliang Wang * gcc.target/aarch64/sve2/shracc_1.c: Tighten scan-assembler-nots diff --git a/gcc/testsuite/gcc.c-torture/execute/loop-3.c b/gcc/testsuite/gcc.c-torture/execute/loop-3.c index e314a01b1f1..33eb18826fd 100644 --- a/gcc/testsuite/gcc.c-torture/execute/loop-3.c +++ b/gcc/testsuite/gcc.c-torture/execute/loop-3.c @@ -13,7 +13,7 @@ f (m) i = m; do { - g (i * INT_MAX / 2); + g ((int)((unsigned)i * INT_MAX) / 2); } while (--i > 0); } -- 2.30.2