gcc/testsuite/g++.dg/cpp0x/rv-cast7.C
raw| 1 | // PR c++/93862 - ICE with static_cast when converting from int[]. |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | |
| 4 | int(&&intu_rvref)[]{1,2,3,4}; |
| 5 | int(&int4_lvref)[4] = static_cast<int(&)[4]>(intu_rvref); // { dg-error "invalid .static_cast." } |
| 6 | int(&&int4_rvref)[4] = static_cast<int(&&)[4]>(intu_rvref); // { dg-error "invalid .static_cast." } |