program mfort
	implicit none

	type Siginv_type(q)
		integer, len	:: q
		real			:: det
		real			:: mat(2*q,2*q)
	end type Siginv_type
	    
	type(Siginv_type(4)), allocatable	:: Siginvs0(:)
	integer		:: j		
	
	type(Siginv_type(4))	:: Siginv


	allocate(Siginvs0(100))
	
!$omp parallel do private(Siginv)
	do j=1,100
		Siginv%det=j
		if(mod(j,10)==0) then
!$omp critical
			print *,"x"
			Siginvs0(j)=Siginv
!			Siginvs0(j)%det=Siginv%det
!			Siginvs0(j)%mat=Siginv%mat
			print *,"y"
!$omp end critical
		endif
	enddo
end program
	