From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8149 invoked by alias); 3 Dec 2007 23:42:56 -0000 Received: (qmail 8121 invoked by uid 48); 3 Dec 2007 23:42:43 -0000 Date: Mon, 03 Dec 2007 23:42:00 -0000 Message-ID: <20071203234243.8120.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug middle-end/28865] Structures with a flexible arrray member have wrong .size In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "lauro dot venancio at gmail dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-12/txt/msg00245.txt.bz2 ------- Comment #3 from lauro dot venancio at gmail dot com 2007-12-03 23:42 ------- I think I'm facing a related problem. GCC is emitting unaligned array elements. struct ccstm { int32_t val; const char descr[]; }; static const struct ccstm canon_d30custom[] = { { 1, "Long exposure noise reduction" }, { 2, "Shutter/AE lock buttons" }, { 3, "Mirror lockup" } }; produces this assembly for arm-linux-gnueabi: .align 2 canon_d30custom: .word 1 .ascii "Long exposure noise reduction\000" .word 2 .ascii "Shutter/AE lock buttons\000" .word 3 .ascii "Mirror lockup\000" Note that the second and the third array element are unaligned. -- lauro dot venancio at gmail dot com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lauro dot venancio at gmail | |dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28865