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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [ext/] [tmplattr5.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
// PR c++/19407
2
// { dg-do run }
3
 
4
typedef float global_vector_type __attribute__((vector_size(16)));
5
 
6
template  struct A
7
{
8
  typedef T type;
9
};
10
 
11
template < typename Val > struct S
12
{
13
  typedef typename A::type vector_type __attribute__((vector_size(16)));
14
  typedef Val vector_type2 __attribute__((vector_size(16)));
15
  int pr_size() { return sizeof(vector_type); }
16
  int pr_size2() { return sizeof(vector_type2); }
17
};
18
 
19
int main()
20
{
21
  if (sizeof (S::vector_type) != sizeof (global_vector_type))
22
    return 1;
23
  if (sizeof (S::vector_type2) != sizeof (global_vector_type))
24
    return 2;
25
 
26
  S x;
27
  if (x.pr_size() != sizeof (global_vector_type))
28
    return 3;
29
  if (x.pr_size2() != sizeof (global_vector_type))
30
    return 4;
31
 
32
  return 0;
33
}

powered by: WebSVN 2.1.0

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