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/c-tree.h | |
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/c-tree.h')
-rw-r--r-- | gcc/c/c-tree.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/c/c-tree.h b/gcc/c/c-tree.h index 84b5b95..ae1a1e6 100644 --- a/gcc/c/c-tree.h +++ b/gcc/c/c-tree.h @@ -640,7 +640,7 @@ extern struct c_expr default_function_array_read_conversion (location_t, struct c_expr); extern struct c_expr convert_lvalue_to_rvalue (location_t, struct c_expr, bool, bool); -extern tree decl_constant_value_1 (tree); +extern tree decl_constant_value_1 (tree, bool); extern void mark_exp_read (tree); extern tree composite_type (tree, tree); extern tree build_component_ref (location_t, tree, tree, location_t); |