From 9741d942c2fd2ec06ef975c671eb600abb079d8a Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Fri, 1 Aug 2014 12:40:37 +0000 Subject: [PATCH] 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 --- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gcc.dg/pr61762.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) 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)); -- 2.30.2