summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr77436.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/torture/pr77436.c')
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr77436.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/torture/pr77436.c b/gcc/testsuite/gcc.dg/torture/pr77436.c
new file mode 100644
index 00000000000..513867db7ce
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr77436.c
@@ -0,0 +1,11 @@
+/* { dg-do run } */
+
+int main()
+{
+ unsigned short sum = 0;
+ for (short x = -(__SHRT_MAX__ -1); x <= (__SHRT_MAX__ -1); x++)
+ sum += x;
+ if (sum != 0)
+ __builtin_abort ();
+ return 0;
+}