Commit e9db0d1b by Bernd Edlinger Committed by Bernd Edlinger

re PR sanitizer/64078 (FAIL: c-c++-common/ubsan/object-size-9.c)

2015-09-17  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR sanitizer/64078
        * c-c++-common/ubsan/object-size-9.c (s): Add alignment attribute.
        (f2, f3): Make the function static.
        * c-c++-common/ubsan/object-size-10.c (a, b): Add alignment attribute.

From-SVN: r227886
parent 814e52ca
2015-09-17 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR sanitizer/64078
* c-c++-common/ubsan/object-size-9.c (s): Add alignment attribute.
(f2, f3): Make the function static.
* c-c++-common/ubsan/object-size-10.c (a, b): Add alignment attribute.
2015-09-17 Christian Bruel <christian.bruel@st.com> 2015-09-17 Christian Bruel <christian.bruel@st.com>
* gcc.target/arm/attr_thumb-static2.c: New test. * gcc.target/arm/attr_thumb-static2.c: New test.
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
/* { dg-skip-if "" { *-*-* } { "*" } { "-O2" } } */ /* { dg-skip-if "" { *-*-* } { "*" } { "-O2" } } */
/* { dg-options "-fsanitize=undefined" } */ /* { dg-options "-fsanitize=undefined" } */
static char a[128]; static char a[128] __attribute__ ((aligned(4096)));
static int b[128]; static int b[128] __attribute__ ((aligned(4096)));
__attribute__ ((noinline, noclone)) int __attribute__ ((noinline, noclone)) int
fn1 (int i) fn1 (int i)
......
...@@ -11,7 +11,7 @@ struct C { C () : d("abcdefg"), e(1) {} C (const C &x) { __builtin_memcpy (d, x. ...@@ -11,7 +11,7 @@ struct C { C () : d("abcdefg"), e(1) {} C (const C &x) { __builtin_memcpy (d, x.
#endif #endif
struct U { int a : 5; int b : 19; int c : 8; }; struct U { int a : 5; int b : 19; int c : 8; };
struct S { struct U d[10]; }; struct S { struct U d[10]; };
struct S s; struct S s __attribute__ ((aligned(4096)));
int int
f1 (struct T x, int i) f1 (struct T x, int i)
...@@ -27,7 +27,7 @@ f1 (struct T x, int i) ...@@ -27,7 +27,7 @@ f1 (struct T x, int i)
/* { dg-output "\[^\n\r]*\\^\[^\n\r]*(\n|\r\n|\r)" } */ /* { dg-output "\[^\n\r]*\\^\[^\n\r]*(\n|\r\n|\r)" } */
#ifdef __cplusplus #ifdef __cplusplus
struct C static struct C
f2 (int i) f2 (int i)
{ {
struct C x; struct C x;
...@@ -41,7 +41,7 @@ f2 (int i) ...@@ -41,7 +41,7 @@ f2 (int i)
/* { dg-output "\[^\n\r]*\[^\n\r]*(\n|\r\n|\r)" { target { c++ } } } */ /* { dg-output "\[^\n\r]*\[^\n\r]*(\n|\r\n|\r)" { target { c++ } } } */
/* { dg-output "\[^\n\r]*\\^\[^\n\r]*(\n|\r\n|\r)" { target { c++ } } } */ /* { dg-output "\[^\n\r]*\\^\[^\n\r]*(\n|\r\n|\r)" { target { c++ } } } */
struct C static struct C
f3 (int i) f3 (int i)
{ {
struct C x; struct C x;
......
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