Index: /mpich2/trunk/test/mpi/datatype/Makefile.sm
===================================================================
--- /mpich2/trunk/test/mpi/datatype/Makefile.sm (revision 4822)
+++ /mpich2/trunk/test/mpi/datatype/Makefile.sm (revision 4868)
@@ -3,4 +3,5 @@
 smvar_do_sharedlibs = 0
 
+typecommit_SOURCES = typecommit.c
 typename_SOURCES = typename.c
 typefree_SOURCES = typefree.c
Index: /mpich2/trunk/test/mpi/datatype/testlist
===================================================================
--- /mpich2/trunk/test/mpi/datatype/testlist (revision 4345)
+++ /mpich2/trunk/test/mpi/datatype/testlist (revision 4868)
@@ -7,4 +7,5 @@
 slice-pack 1
 struct-pack 1
+typecommit 1
 typename 1
 typefree 1
Index: /mpich2/trunk/test/mpi/datatype/typecommit.c
===================================================================
--- /mpich2/trunk/test/mpi/datatype/typecommit.c (revision 4868)
+++ /mpich2/trunk/test/mpi/datatype/typecommit.c (revision 4868)
@@ -0,0 +1,40 @@
+#include <stdio.h>
+#include <mpi.h>
+#include "mpitest.h"
+
+void foo(void *sendbuf, MPI_Datatype sendtype, void *recvbuf, MPI_Datatype recvtype)
+{
+    int blocks[2];
+    MPI_Aint struct_displs[2];
+    MPI_Datatype types[2], tmp_type;
+
+    blocks[0] = 256;
+    struct_displs[0] = (MPI_Aint) sendbuf;
+    types[0] = sendtype;
+    blocks[1] = 256;
+    struct_displs[1] = (MPI_Aint) recvbuf;
+    types[1] = MPI_BYTE;
+
+    MPI_Type_create_struct(2, blocks, struct_displs, types, &tmp_type);
+    MPI_Type_commit(&tmp_type);
+    MPI_Type_free(&tmp_type);
+}
+
+int main(int argc, char **argv)
+{
+    int errs = 0;
+
+    MTest_Init(&argc, &argv);
+
+    foo((void*) 0x1, MPI_FLOAT_INT, (void*) 0x2, MPI_BYTE);
+    foo((void*) 0x1, MPI_DOUBLE_INT, (void*) 0x2, MPI_BYTE);
+    foo((void*) 0x1, MPI_LONG_INT, (void*) 0x2, MPI_BYTE);
+    foo((void*) 0x1, MPI_SHORT_INT, (void*) 0x2, MPI_BYTE);
+    foo((void*) 0x1, MPI_2INT, (void*) 0x2, MPI_BYTE);
+    foo((void*) 0x1, MPI_LONG_DOUBLE_INT, (void*) 0x2, MPI_BYTE);
+
+    MTest_Finalize(errs);
+    MPI_Finalize();
+
+    return 0;
+}
