aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-phiopt.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2021-11-09 15:29:36 +0100
committerJakub Jelinek <jakub@redhat.com>2021-11-09 15:29:36 +0100
commit0318df0ae63e47f6b2f30e96205d00dcb3696538 (patch)
tree3b1479df24d65d8218a705d4b420097a28d0eb80 /gcc/tree-ssa-phiopt.c
parenta22d910305a5232694ff48ead37a7f53e46b7202 (diff)
downloadgcc-0318df0ae63e47f6b2f30e96205d00dcb3696538.zip
gcc-0318df0ae63e47f6b2f30e96205d00dcb3696538.tar.gz
gcc-0318df0ae63e47f6b2f30e96205d00dcb3696538.tar.bz2
c++: Fix ICE on complex constant with -frounding-math [PR103114]
The FE uses build_complex which assumes that fold_convert will fold value to a constant. With -frounding-math that isn't guaranteed though. So, the patch instead fold_build2s COMPLEX_EXPR, which will result in build_complex if both arguments are constants, and otherwise will build COMPLEX_EXPR. build_zero_cst is an optimization for fold_convert (type, integer_zero_node). 2021-11-09 Jakub Jelinek <jakub@redhat.com> PR c++/103114 * parser.c (cp_parser_userdef_numeric_literal): Use fold_build2 with COMPLEX_EXPR arg instead of build_complex, use build_zero_cst instead of fold_convert from integer_zero_node. * g++.dg/ext/complex10.C: New test.
Diffstat (limited to 'gcc/tree-ssa-phiopt.c')
0 files changed, 0 insertions, 0 deletions