summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/store_merging_7.c
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-05-02 14:43:35 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-05-02 14:43:35 +0000
commit34efdaf078b01a7387007c4e6bde6db86384c4b7 (patch)
treed503eaf41d085669d1481bb46ec038bc866fece6 /gcc/testsuite/gcc.dg/store_merging_7.c
parentf733cf303bcdc952c92b81dd62199a40a1f555ec (diff)
downloadgcc-tarball-master.tar.gz
gcc-7.1.0gcc-7.1.0
Diffstat (limited to 'gcc/testsuite/gcc.dg/store_merging_7.c')
-rw-r--r--gcc/testsuite/gcc.dg/store_merging_7.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/store_merging_7.c b/gcc/testsuite/gcc.dg/store_merging_7.c
new file mode 100644
index 0000000000..c744ece640
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/store_merging_7.c
@@ -0,0 +1,26 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target store_merge } */
+/* { dg-options "-O2 -fdump-tree-store-merging" } */
+
+/* Check that we can merge consecutive array members through the pointer.
+ PR rtl-optimization/23684. */
+
+void
+foo (char *input)
+{
+ input = __builtin_assume_aligned (input, 8);
+ input[0] = 'H';
+ input[1] = 'e';
+ input[2] = 'l';
+ input[3] = 'l';
+ input[4] = 'o';
+ input[5] = ' ';
+ input[6] = 'w';
+ input[7] = 'o';
+ input[8] = 'r';
+ input[9] = 'l';
+ input[10] = 'd';
+ input[11] = '\0';
+}
+
+/* { dg-final { scan-tree-dump-times "Merging successful" 1 "store-merging" } } */