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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [debug/] [dwarf2/] [typedef1.C] - Blame information for rev 742

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

Line No. Rev Author Line
1 693 jeremybenn
// Contributed by Dodji Seketeli 
2
// Origin: PR c++/40705
3
// { dg-options "-g -dA" }
4
// { dg-do compile }
5
// { dg-final { scan-assembler-times "DW_TAG_structure_type" 2 } }
6
// { dg-final { scan-assembler-times "DW_AT_name: \"foo<1u>\"|\"foo<1u>..\"\[^\n\]*DW_AT_name" 1 } }
7
// { dg-final { scan-assembler-times "DW_TAG_enumeration_type" 2 } }
8
// { dg-final { scan-assembler-times "DW_AT_name: \"typedef foo<1u>::type type\"|\"typedef foo<1u>::type type..\"\[^\n\]*DW_AT_name" 1 } }
9
// { dg-final { scan-assembler-times "DIE \\(\[^\n\]*\\) DW_TAG_enumeration_type" 1 } }
10
// { dg-final { scan-assembler-times "\"e0..\"\[^\n\]*DW_AT_name" 1 } }
11
// { dg-final { scan-assembler-times "\"e1..\"\[^\n\]*DW_AT_name" 1 } }
12
 
13
template 
14
struct foo
15
{
16
public:
17
    typedef
18
 unsigned char type;
19
};
20
 
21
template<>
22
struct foo<1>
23
{
24
    typedef enum { e0, e1 } type;
25
};
26
 
27
int
28
main()
29
{
30
    foo<1> f;
31
    foo<1>::type t = foo<1>::e1;
32
    return t;
33
}

powered by: WebSVN 2.1.0

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