gimplify: Gimplify value in gimplify_init_ctor_eval_range [PR98353]
authorJakub Jelinek <jakub@redhat.com>
Mon, 21 Dec 2020 23:01:34 +0000 (00:01 +0100)
committerJakub Jelinek <jakub@redhat.com>
Mon, 21 Dec 2020 23:01:34 +0000 (00:01 +0100)
commita477f1445b3093d01e68cd4c096c5776ad769e11
treebd22d2e33e4b72ccdd2652dbeb6eacaf100ba139
parent8cd42d3cc2461df394c718afc270574a061a6ef6
gimplify: Gimplify value in gimplify_init_ctor_eval_range [PR98353]

gimplify_init_ctor_eval_range wasn't gimplifying value, so if it wasn't
a gimple val, verification at the end of gimplification would ICE (or with
release checking some random pass later on would ICE or misbehave).

2020-12-21  Jakub Jelinek  <jakub@redhat.com>

PR c++/98353
* gimplify.c (gimplify_init_ctor_eval_range): Gimplify value before
storing it into cref.

* g++.dg/opt/pr98353.C: New test.
gcc/gimplify.c
gcc/testsuite/g++.dg/opt/pr98353.C [new file with mode: 0644]