PR c++/92134 - constinit malfunction in static data member.
authorMarek Polacek <polacek@redhat.com>
Wed, 30 Oct 2019 18:49:59 +0000 (18:49 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Wed, 30 Oct 2019 18:49:59 +0000 (18:49 +0000)
commitd54faccc041ce5841206b5ec1ac835196f203a75
tree9230d1fb68a43e33269aa87b630df9e56de9ee05
parentce001b300fc7bd22cbb2712b6d06e5043fe6354f
PR c++/92134 - constinit malfunction in static data member.

I wasn't properly setting LOOKUP_CONSTINIT in grokfield and so we didn't
detect a non-const initializer.

* decl2.c (grokfield): Set LOOKUP_CONSTINIT.

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

From-SVN: r277636
gcc/cp/ChangeLog
gcc/cp/decl2.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp2a/constinit14.C [new file with mode: 0644]