aboutsummaryrefslogtreecommitdiff
path: root/gcc/stor-layout.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2011-08-18 16:29:10 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2011-08-18 16:29:10 +0200
commitf44157f84be4cc82697697136464ed7711595aa5 (patch)
treefddcb74210d82810ffc46db601a295575dc146eb /gcc/stor-layout.c
parent2a63286d368fe6b627912d8db5c879e14400c72c (diff)
downloadgcc-f44157f84be4cc82697697136464ed7711595aa5.zip
gcc-f44157f84be4cc82697697136464ed7711595aa5.tar.gz
gcc-f44157f84be4cc82697697136464ed7711595aa5.tar.bz2
re PR target/50009 (Segmentation fault in tree_nop_conversion)
PR target/50009 * stor-layout.c (update_alignment_for_field): Don't ICE on packed flexible array members if ms_bitfield_layout_p. * gcc.c-torture/compile/pr50009.c: New test. From-SVN: r177860
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r--gcc/stor-layout.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index e488741..f15da0c 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -1,7 +1,7 @@
/* C-compiler utilities for types and variables storage layout
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1996, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
- Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+ 2011 Free Software Foundation, Inc.
This file is part of GCC.
@@ -935,7 +935,8 @@ update_alignment_for_field (record_layout_info rli, tree field,
applies if there was an immediately prior, nonzero-size
bitfield. (That's the way it is, experimentally.) */
if ((!is_bitfield && !DECL_PACKED (field))
- || (!integer_zerop (DECL_SIZE (field))
+ || ((DECL_SIZE (field) == NULL_TREE
+ || !integer_zerop (DECL_SIZE (field)))
? !DECL_PACKED (field)
: (rli->prev_field
&& DECL_BIT_FIELD_TYPE (rli->prev_field)