Commit f44157f8 by Jakub Jelinek Committed by Jakub Jelinek

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
parent 2a63286d
2011-08-18 Jakub Jelinek <jakub@redhat.com> 2011-08-18 Jakub Jelinek <jakub@redhat.com>
PR target/50009
* stor-layout.c (update_alignment_for_field): Don't ICE on
packed flexible array members if ms_bitfield_layout_p.
PR target/50092 PR target/50092
* config/i386/i386.c (assign_386_stack_local): Call validize_mem * config/i386/i386.c (assign_386_stack_local): Call validize_mem
on the result before returning it. on the result before returning it.
......
/* C-compiler utilities for types and variables storage layout /* C-compiler utilities for types and variables storage layout
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1996, 1998, Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1996, 1998,
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
Free Software Foundation, Inc. 2011 Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -935,7 +935,8 @@ update_alignment_for_field (record_layout_info rli, tree field, ...@@ -935,7 +935,8 @@ update_alignment_for_field (record_layout_info rli, tree field,
applies if there was an immediately prior, nonzero-size applies if there was an immediately prior, nonzero-size
bitfield. (That's the way it is, experimentally.) */ bitfield. (That's the way it is, experimentally.) */
if ((!is_bitfield && !DECL_PACKED (field)) if ((!is_bitfield && !DECL_PACKED (field))
|| (!integer_zerop (DECL_SIZE (field)) || ((DECL_SIZE (field) == NULL_TREE
|| !integer_zerop (DECL_SIZE (field)))
? !DECL_PACKED (field) ? !DECL_PACKED (field)
: (rli->prev_field : (rli->prev_field
&& DECL_BIT_FIELD_TYPE (rli->prev_field) && DECL_BIT_FIELD_TYPE (rli->prev_field)
......
2011-08-18 Jakub Jelinek <jakub@redhat.com> 2011-08-18 Jakub Jelinek <jakub@redhat.com>
PR target/50009
* gcc.c-torture/compile/pr50009.c: New test.
PR target/50092 PR target/50092
* gcc.dg/torture/pr50092.c: New test. * gcc.dg/torture/pr50092.c: New test.
......
/* PR target/50009 */
struct S {
short a;
short b[];
} __attribute__((packed));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment