diff options
author | Marek Polacek <polacek@redhat.com> | 2014-07-08 05:38:12 +0000 |
---|---|---|
committer | Marek Polacek <mpolacek@gcc.gnu.org> | 2014-07-08 05:38:12 +0000 |
commit | 605f12f4dcb80940461150cfa9427a12653d8ed3 (patch) | |
tree | e4f77420db83c7c0c601b3cce97560e8b1722155 /gcc/fold-const.c | |
parent | 09aa4b1fac1f92c5d64bb21d5e51751786831186 (diff) | |
download | gcc-605f12f4dcb80940461150cfa9427a12653d8ed3.zip gcc-605f12f4dcb80940461150cfa9427a12653d8ed3.tar.gz gcc-605f12f4dcb80940461150cfa9427a12653d8ed3.tar.bz2 |
re PR middle-end/60226 (ICE initializing array of elements with too large alignment)
PR c/60226
* fold-const.c (round_up_loc): Change the parameter type.
Remove assert.
* fold-const.h (round_up_loc): Adjust declaration.
* stor-layout.c (finalize_record_size): Check for too large types.
* c-c++-common/pr60226.c: New test.
From-SVN: r212346
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index d22eac1..c57ac7b 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -16647,11 +16647,10 @@ fold_ignored_result (tree t) /* Return the value of VALUE, rounded up to a multiple of DIVISOR. */ tree -round_up_loc (location_t loc, tree value, int divisor) +round_up_loc (location_t loc, tree value, unsigned int divisor) { tree div = NULL_TREE; - gcc_assert (divisor > 0); if (divisor == 1) return value; |