Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/warn/Wunused-label-3.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
// { dg-do compile } // { dg-options "-Wunused-label" } // { dg-require-effective-target indirect_jumps } extern void f9(); template<int i> void f1() { if (i) return; l1: f9(); // { dg-warning "not used" } l3: ; f9(); // { dg-warning "not used" } l4: __attribute__ ((unused)) ; f9(); } template void f1<0>(); template<int i> void f2() { if (i) return; l1: f9(); // { dg-warning "not used" } l3: ; f9(); // { dg-warning "not used" } l4: __attribute__ ((unused)) ; f9(); } template void f2<1>(); template<int i> void f3() { void* lab; l1: f9(); l2: __attribute__ ((unused)) ; f9(); lab = i ? &&l1 : &&l2; goto *lab; } template void f3<0>(); template void f3<1>();