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

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [g++.dg/] [debug/] [dwarf2/] [typedef1.C] - Rev 384

Compare with Previous | Blame | View Log

// Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin: PR c++/40705
// { dg-options "-g -dA" }
// { dg-do compile }
// { dg-final { scan-assembler-times "DW_TAG_structure_type" 2 } }
// { dg-final { scan-assembler-times "DW_AT_name: \"foo<1u>\"|\"foo<1u>..\".*DW_AT_name" 1 } }
// { dg-final { scan-assembler-times "DW_TAG_enumeration_type" 2 } }
// { dg-final { scan-assembler-times "DW_AT_name: \"typedef foo<1u>::type type\"|\"typedef foo<1u>::type type..\".*DW_AT_name" 1 } }
// { dg-final { scan-assembler-times "DIE (.*) DW_TAG_enumeration_type" 2 } }
// { dg-final { scan-assembler-times "\"e0..\".*DW_AT_name" 1 } }
// { dg-final { scan-assembler-times "\"e1..\".*DW_AT_name" 1 } }

template <unsigned int n>
struct foo
{
public:
    typedef
 unsigned char type;
};

template<>
struct foo<1>
{
    typedef enum { e0, e1 } type;
};

int
main()
{
    foo<1> f;
    foo<1>::type t = foo<1>::e1;
    return t;
}

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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