re PR c/19449 (__builtin_constant_p cannot resolve to const when optimizing)
authorJakub Jelinek <jakub@redhat.com>
Wed, 3 Apr 2013 09:17:44 +0000 (11:17 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 3 Apr 2013 09:17:44 +0000 (11:17 +0200)
commit4e7d7b3d5d5cefd5e19a736a83c3077f7c95baad
treeee1f834718a018ae1e4059bf0a7d4d879d20def1
parente6c9d234044bae3de1941cb7d654dc9d3425fd1b
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
gcc/ChangeLog
gcc/builtins.c
gcc/c/ChangeLog
gcc/c/c-parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/pr19449.c [new file with mode: 0644]
gcc/tree.h