aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr90311.c16
2 files changed, 21 insertions, 0 deletions
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 <jakub@redhat.com>
+
+ PR target/90311
+ * gcc.c-torture/execute/pr90311.c: New test.
+
2020-03-05 Jeff Law <law@redhat.com>
* 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;
+}