diff options
| author | Jason Merrill <jason@redhat.com> | 2015-06-11 11:45:08 -0400 |
|---|---|---|
| committer | Jason Merrill <jason@gcc.gnu.org> | 2015-06-11 11:45:08 -0400 |
| commit | 133bc698cb8f42e3655fc68fee19c62fd18d98f7 (patch) | |
| tree | a7f47c02064f13ba211155bec11f1c616d004ee1 /gcc/cp/constexpr.c | |
| parent | acb2970c3bdf4cfd81954278d28f53adcffab99c (diff) | |
| download | gcc-133bc698cb8f42e3655fc68fee19c62fd18d98f7.zip gcc-133bc698cb8f42e3655fc68fee19c62fd18d98f7.tar.gz gcc-133bc698cb8f42e3655fc68fee19c62fd18d98f7.tar.bz2 | |
re PR c++/66445 (ICE with lambda in stmt expression in a template)
PR c++/66445
* constexpr.c (potential_constant_expression_1): Handle a
DECL_EXPR of TYPE_DECL.
From-SVN: r224382
Diffstat (limited to 'gcc/cp/constexpr.c')
| -rw-r--r-- | gcc/cp/constexpr.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c index af6b39e..5dc59a4 100644 --- a/gcc/cp/constexpr.c +++ b/gcc/cp/constexpr.c @@ -4462,6 +4462,11 @@ potential_constant_expression_1 (tree t, bool want_rval, bool strict, } return false; + case TYPE_DECL: + case TAG_DEFN: + /* We can see these in statement-expressions. */ + return true; + default: if (objc_is_property_ref (t)) return false; |
