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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [ext/] [alias-decl-attr3.C] - Rev 693

Compare with Previous | Blame | View Log

// { dg-options "-std=c++0x" }
// { dg-do run }

template <class T>
int
align_of_type_wide_array()
{
    using type_wide_array __attribute((aligned(__alignof(T))))
        = unsigned char[sizeof (T)];

    return __alignof(type_wide_array);
}

int
main ()
{
    if (align_of_type_wide_array<int>() == __alignof(int))
        return 0;
    else
        return 1;
}

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.