Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.old-deja/g++.other/volatile1.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
// { dg-do assemble } // Test that failed lvalue-to-rvalue conversion of vf doesn't crash the // compiler. class f_class // { dg-message "note" "candidates" } { }; volatile f_class // { dg-warning "deprecated" "" { target c++2a } } ret_v_f_class() { f_class t; return t; } int main(void) { volatile f_class vf; 0 ? ret_v_f_class() : vf; // { dg-error "volatile" } can't copy volatile lvalue return 0; }