libstdc++: Fix std::find for non-contiguous iterators [PR115799]
[official-gcc.git] / gcc / testsuite / g++.dg / parse / assign1.C
blobc0138c1449b937eaba3996fc8d44e4cc83618394
1 // PR c++/65525
3 struct A
5     int x;
6     char y; // Actually, short and bool (types smaller than int?) trigger this ICE too
7     // Also: the problem doesn't occur if you put the smaller type first, e.g. "char x; int y;"
9     A(int x) {} // custom ctor needed for ICE
12 int main()
14     A a(0), x(1), y(2);
16     x = a; // OK
17     y = a; // OK
18     x = y = a; // ICE: sorry, unimplemented: unexpected AST of kind mem_ref
19     // internal compiler error: in potential_constant_expression_1, at cp/constexpr.c:4432
21     return 0;