dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] CVS: cscctest/c/decl struct1.3il,NONE,1.1 struct1


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: cscctest/c/decl struct1.3il,NONE,1.1 struct1.c,NONE,1.1 struct1.il,NONE,1.1 struct2.3il,NONE,1.1 struct2.c,NONE,1.1 struct2.il,NONE,1.1 Makefile.am,1.5,1.6
Date: Wed, 12 Mar 2003 02:55:01 -0500

Update of /cvsroot/dotgnu-pnet/cscctest/c/decl
In directory subversions:/tmp/cvs-serv23539/c/decl

Modified Files:
        Makefile.am 
Added Files:
        struct1.3il struct1.c struct1.il struct2.3il struct2.c 
        struct2.il 
Log Message:


Test cases for C structs.


--- NEW FILE ---
.assembly '<Assembly>'
{
        .ver 0:0:0:0
}
.module '<Module>'
.custom instance void OpenSystem.C.MemoryModelAttribute::.ctor(int32) = (01 00 
20 00 00 00 00 00)
.field public static valuetype 'struct x1' '_x1'
.class public explicit sealed serializable ansi 'struct x1' extends 
['.library']'System'.'ValueType'
{
.custom instance void 
['OpenSystem.C']'OpenSystem.C'.'BitFieldAttribute'::'.ctor'(class 
['.library']'System'.'String', class ['.library']'System'.'String', int32, 
int32) = (01 00 01 79 0B 2E 62 69 74 66 69 65 6C 64 2D 31 00 00 00 00 01 00 00 
00 00 00)
.custom instance void 
['OpenSystem.C']'OpenSystem.C'.'BitFieldAttribute'::'.ctor'(class 
['.library']'System'.'String', class ['.library']'System'.'String', int32, 
int32) = (01 00 01 7A 0B 2E 62 69 74 66 69 65 6C 64 2D 31 01 00 00 00 02 00 00 
00 00 00)
.custom instance void 
['OpenSystem.C']'OpenSystem.C'.'BitFieldAttribute'::'.ctor'(class 
['.library']'System'.'String', class ['.library']'System'.'String', int32, 
int32) = (01 00 01 77 0B 2E 62 69 74 66 69 65 6C 64 2D 32 00 00 00 00 04 00 00 
00 00 00)
.size 16
.pack 4
.field [0] public int32 'x'
.field [4] public int32 '.bitfield-1'
.field [8] public unsigned int32 '.bitfield-2'
.field [12] public int32 '.bitfield-3'
} // class struct x1

--- NEW FILE ---
/*
 * struct1.c - Test struct type specifiers.
 *
 * Copyright (C) 2002  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

struct x1
{
        int x;
        int y : 1;
        int z : 2;
        unsigned int w : 4;
        int : 6;
};

/* Use the types, to force them to be included in the IL output */
struct x1 _x1;

--- NEW FILE ---
.assembly '<Assembly>'
{
        .ver 0:0:0:0
}
.module '<Module>'
.custom instance void OpenSystem.C.MemoryModelAttribute::.ctor(int32) = (01 00 
40 00 00 00 00 00)
.field public static valuetype 'struct x1' '_x1'
.class public explicit sealed serializable ansi 'struct x1' extends 
['.library']'System'.'ValueType'
{
.custom instance void 
['OpenSystem.C']'OpenSystem.C'.'BitFieldAttribute'::'.ctor'(class 
['.library']'System'.'String', class ['.library']'System'.'String', int32, 
int32) = (01 00 01 79 0B 2E 62 69 74 66 69 65 6C 64 2D 31 00 00 00 00 01 00 00 
00 00 00)
.custom instance void 
['OpenSystem.C']'OpenSystem.C'.'BitFieldAttribute'::'.ctor'(class 
['.library']'System'.'String', class ['.library']'System'.'String', int32, 
int32) = (01 00 01 7A 0B 2E 62 69 74 66 69 65 6C 64 2D 31 01 00 00 00 02 00 00 
00 00 00)
.custom instance void 
['OpenSystem.C']'OpenSystem.C'.'BitFieldAttribute'::'.ctor'(class 
['.library']'System'.'String', class ['.library']'System'.'String', int32, 
int32) = (01 00 01 77 0B 2E 62 69 74 66 69 65 6C 64 2D 32 00 00 00 00 04 00 00 
00 00 00)
.size 16
.pack 4
.field [0] public int32 'x'
.field [4] public int32 '.bitfield-1'
.field [8] public unsigned int32 '.bitfield-2'
.field [12] public int32 '.bitfield-3'
} // class struct x1

--- NEW FILE ---
.assembly '<Assembly>'
{
        .ver 0:0:0:0
}
.module '<Module>'
.custom instance void OpenSystem.C.MemoryModelAttribute::.ctor(int32) = (01 00 
20 00 00 00 00 00)
.field public static valuetype 'union (T5xgHRfNMqBwUu1V7wuX_M)' 'untie'
.field public static valuetype 'struct (P2uJa1z6I7cuXWtWVAgYkM)' 't'
.class public explicit sealed serializable ansi 'union 
(T5xgHRfNMqBwUu1V7wuX_M)' extends ['.library']'System'.'ValueType'
{
.size 8
.pack 4
.field [0] public valuetype 'struct (E0EvaNELhKUmRf3e$EPHQA)' '__combined'
} // class union (T5xgHRfNMqBwUu1V7wuX_M)
.class public explicit sealed serializable ansi 'struct 
(P2uJa1z6I7cuXWtWVAgYkM)' extends ['.library']'System'.'ValueType'
{
.size 4
.pack 4
.field [0] public valuetype 'struct _GList' * 'data'
} // class struct (P2uJa1z6I7cuXWtWVAgYkM)
.class public explicit sealed serializable ansi 'struct 
(E0EvaNELhKUmRf3e$EPHQA)' extends ['.library']'System'.'ValueType'
{
.size 8
.pack 4
.field [0] public valuetype 'struct baz' 'abar'
} // class struct (E0EvaNELhKUmRf3e$EPHQA)
.class public explicit sealed serializable ansi 'struct _GList' extends 
['.library']'System'.'ValueType'
{
.size 12
.pack 4
.field [0] public void * 'data'
.field [4] public valuetype 'struct _GList' * 'next'
.field [8] public valuetype 'struct _GList' * 'prev'
} // class struct _GList
.class public explicit sealed serializable ansi 'struct baz' extends 
['.library']'System'.'ValueType'
{
.size 8
.pack 4
.field [0] public int32 'x'
.field [4] public method int32 *(int32 *, valuetype 'struct bar' *) 
modopt(['OpenSystem.C']'OpenSystem.C'.'IsFunctionPointer') * 'foo'
} // class struct baz
.class public explicit sealed serializable ansi 'struct bar' extends 
['.library']'System'.'ValueType'
{
.size 4
.pack 4
.field [0] public method int32 *(int32 *, valuetype 'struct baz' *) 
modopt(['OpenSystem.C']'OpenSystem.C'.'IsFunctionPointer') * 'pfoo'
} // class struct bar

--- NEW FILE ---
/*
 * struct2.c - Test circular structures with anonymous names.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

struct bar;
typedef int (* fpointer) (int *, struct bar *);
struct baz { int x; fpointer * foo;};
typedef int (* fbazpointer) (int *, struct baz *);
struct bar { fbazpointer * pfoo;};
typedef union { struct { struct baz abar; } __combined;} UNTIE; 
UNTIE untie;

typedef struct _GList GList;

struct _GList
{
void* data;
GList *next;
GList *prev;
};

typedef struct {
GList *data;
} test;

test t;

--- NEW FILE ---
.assembly '<Assembly>'
{
        .ver 0:0:0:0
}
.module '<Module>'
.custom instance void OpenSystem.C.MemoryModelAttribute::.ctor(int32) = (01 00 
40 00 00 00 00 00)
.field public static valuetype 'union (T5xgHRfNMqBwUu1V7wuX_M)' 'untie'
.field public static valuetype 'struct (P2uJa1z6I7cuXWtWVAgYkM)' 't'
.class public explicit sealed serializable ansi 'union 
(T5xgHRfNMqBwUu1V7wuX_M)' extends ['.library']'System'.'ValueType'
{
.size 16
.pack 8
.field [0] public valuetype 'struct (E0EvaNELhKUmRf3e$EPHQA)' '__combined'
} // class union (T5xgHRfNMqBwUu1V7wuX_M)
.class public explicit sealed serializable ansi 'struct 
(P2uJa1z6I7cuXWtWVAgYkM)' extends ['.library']'System'.'ValueType'
{
.size 8
.pack 8
.field [0] public valuetype 'struct _GList' * 'data'
} // class struct (P2uJa1z6I7cuXWtWVAgYkM)
.class public explicit sealed serializable ansi 'struct 
(E0EvaNELhKUmRf3e$EPHQA)' extends ['.library']'System'.'ValueType'
{
.size 16
.pack 8
.field [0] public valuetype 'struct baz' 'abar'
} // class struct (E0EvaNELhKUmRf3e$EPHQA)
.class public explicit sealed serializable ansi 'struct _GList' extends 
['.library']'System'.'ValueType'
{
.size 24
.pack 8
.field [0] public void * 'data'
.field [8] public valuetype 'struct _GList' * 'next'
.field [16] public valuetype 'struct _GList' * 'prev'
} // class struct _GList
.class public explicit sealed serializable ansi 'struct baz' extends 
['.library']'System'.'ValueType'
{
.size 16
.pack 8
.field [0] public int32 'x'
.field [8] public method int32 *(int32 *, valuetype 'struct bar' *) 
modopt(['OpenSystem.C']'OpenSystem.C'.'IsFunctionPointer') * 'foo'
} // class struct baz
.class public explicit sealed serializable ansi 'struct bar' extends 
['.library']'System'.'ValueType'
{
.size 8
.pack 8
.field [0] public method int32 *(int32 *, valuetype 'struct baz' *) 
modopt(['OpenSystem.C']'OpenSystem.C'.'IsFunctionPointer') * 'pfoo'
} // class struct bar

Index: Makefile.am
===================================================================
RCS file: /cvsroot/dotgnu-pnet/cscctest/c/decl/Makefile.am,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** Makefile.am 13 Sep 2002 01:05:37 -0000      1.5
--- Makefile.am 12 Mar 2003 07:54:59 -0000      1.6
***************
*** 3,6 ****
--- 3,8 ----
                cdtor2.c \
                proto1.c \
+               struct1.c \
+               struct2.c \
                type1.c \
                type2.c \





reply via email to

[Prev in Thread] Current Thread [Next in Thread]