Fortran: ICE in gfc_conv_expr_present w. defined assignment [PR118640]
[gcc.git] / libstdc++-v3 / testsuite / 23_containers / array / creation / 111512.cc
blobb0f25a62153d8c43436035a7cfdfc84c72b268b3
1 // { dg-do compile { target c++20 } }
3 // Bug libstdc++/111511 - Incorrect ADL in std::to_array in GCC 11/12/13
4 // Bug c++/111512 - GCC's __builtin_memcpy can trigger ADL
6 #include <array>
7 #include <utility>
9 struct incomplete;
11 template<class T>
12 struct holder {
13 T t; // { dg-bogus "'holder<T>::t' has incomplete type" }
16 // A complete type that cannot be used as an associated type for ADL.
17 using adl_bomb = holder<incomplete>*;
19 int main()
21 adl_bomb a[1]{};
22 (void) std::to_array(a);
23 (void) std::to_array(std::move(a));