diff options
author | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2014-01-08 17:25:38 +0000 |
---|---|---|
committer | Bernd Edlinger <edlinger@gcc.gnu.org> | 2014-01-08 17:25:38 +0000 |
commit | 4c437f02c24d896b08267b39cd8c8216da3bce4e (patch) | |
tree | 499113f371f2643e026cc3b0aa0d39e87de14525 /gcc/expr.h | |
parent | 40d6b7535cdc6b2fbe02ba7dc3335a14bf343ea3 (diff) | |
download | gcc-4c437f02c24d896b08267b39cd8c8216da3bce4e.zip gcc-4c437f02c24d896b08267b39cd8c8216da3bce4e.tar.gz gcc-4c437f02c24d896b08267b39cd8c8216da3bce4e.tar.bz2 |
re PR middle-end/57748 (ICE when expanding assignment to unaligned zero-sized array)
2014-01-08 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR middle-end/57748
* expr.h (expand_expr_real, expand_expr_real_1): Add new parameter
inner_reference_p.
(expand_expr, expand_normal): Adjust.
* expr.c (expand_expr_real, expand_expr_real_1): Add new parameter
inner_reference_p. Use inner_reference_p to expand inner references.
(store_expr): Adjust.
* cfgexpand.c (expand_call_stmt): Adjust.
testsuite:
2014-01-08 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR middle-end/57748
* gcc.dg/torture/pr57748-3.c: New test.
* gcc.dg/torture/pr57748-4.c: New test.
From-SVN: r206437
Diffstat (limited to 'gcc/expr.h')
-rw-r--r-- | gcc/expr.h | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -41,7 +41,8 @@ along with GCC; see the file COPYING3. If not see is a constant that is not a legitimate address. EXPAND_WRITE means we are only going to write to the resulting rtx. EXPAND_MEMORY means we are interested in a memory result, even if - the memory is constant and we could have propagated a constant value. */ + the memory is constant and we could have propagated a constant value, + or the memory is unaligned on a STRICT_ALIGNMENT target. */ enum expand_modifier {EXPAND_NORMAL = 0, EXPAND_STACK_PARM, EXPAND_SUM, EXPAND_CONST_ADDRESS, EXPAND_INITIALIZER, EXPAND_WRITE, EXPAND_MEMORY}; @@ -437,9 +438,9 @@ extern rtx force_operand (rtx, rtx); /* Work horses for expand_expr. */ extern rtx expand_expr_real (tree, rtx, enum machine_mode, - enum expand_modifier, rtx *); + enum expand_modifier, rtx *, bool); extern rtx expand_expr_real_1 (tree, rtx, enum machine_mode, - enum expand_modifier, rtx *); + enum expand_modifier, rtx *, bool); extern rtx expand_expr_real_2 (sepops, rtx, enum machine_mode, enum expand_modifier); @@ -450,13 +451,13 @@ static inline rtx expand_expr (tree exp, rtx target, enum machine_mode mode, enum expand_modifier modifier) { - return expand_expr_real (exp, target, mode, modifier, NULL); + return expand_expr_real (exp, target, mode, modifier, NULL, false); } static inline rtx expand_normal (tree exp) { - return expand_expr_real (exp, NULL_RTX, VOIDmode, EXPAND_NORMAL, NULL); + return expand_expr_real (exp, NULL_RTX, VOIDmode, EXPAND_NORMAL, NULL, false); } /* At the start of a function, record that we have no previously-pushed |