| Summary: | [C++0x][constexpr] internal error when initializing static constexpr with pointer to non-static member variable | ||
|---|---|---|---|
| Product: | gcc | Reporter: | Chris Studholme <cvs> |
| Component: | c++ | Assignee: | Jason Merrill <jason> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | jason |
| Priority: | P3 | ||
| Version: | 4.7.1 | ||
| Target Milestone: | 4.9.0 | ||
| Host: | Target: | ||
| Build: | Known to work: | ||
| Known to fail: | Last reconfirmed: | 2012-09-09 00:00:00 | |
| Bug Depends on: | |||
| Bug Blocks: | 55004 | ||
| Attachments: |
output of g++ -v
preprocessed source |
||
Created attachment 28155 [details]
preprocessed source
also ICEs on trunk Fixed for 4.9. |
Created attachment 28154 [details] output of g++ -v The following code triggers a segfault. struct reg { template <typename CLS, typename T> constexpr reg(T CLS::*) {} }; struct foo { }; struct bar { foo a; // both of these trigger internal error static constexpr foo bar::*reg_a = &bar::a; static constexpr reg reg_a = &bar::a; }; g++ --version g++ (Debian 4.7.1-7) 4.7.1 Copyright (C) 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 4.6 seems to have the same problem.