[Bug c++/92134] static constinit members incorrectly compile
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Oct 30 18:50:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92134
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Wed Oct 30 18:49:59 2019
New Revision: 277636
URL: https://gcc.gnu.org/viewcvs?rev=277636&root=gcc&view=rev
Log:
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.
Added:
trunk/gcc/testsuite/g++.dg/cpp2a/constinit14.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl2.c
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list