From: Jakub Jelinek Date: Thu, 5 Mar 2020 15:59:58 +0000 (+0100) Subject: testsuite: Add testcase for already fixed PR [PR90311] X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c0e184b4ad4b28cbfc94290e8f1169a8297bb0de;p=gcc.git testsuite: Add testcase for already fixed PR [PR90311] 2020-03-05 Jakub Jelinek PR target/90311 * gcc.c-torture/execute/pr90311.c: New test. --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index bac662302fb..8c693ea08d6 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2020-03-05 Jakub Jelinek + + PR target/90311 + * gcc.c-torture/execute/pr90311.c: New test. + 2020-03-05 Jeff Law * gcc.target/arm/fuse-caller-save.c: Generalize expected output. diff --git a/gcc/testsuite/gcc.c-torture/execute/pr90311.c b/gcc/testsuite/gcc.c-torture/execute/pr90311.c new file mode 100644 index 00000000000..af8cde6d0f0 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr90311.c @@ -0,0 +1,16 @@ +/* PR rtl-optimization/90311 */ + +int a, b; + +int +main () +{ + unsigned long long x; + unsigned int c; + __builtin_add_overflow ((unsigned char) a, b, &c); + b -= c < (unsigned char) a; + x = b; + if (x) + __builtin_abort (); + return 0; +}