comparison gcc/testsuite/gfortran.dg/class_allocate_10.f03 @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
37 class(integrand) ,allocatable :: kernel1(:), kernel2(:) 37 class(integrand) ,allocatable :: kernel1(:), kernel2(:)
38 type(show_producer) :: executive_producer 38 type(show_producer) :: executive_producer
39 39
40 allocate(kernel1(5), kernel2(5),mold=executive_producer%create_show_array (5)) 40 allocate(kernel1(5), kernel2(5),mold=executive_producer%create_show_array (5))
41 select type(kernel1) 41 select type(kernel1)
42 type is (integrand); if (any (kernel1%variable .ne. 1)) call abort 42 type is (integrand); if (any (kernel1%variable .ne. 1)) STOP 1
43 end select 43 end select
44 44
45 deallocate (kernel1) 45 deallocate (kernel1)
46 46
47 allocate(kernel1(3),mold=executive_producer%create_show ()) 47 allocate(kernel1(3),mold=executive_producer%create_show ())
48 select type(kernel1) 48 select type(kernel1)
49 type is (integrand); if (any (kernel1%variable .ne. 1)) call abort 49 type is (integrand); if (any (kernel1%variable .ne. 1)) STOP 2
50 end select 50 end select
51 51
52 deallocate (kernel1) 52 deallocate (kernel1)
53 53
54 select type(kernel2) 54 select type(kernel2)
55 type is (integrand); kernel2%variable = [1,2,3,4,5] 55 type is (integrand); kernel2%variable = [1,2,3,4,5]
56 end select 56 end select
57 57
58 allocate(kernel1(3),source = kernel2(3:5)) 58 allocate(kernel1(3),source = kernel2(3:5))
59 select type(kernel1) 59 select type(kernel1)
60 type is (integrand); if (any (kernel1%variable .ne. [3,4,5])) call abort 60 type is (integrand); if (any (kernel1%variable .ne. [3,4,5])) STOP 3
61 end select 61 end select
62 end program 62 end program