diff options
author | Jakub Jelinek <jakub@redhat.com> | 2018-01-13 18:00:43 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2018-01-13 18:00:43 +0100 |
commit | b4923738ef57a441f6f9248260848bde5af165fa (patch) | |
tree | 5e1b4802d2cab1d24b857680da9e4057d37fc2d7 /gcc/c/ChangeLog | |
parent | 567a6e1cdb3cae09ae74bdd528fd31c0b4956ad2 (diff) | |
download | gcc-b4923738ef57a441f6f9248260848bde5af165fa.zip gcc-b4923738ef57a441f6f9248260848bde5af165fa.tar.gz gcc-b4923738ef57a441f6f9248260848bde5af165fa.tar.bz2 |
re PR c/83801 ([avr] String constant in __flash not put into .progmem)
PR c/83801
* c-tree.h (decl_constant_value_1): Add a bool argument.
* c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
returning a CONSTRUCTOR if it is true. Use error_operand_p.
(decl_constant_value): Adjust caller.
* c-fold.c (c_fully_fold_internal): If in_init, pass true to
decl_constant_value_1 as IN_INIT. Otherwise, punt if
decl_constant_value returns initializer that has BLKmode or
array type.
(c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
* gcc.dg/pr83801.c: New test.
From-SVN: r256608
Diffstat (limited to 'gcc/c/ChangeLog')
-rw-r--r-- | gcc/c/ChangeLog | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index d15073e..95404fb 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,3 +1,16 @@ +2018-01-13 Jakub Jelinek <jakub@redhat.com> + + PR c/83801 + * c-tree.h (decl_constant_value_1): Add a bool argument. + * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow + returning a CONSTRUCTOR if it is true. Use error_operand_p. + (decl_constant_value): Adjust caller. + * c-fold.c (c_fully_fold_internal): If in_init, pass true to + decl_constant_value_1 as IN_INIT. Otherwise, punt if + decl_constant_value returns initializer that has BLKmode or + array type. + (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval. + 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org> Alan Hayward <alan.hayward@arm.com> David Sherwood <david.sherwood@arm.com> |