[gcc r12-6023] Fix member alignment for all targets [PR103751].

Martin Sebor msebor@gcc.gnu.org
Thu Dec 16 19:34:46 GMT 2021


https://gcc.gnu.org/g:f91814c22595e1db642140efe030caf2c092ab6f

commit r12-6023-gf91814c22595e1db642140efe030caf2c092ab6f
Author: Martin Sebor <msebor@redhat.com>
Date:   Thu Dec 16 12:28:03 2021 -0700

    Fix member alignment for all targets [PR103751].
    
    Resolves:
    PR testsuite/103751 - FAIL: gcc.dg/Warray-bounds-48.c (test for excess errors)
    
    gcc/testsuite/ChangeLog:
            PR testsuite/103751
            * gcc.dg/Warray-bounds-48.c: Fix member alignment.

Diff:
---
 gcc/testsuite/gcc.dg/Warray-bounds-48.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/testsuite/gcc.dg/Warray-bounds-48.c b/gcc/testsuite/gcc.dg/Warray-bounds-48.c
index 29b20863846..775b301e375 100644
--- a/gcc/testsuite/gcc.dg/Warray-bounds-48.c
+++ b/gcc/testsuite/gcc.dg/Warray-bounds-48.c
@@ -212,6 +212,7 @@ void test_a0 (struct A0 *p, unsigned n)
 struct A1
 {
   int32_t n;
+  __attribute__ ((aligned (4)))
   int16_t a1[1];    // { dg-message "while referencing 'a1'" }
 };


More information about the Gcc-cvs mailing list