]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix 'memory cannot be printed' in c-c++-common/ubsan/object-size-9.c
authorTom de Vries <tom@codesourcery.com>
Sat, 30 Dec 2017 10:31:54 +0000 (10:31 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Sat, 30 Dec 2017 10:31:54 +0000 (10:31 +0000)
2017-12-30  Tom de Vries  <tom@codesourcery.com>

PR testsuite/83612
* c-c++-common/ubsan/object-size-9.c (t): Add alignment attribute.

From-SVN: r256042

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/ubsan/object-size-9.c

index de242f8dab218875beb3971f2894392471fc26f6..d555be04f410800ace88494843b6652e7c2c64e6 100644 (file)
@@ -1,3 +1,8 @@
+2017-12-30  Tom de Vries  <tom@codesourcery.com>
+
+       PR testsuite/83612
+       * c-c++-common/ubsan/object-size-9.c (t): Add alignment attribute.
+
 2017-12-28  Uros Bizjak  <ubizjak@gmail.com>
 
        * g++.old-deja/g++.ext/namedret2.C (f): Return a value.
index e0a2980b4269ef186d7f2d18ec06388af561e17c..41c4a94e7b6cd93d1e256e34e212b2043bb03795 100644 (file)
@@ -3,7 +3,7 @@
 /* { dg-options "-fsanitize=undefined" } */
 
 struct T { int c; char d[]; };
-struct T t = { 1, "a" };
+struct T t __attribute__ ((aligned(4096))) = { 1, "a" };
 
 int
 baz (int i)