This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/22043] [4.1 Regression] Fields not initialized for automatic structs with flexible array members
- From: "cvs-commit at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Aug 2005 07:28:58 -0000
- Subject: [Bug middle-end/22043] [4.1 Regression] Fields not initialized for automatic structs with flexible array members
- References: <20050613085208.22043.jakub@redhat.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-08-23 07:28 -------
Subject: Bug 22043
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: jakub@gcc.gnu.org 2005-08-23 07:28:26
Modified files:
gcc : ChangeLog expr.c gimplify.c tree-sra.c tree.h
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gcc.c-torture/execute: 20050613-1.c
Log message:
PR tree-optimization/22043
* tree.h (count_type_elements): Add ALLOW_FLEXARR argument.
* expr.c (count_type_elements): Add ALLOW_FLEXARR argument.
If ALLOW_FLEXARR, handle types ending with flexible array member.
Pass false as second argument to recursive count_type_elements calls.
(categorize_ctor_elements_1, mostly_zeros_p): Pass false as second
argument to count_type_elements call.
* tree-sra.c (decide_block_copy): Likewise.
* gimplify.c (gimplify_init_constructor): If num_type_elements < 0
for a constant-sized object, set cleared as well. Pass true as
second argument to count_type_elements call.
* gcc.c-torture/execute/20050613-1.c: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.9803&r2=2.9804
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/expr.c.diff?cvsroot=gcc&r1=1.808&r2=1.809
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/gimplify.c.diff?cvsroot=gcc&r1=2.147&r2=2.148
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-sra.c.diff?cvsroot=gcc&r1=2.70&r2=2.71
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree.h.diff?cvsroot=gcc&r1=1.753&r2=1.754
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5951&r2=1.5952
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/20050613-1.c.diff?cvsroot=gcc&r1=1.1&r2=1.2
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22043