[Bug c++/83227] New: [7 Regression] internal compiler error: in process_init_constructor_array
sgunderson at bigfoot dot com
gcc-bugzilla@gcc.gnu.org
Thu Nov 30 13:01:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83227
Bug ID: 83227
Summary: [7 Regression] internal compiler error: in
process_init_constructor_array
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: sgunderson at bigfoot dot com
Target Milestone: ---
I believe this is distinct from #82593, so I'm filing it as a separate bug.
The following test program dies with GCC 7.2.0 with -std=c++17:
#include <initializer_list>
#include <vector>
struct Direction {
Direction() {}
};
struct Front_back : public Direction {
Front_back() : Direction() {}
};
void foo(const std::vector<Direction> &elements);
void bar() {
foo({ Front_back{} });
}
test.cc: In function ‘void bar()’:
test.cc:15:23: internal compiler error: in process_init_constructor_array, at
cp/typeck2.c:1308
foo({ Front_back{} });
^
Please submit a full bug report,
with preprocessed source if appropriate.
It works with GCC 6.4.0, and also with -std=c++14. It's still there in the
20171109 snapshot.
Reduced preprocessed case:
namespace std {
template <class a> class initializer_list {
const a *b;
unsigned long c;
};
struct e {
e(int);
};
template <typename d> class f : e {
public:
f(initializer_list<d>, int g = int()) : e(g) {}
};
}
struct h {};
struct i : h {
i();
};
void foo(std::f<h>) { foo({i{}}); }
More information about the Gcc-bugs
mailing list