re PR c++/85134 (ICE with invalid constexpr in 'shared' OpenMP clause)
authorJakub Jelinek <jakub@redhat.com>
Tue, 3 Apr 2018 16:20:02 +0000 (18:20 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 3 Apr 2018 16:20:02 +0000 (18:20 +0200)
commitb0493acbe61a7c51771c6a1e1abc8c568341c498
tree47d326b2b66f6c0d5f619681e35e5a43c1ebab22
parent4304d6180adc0b3ef2c9fe2a63e829d5f518a12d
re PR c++/85134 (ICE with invalid constexpr in 'shared' OpenMP clause)

PR c++/85134
* decl.c (cp_finish_decl): If ensure_literal_type_for_constexpr_object
fails, after clearing DECL_DECLARED_CONSTEXPR_P don't return early,
instead for static data members clear init and set DECL_EXTERNAL.

* g++.dg/gomp/pr85134.C: New test.
* g++.dg/cpp0x/constexpr-ice19.C: Expect one further error.

From-SVN: r259038
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/constexpr-ice19.C
gcc/testsuite/g++.dg/gomp/pr85134.C [new file with mode: 0644]