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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [tm/] [pr51411-2.C] - Blame information for rev 709

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

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do compile }
2
// { dg-options "-fgnu-tm -O0" }
3
 
4
namespace std {
5
template struct char_traits;
6
 
7
template class allocator {
8
};
9
 
10
template struct less {
11
    bool operator()(const _Tp& __x, const _Tp& __y) const {
12
        return __x < __y;
13
    }
14
};
15
 
16
template  > class map {
17
public:
18
    _Compare _M_key_compare;
19
    bool find(const _Key& __x) {
20
        return _M_key_compare(__x, __x);
21
    }
22
};
23
 
24
template, typename _Alloc = allocator<_CharT> > class basic_string {
25
public:
26
    bool compare(const basic_string& __str) const {
27
        return 0;
28
    }
29
};
30
 
31
typedef basic_string string;
32
 
33
template
34
inline bool operator<(const basic_string<_CharT, _Traits>& __lhs, const basic_string<_CharT, _Traits>& __rhs) {
35
    return __lhs.compare(__rhs);
36
}
37
 
38
extern template class basic_string;
39
 
40
}
41
 
42
std::map units;
43
 
44
__attribute__((transaction_callable))
45
void get(const std::string &name) {
46
    units.find(name);
47
}
48
 
49
// { dg-final { scan-assembler "_ZGTtNKSs7compareERKSs:" } }

powered by: WebSVN 2.1.0

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