aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2021-09-01 08:06:48 +0200
committerRichard Biener <rguenther@suse.de>2021-09-01 09:50:59 +0200
commite6bd9c42b0ad0cc4a615135612599adb829f2d9c (patch)
tree8980d918764ddcc6155ae96ff05b00abefba46ee /gcc
parent823685221de986afb729910a6f2237f07a377f17 (diff)
downloadgcc-e6bd9c42b0ad0cc4a615135612599adb829f2d9c.zip
gcc-e6bd9c42b0ad0cc4a615135612599adb829f2d9c.tar.gz
gcc-e6bd9c42b0ad0cc4a615135612599adb829f2d9c.tar.bz2
tree-optimization/102149 - add testcase for fixed bug
This adds the testcase from the PR. 2021-09-01 Richard Biener <rguenther@suse.de> PR tree-optimization/102149 * gcc.dg/torture/pr102149.c: New testcase.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr102149.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/torture/pr102149.c b/gcc/testsuite/gcc.dg/torture/pr102149.c
new file mode 100644
index 0000000..34a8c21
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr102149.c
@@ -0,0 +1,19 @@
+/* { dg-do run } */
+/* { dg-additional-options "-fno-vect-cost-model" } */
+
+int a[8];
+int *b = &a[6];
+char c;
+int main()
+{
+ int d = 7;
+ for (; d >= 0; d--)
+ {
+ *b = 1;
+ c = a[d] >> 3;
+ a[d] = c;
+ }
+ if (a[6] != 1)
+ __builtin_abort ();
+ return 0;
+}