PR c/83222
commita8f15ac7d86950e5eac2b32f6a53ebd3ca437f12
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 30 Nov 2017 23:43:10 +0000 (30 23:43 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 30 Nov 2017 23:43:10 +0000 (30 23:43 +0000)
tree45bebb503a52bf8726cdc05432ea9875c8ef1bdd
parent7f38a6aaa308745d9eb3cf47ca18102da4fa698d
PR c/83222
* c-tree.h (decl_constant_value_1): Declare.
* c-typeck.c (decl_constant_value_1): New function.
(decl_constant_value): Use it.
* c-fold.c (c_fully_fold_internal): If in_init, use
decl_constant_value_1 instead of decl_constant_value.

* gcc.c-torture/compile/pr83222.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@255285 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/c/ChangeLog
gcc/c/c-fold.c
gcc/c/c-tree.h
gcc/c/c-typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/pr83222.c [new file with mode: 0644]