diff options
author | Jakub Jelinek <jakub@redhat.com> | 2013-04-03 11:17:44 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2013-04-03 11:17:44 +0200 |
commit | 4e7d7b3d5d5cefd5e19a736a83c3077f7c95baad (patch) | |
tree | ee1f834718a018ae1e4059bf0a7d4d879d20def1 /gcc/tree.h | |
parent | e6c9d234044bae3de1941cb7d654dc9d3425fd1b (diff) | |
download | gcc-4e7d7b3d5d5cefd5e19a736a83c3077f7c95baad.zip gcc-4e7d7b3d5d5cefd5e19a736a83c3077f7c95baad.tar.gz gcc-4e7d7b3d5d5cefd5e19a736a83c3077f7c95baad.tar.bz2 |
re PR c/19449 (__builtin_constant_p cannot resolve to const when optimizing)
PR c/19449
* tree.h (force_folding_builtin_constant_p): New decl.
* builtins.c (force_folding_builtin_constant_p): New variable.
(fold_builtin_constant_p): Fold immediately also if
force_folding_builtin_constant_p.
* c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
argument. If set, or it temporarily for parsing of the first
argument into force_folding_builtin_constant_p.
(c_parser_postfix_expression): Adjust callers.
* gcc.c-torture/execute/pr19449.c: New test.
From-SVN: r197393
Diffstat (limited to 'gcc/tree.h')
-rw-r--r-- | gcc/tree.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -5855,6 +5855,10 @@ fold_build_pointer_plus_hwi_loc (location_t loc, tree ptr, HOST_WIDE_INT off) fold_build_pointer_plus_hwi_loc (UNKNOWN_LOCATION, p, o) /* In builtins.c */ + +/* Non-zero if __builtin_constant_p should be folded right away. */ +extern bool force_folding_builtin_constant_p; + extern bool avoid_folding_inline_builtin (tree); extern tree fold_call_expr (location_t, tree, bool); extern tree fold_builtin_fputs (location_t, tree, tree, bool, bool, tree); |