re PR middle-end/61762 (failure to optimize memcpy from constant string)

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
This commit is contained in:
Richard Biener 2014-08-01 12:40:37 +00:00 committed by Richard Biener
parent a21d245c1b
commit 9741d942c2
2 changed files with 7 additions and 1 deletions

View 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.

View 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));