re PR middle-end/61762 (failure to optimize memcpy from constant string)
authorRichard Biener <rguenther@suse.de>
Fri, 1 Aug 2014 12:40:37 +0000 (12:40 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 1 Aug 2014 12:40:37 +0000 (12:40 +0000)
2014-08-01  Richard Biener  <rguenther@suse.de>

PR middle-end/61762
* gcc.dg/pr61762.c: Align the string to make the testcase work
on strict-align targets.

From-SVN: r213454

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr61762.c

index cf2237113bf4858cae03625e1c2f060304af6741..e29098f52ab49f76d74657efaed86196225e4340 100644 (file)
@@ -1,3 +1,9 @@
+2014-08-01  Richard Biener  <rguenther@suse.de>
+
+       PR middle-end/61762
+       * gcc.dg/pr61762.c: Align the string to make the testcase work
+       on strict-align targets.
+
 2014-08-01  Jakub Jelinek  <jakub@redhat.com>
 
        * c-c++-common/ubsan/align-1.c: New test.
index 5abe5347e4a3b74b5269e48d6dadfaddab65cfcc..47dc140248c7352e6f2cedbdf236a16e31f46dff 100644 (file)
@@ -3,7 +3,7 @@
 
 unsigned int f()
 {
-  static const char string[] = "Private";
+  static const char string[] __attribute__((aligned(sizeof(int)))) = "Private";
 
   unsigned int priv;
   __builtin_memcpy(&priv, &string[0], sizeof(priv));