OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [warn/] [Wunused-label-3.C] - Rev 774

Go to most recent revision | Compare with Previous | Blame | View Log

// { dg-do compile }
// { dg-options "-Wunused-label" }

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>();

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.