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-attr4.C] - Blame information for rev 696

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

Line No. Rev Author Line
1 693 jeremybenn
// { dg-options "-std=c++0x" }
2
// { dg-do run }
3
 
4
using global_vector_type  __attribute__((vector_size(16))) = float;
5
 
6
template  struct A
7
{
8
    using type = T;
9
};
10
 
11
template < typename Val > struct S
12
{
13
    using vector_type __attribute__((vector_size(16))) =
14
        typename A::type;
15
        typedef Val vector_type2 __attribute__((vector_size(16)));
16
    int pr_size() { return sizeof(vector_type); }
17
    int pr_size2() { return sizeof(vector_type2); }
18
};
19
 
20
int main()
21
{
22
  if (sizeof (S::vector_type) != sizeof (global_vector_type))
23
    return 1;
24
  if (sizeof (S::vector_type2) != sizeof (global_vector_type))
25
    return 2;
26
 
27
  S x;
28
  if (x.pr_size() != sizeof (global_vector_type))
29
    return 3;
30
  if (x.pr_size2() != sizeof (global_vector_type))
31
    return 4;
32
 
33
  return 0;
34
}

powered by: WebSVN 2.1.0

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