PR c++/91644 - ICE with constinit in function template.
authorMarek Polacek <polacek@redhat.com>
Thu, 5 Sep 2019 15:37:52 +0000 (15:37 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Thu, 5 Sep 2019 15:37:52 +0000 (15:37 +0000)
commitbb64bef659dc5b11fe1f8ff1f7df65603c9d8876
tree4915ab25b64bdbc9959c1361e1c0ad9dc63ec1d2
parentb2c113aed6f2ae2fca28cd5a8fab9c857b97dd2b
PR c++/91644 - ICE with constinit in function template.

* decl.c (start_decl): Call retrofit_lang_decl for constinit variables.
* pt.c (tsubst_expr): Pass LOOKUP_CONSTINIT down to cp_finish_decl for
constinit variables.

* g++.dg/cpp2a/constinit13.C: New test.

From-SVN: r275421
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/cp/pt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp2a/constinit13.C [new file with mode: 0644]