]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
iropt-test: Fix an unwanted integer wrap-around.
authorFlorian Krohm <flo2030@eich-krohm.de>
Thu, 21 Aug 2025 21:31:58 +0000 (21:31 +0000)
committerFlorian Krohm <flo2030@eich-krohm.de>
Thu, 21 Aug 2025 21:31:58 +0000 (21:31 +0000)
none/tests/iropt-test/util.c

index f34936611e9829bf26d70b7a9cbb6dbcad037847..4ce30e2a5f4f6ccbd57eec7d94f381e06215b1f2 100644 (file)
@@ -114,7 +114,7 @@ get_selected_values(IRType type, unsigned *num_val)
    static const uint64_t values_64bit[] = { 0, 1, 2,
       UINT8_MAX  - 1, UINT8_MAX,  UINT8_MAX  + 1,
       UINT16_MAX - 1, UINT16_MAX, UINT16_MAX + 1,
-      UINT32_MAX - 1, UINT32_MAX, UINT32_MAX + 1,
+      UINT32_MAX - 1, UINT32_MAX, (uint64_t)UINT32_MAX + 1,
       UINT64_MAX - 1, UINT64_MAX };
 
    switch (type) {