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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [init/] [pr42844.C] - Blame information for rev 801

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

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/42844
2
// { dg-do compile }
3
 
4
struct A
5
{
6
  A(){}
7
};
8
 
9
struct B : A { int i; }; // { dg-message "user-provided default constructor" }
10
 
11
struct C : A { int i; }; // { dg-message "user-provided default constructor" }
12
 
13
struct D : B { D() {} };
14
 
15
struct E { int i; }; // { dg-message "user-provided default constructor" }
16
 
17
template 
18
struct F : A { T t; }; // { dg-message "user-provided default constructor" }
19
 
20
template 
21
struct G { T t; }; // { dg-message "user-provided default constructor" }
22
 
23
void f ()
24
{
25
  B const b;    // { dg-error "uninitialized const" }
26
  extern B const bext;
27
 
28
  C const c[ 1 ]; // { dg-error "uninitialized const" }
29
  extern C const cext[ 1 ];
30
 
31
  D const d;
32
  extern D const dext;
33
 
34
  E const e;    // { dg-error "uninitialized const" }
35
  extern E const eext;
36
 
37
  F const f; // { dg-error "uninitialized const" }
38
  extern F const fext;
39
 
40
  G const g; // { dg-error "uninitialized const" }
41
  extern G const gext;
42
}
43
 
44
struct H { int i; }; // { dg-message "user-provided default constructor" }
45
 
46
struct I : A { int i; }; // { dg-message "user-provided default constructor" }
47
 
48
template 
49
void g ()
50
{
51
  T const t; // { dg-error "uninitialized const" }
52
  extern T const text;
53
}
54
 
55
template void g ();
56
template void g ();

powered by: WebSVN 2.1.0

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