[committed] testsuite: Add testcase for already fixed PR [PR90311]

Jakub Jelinek jakub@redhat.com
Thu Mar 5 16:03:00 GMT 2020


Hi!

This PR has been fixed by r10-3970.  Testcase tested with cross to
armv7hl-linux-gnueabi (all of r10-3969 (FAIL), r10-3970 and current trunk (PASS))
and x86_64-linux and i686-linux, committed to trunk as obvious.

2020-03-05  Jakub Jelinek  <jakub@redhat.com>

	PR target/90311
	* gcc.c-torture/execute/pr90311.c: New test.

--- gcc/testsuite/gcc.c-torture/execute/pr90311.c.jj	2020-03-05 16:35:46.183005546 +0100
+++ gcc/testsuite/gcc.c-torture/execute/pr90311.c	2020-03-05 16:35:33.390195187 +0100
@@ -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;
+}

	Jakub



More information about the Gcc-patches mailing list