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

Subversion Repositories openrisc

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

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
// { dg-options "-std=c++0x" }
4
 
5
struct A // { dg-message "user-provided default constructor" }
6
{
7
    int i;
8
    A() = default; // { dg-message "not user-provided" }
9
};
10
 
11
struct Base
12
{
13
    Base() {}
14
};
15
 
16
struct Derived : Base // { dg-message "user-provided default constructor" }
17
{
18
    int i;
19
    Derived() = default; // { dg-message "not user-provided" }
20
};
21
 
22
struct Derived2 : Base // { dg-message "user-provided default constructor" }
23
{
24
    int i;
25
    Derived2() = default; // { dg-message "not user-provided" }
26
    Derived2( Derived2 const& ) = default;
27
};
28
 
29
struct Derived3 : Base // { dg-message "user-provided default constructor" }
30
{
31
    int i;
32
    Derived3( Derived3 const& ) = default;
33
    Derived3() = default; // { dg-message "not user-provided" }
34
};
35
 
36
void f()
37
{
38
    const A a; // { dg-error "uninitialized const" }
39
    const Derived d; // { dg-error "uninitialized const" }
40
    const Derived2 d2; // { dg-error "uninitialized const" }
41
    const Derived3 d3; // { dg-error "uninitialized const" }
42
}

powered by: WebSVN 2.1.0

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