Commit 9741d942 by Richard Biener Committed by Richard Biener

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
parent a21d245c
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> 2014-08-01 Jakub Jelinek <jakub@redhat.com>
* c-c++-common/ubsan/align-1.c: New test. * c-c++-common/ubsan/align-1.c: New test.
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
unsigned int f() unsigned int f()
{ {
static const char string[] = "Private"; static const char string[] __attribute__((aligned(sizeof(int)))) = "Private";
unsigned int priv; unsigned int priv;
__builtin_memcpy(&priv, &string[0], sizeof(priv)); __builtin_memcpy(&priv, &string[0], sizeof(priv));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment