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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libgo/] [go/] [debug/] [dwarf/] [testdata/] [typedef.c] - Blame information for rev 747

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 747 jeremybenn
// Copyright 2009 The Go Authors.  All rights reserved.
2
// Use of this source code is governed by a BSD-style
3
// license that can be found in the LICENSE file.
4
 
5
/*
6
Linux ELF:
7
gcc -gdwarf-2 -m64 -c typedef.c && gcc -gdwarf-2 -m64 -o typedef.elf typedef.o
8
 
9
OS X Mach-O:
10
gcc -gdwarf-2 -m64 -c typedef.c -o typedef.macho
11
*/
12
#include <complex.h>
13
 
14
typedef volatile int* t_ptr_volatile_int;
15
typedef const char *t_ptr_const_char;
16
typedef long t_long;
17
typedef unsigned short t_ushort;
18
typedef int t_func_int_of_float_double(float, double);
19
typedef int (*t_ptr_func_int_of_float_double)(float, double);
20
typedef int (*t_ptr_func_int_of_float_complex)(float complex);
21
typedef int (*t_ptr_func_int_of_double_complex)(double complex);
22
typedef int (*t_ptr_func_int_of_long_double_complex)(long double complex);
23
typedef int *t_func_ptr_int_of_char_schar_uchar(char, signed char, unsigned char);
24
typedef void t_func_void_of_char(char);
25
typedef void t_func_void_of_void(void);
26
typedef void t_func_void_of_ptr_char_dots(char*, ...);
27
typedef struct my_struct {
28
        volatile int vi;
29
        char x : 1;
30
        int y : 4;
31
        long long array[40];
32
} t_my_struct;
33
typedef union my_union {
34
        volatile int vi;
35
        char x : 1;
36
        int y : 4;
37
        long long array[40];
38
} t_my_union;
39
typedef enum my_enum {
40
        e1 = 1,
41
        e2 = 2,
42
        e3 = -5,
43
        e4 = 1000000000000000LL,
44
} t_my_enum;
45
 
46
typedef struct list t_my_list;
47
struct list {
48
        short val;
49
        t_my_list *next;
50
};
51
 
52
typedef struct tree {
53
        struct tree *left, *right;
54
        unsigned long long val;
55
} t_my_tree;
56
 
57
t_ptr_volatile_int *a2;
58
t_ptr_const_char **a3a;
59
t_long *a4;
60
t_ushort *a5;
61
t_func_int_of_float_double *a6;
62
t_ptr_func_int_of_float_double *a7;
63
t_func_ptr_int_of_char_schar_uchar *a8;
64
t_func_void_of_char *a9;
65
t_func_void_of_void *a10;
66
t_func_void_of_ptr_char_dots *a11;
67
t_my_struct *a12;
68
t_my_union *a12a;
69
t_my_enum *a13;
70
t_my_list *a14;
71
t_my_tree *a15;
72
t_ptr_func_int_of_float_complex *a16;
73
t_ptr_func_int_of_double_complex *a17;
74
t_ptr_func_int_of_long_double_complex *a18;
75
 
76
int main()
77
{
78
        return 0;
79
}

powered by: WebSVN 2.1.0

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