From: Richard Biener Date: Fri, 1 Aug 2014 12:40:37 +0000 (+0000) Subject: re PR middle-end/61762 (failure to optimize memcpy from constant string) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9741d942c2fd2ec06ef975c671eb600abb079d8a;p=gcc.git re PR middle-end/61762 (failure to optimize memcpy from constant string) 2014-08-01 Richard Biener PR middle-end/61762 * gcc.dg/pr61762.c: Align the string to make the testcase work on strict-align targets. From-SVN: r213454 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index cf2237113bf..e29098f52ab 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2014-08-01 Richard Biener + + 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 * c-c++-common/ubsan/align-1.c: New test. diff --git a/gcc/testsuite/gcc.dg/pr61762.c b/gcc/testsuite/gcc.dg/pr61762.c index 5abe5347e4a..47dc140248c 100644 --- a/gcc/testsuite/gcc.dg/pr61762.c +++ b/gcc/testsuite/gcc.dg/pr61762.c @@ -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));