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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [obj-c++.dg/] [encode-9.mm] - Blame information for rev 703

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 703 jeremybenn
/* Test than @encode is properly instantiated. */
2
/* { dg-options "-lobjc" } */
3
/* { dg-do run } */
4
 
5
#include 
6
#include 
7
#include 
8
 
9
template
10
class typeOf {
11
public:
12
    operator const char*() { return @encode(T); }
13
};
14
 
15
int main() {
16
    typeOf t;
17
    if (strcmp ((const char *)t, @encode(int)))
18
      abort();
19
 
20
    typeOf c;
21
    if (strcmp ((const char *)c, @encode(const char*)))
22
      abort();
23
 
24
    return 0;
25
}
26
 

powered by: WebSVN 2.1.0

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