Commit 31e1324b by Marek Polacek Committed by Marek Polacek

bounds-2.c (fn4): Adjust to check the array size in the structure.

	* c-c++-common/ubsan/bounds-2.c (fn4): Adjust to check the array size
	in the structure.

From-SVN: r212933
parent b50a9d38
2014-07-23 Marek Polacek <polacek@redhat.com>
* c-c++-common/ubsan/bounds-2.c (fn4): Adjust to check the array size
in the structure.
2014-07-23 Jiong Wang <jiong.wang@arm.com>
* gcc.dg/ira-shrinkwrap-prep-1.c (target): Add arm_nothumb.
......
......@@ -4,6 +4,7 @@
/* Test runtime errors. */
struct S { int a[10]; };
struct T { int a[5]; int s[2]; };
int
foo_5 (void)
......@@ -47,8 +48,9 @@ fn3 (void)
static void __attribute__ ((noinline, noclone))
fn4 (void)
{
volatile int a[5];
a[foo_5 ()] = 1;
struct T t;
asm ("" : : "r" (&t.a) : "memory");
t.a[foo_5 ()] = 1;
}
static void __attribute__ ((noinline, noclone))
......
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