OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [template/] [error34.C] - Blame information for rev 314

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

Line No. Rev Author Line
1 301 jeremybenn
// PR c++/33842
2
// { dg-do compile }
3
 
4
template struct A
5
{
6
  A<__builtin_offsetof(T, x)>();  // { dg-error "type/value mismatch|offsetof\\(T, x\\)" }
7
};
8
 
9
template struct B
10
{
11
  B<__builtin_offsetof(T, x.y)>();  // { dg-error "type/value mismatch|offsetof\\(T, x.y\\)" }
12
};
13
 
14
template struct C
15
{
16
  C<__builtin_offsetof(T, x[6])>();  // { dg-error "type/value mismatch|offsetof\\(T, x\\\[6\\\]\\)" }
17
};
18
 
19
template struct D
20
{
21
  D<__builtin_offsetof(T, x.y[6].z)>();  // { dg-error "type/value mismatch|offsetof\\(T, x.y\\\[6\\\].z\\)" }
22
};
23
 
24
struct E { int x; };
25
 
26
template struct F
27
{
28
  F<__builtin_offsetof(E, x)>();  // { dg-error "type/value mismatch|offsetof\\(E, x\\)" }
29
};

powered by: WebSVN 2.1.0

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