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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [ext/] [attr-used-1.C] - Rev 696

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

// Attribute used on a member function or static data member
// of a template should cause them to be instantiated along
// with the class itself.

// { dg-final { scan-assembler "_ZN1AIiE1fEv" } }
// { dg-final { scan-assembler "_ZN1AIiE1tE" } }

template <class T> struct A
{
  void f() __attribute ((used));
  static T t __attribute ((used));
};

template <class T> void A<T>::f() { }
template <class T> T A<T>::t;

A<int> a;

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.