2 ! { dg-options "-fcoarray=single" }
10 integer, allocatable
:: i
12 type, extends (t
):: t2
13 integer, allocatable
:: j
21 call s2p(psnt
=.false
.)
27 call s2tp(psnt
=.false
.)
29 call s2t2p(psnt
=.false
.)
36 call a2p(psnt
=.false
.)
44 call a4p(psnt
=.false
.)
53 call arp(psnt
=.false
.)
54 call artp(psnt
=.false
.)
58 subroutine s1a1(z
, z2
, z3
, z4
, z5
)
59 type(t
), optional
:: z
, z4
[*]
60 type(t
), pointer, optional
:: z2
61 type(t
), allocatable
, optional
:: z3
, z5
[:]
62 type(t
), allocatable
:: x
72 call s2p(y
,psnt
=.true
.)
73 call s2p(z2
,psnt
=.false
.)
84 ! call s2elem_t(z2) ! FIXME: Segfault
85 ! call s2elem_t(z3) ! FIXME: Segfault
86 ! call s2elem_t(z4) ! FIXME: Segfault
87 ! call s2elem_t(z5) ! FIXME: Segfault
97 call arp(y
,psnt
=.true
.)
98 call arp(z2
,psnt
=.false
.)
102 ! call s2t(z2) ! FIXME: Segfault
103 ! call s2t(z3) ! FIXME: Segfault
104 ! call s2t(z4) ! FIXME: Segfault
105 ! call s2t(z5) ! FIXME: Segfault
106 call s2tp(y
,psnt
=.true
.)
107 call s2tp(z2
,psnt
=.false
.)
109 subroutine s1a(z
, z2
, z3
, z4
, z5
)
110 type(t2
), optional
:: z
, z4
[*]
111 type(t2
), optional
, pointer :: z2
112 type(t2
), optional
, allocatable
:: z3
, z5
[:]
113 type(t2
), allocatable
:: x
114 type(t2
), pointer :: y
123 call s2p(y
,psnt
=.true
.)
124 call s2p(z2
,psnt
=.false
.)
135 ! call s2elem_t2(z2) ! FIXME: Segfault
136 ! call s2elem_t2(z3) ! FIXME: Segfault
137 ! call s2elem_t2(z4) ! FIXME: Segfault
138 ! call s2elem_t2(z5) ! FIXME: Segfault
148 call arp(y
,psnt
=.true
.)
149 call arp(z2
,psnt
=.false
.)
153 ! call s2t2(z2) ! FIXME: Segfault
154 ! call s2t2(z3) ! FIXME: Segfault
156 ! call s2t2(z5) ! FIXME: Segfault
157 call s2t2p(y
,psnt
=.true
.)
158 call s2t2p(z2
,psnt
=.false
.)
160 subroutine s1ac1(z
, z2
, z3
, z4
, z5
)
161 class(t
), optional
:: z
, z4
[*]
162 class(t
), optional
, pointer :: z2
163 class(t
), optional
, allocatable
:: z3
, z5
[:]
164 class(t
), allocatable
:: x
165 class(t
), pointer :: y
174 call s2p(y
,psnt
=.true
.)
175 call s2p(z2
,psnt
=.false
.)
185 ! call s2elem_t(z) ! FIXME: Segfault
186 ! call s2elem_t(z2) ! FIXME: Segfault
187 ! call s2elem_t(z3) ! FIXME: Segfault
188 ! call s2elem_t(z4) ! FIXME: Segfault
189 ! call s2elem_t(z5) ! FIXME: Segfault
199 call arp(y
,psnt
=.true
.)
200 call arp(z2
,psnt
=.false
.)
203 ! call s2t(z) ! FIXME: Segfault
204 ! call s2t(z2) ! FIXME: Segfault
205 ! call s2t(z3) ! FIXME: Segfault
206 ! call s2t(z4) ! FIXME: Segfault
207 ! call s2t(z5) ! FIXME: Segfault
208 call s2tp(y
,psnt
=.true
.)
209 call s2tp(z2
,psnt
=.false
.)
211 subroutine s1ac(z
, z2
, z3
, z4
, z5
)
212 class(t2
), optional
:: z
, z4
[*]
213 class(t2
), optional
, pointer :: z2
214 class(t2
), optional
, allocatable
:: z3
, z5
[:]
215 class(t2
), allocatable
:: x
216 class(t2
), pointer :: y
225 call s2p(y
,psnt
=.true
.)
226 call s2p(z2
,psnt
=.false
.)
235 ! call s2elem_t2(y) ! FIXME: Segfault
236 ! call s2elem_t2(z) ! FIXME: Segfault
237 ! call s2elem_t2(z2) ! FIXME: Segfault
238 ! call s2elem_t2(z3) ! FIXME: Segfault
239 ! call s2elem_t2(z4) ! FIXME: Segfault
240 ! call s2elem_t2(z5) ! FIXME: Segfault
250 call arp(y
,psnt
=.true
.)
251 call arp(z2
,psnt
=.false
.)
254 ! call s2t2(z) ! FIXME: Segfault
255 ! call s2t2(z2) ! FIXME: Segfault
256 ! call s2t2(z3) ! FIXME: Segfault
257 ! call s2t2(z4) ! FIXME: Segfault
258 ! call s2t2(z5) ! FIXME: Segfault
259 call s2t2p(y
,psnt
=.true
.)
260 call s2t2p(z2
,psnt
=.false
.)
264 class(t
), intent(in
), optional
:: x
265 if (present (x
)) call abort ()
268 subroutine s2p(x
,psnt
)
269 class(t
), intent(in
), pointer, optional
:: x
271 if (present (x
).neqv
. psnt
) call abort ()
275 class(t
), intent(in
), optional
:: x
[*]
276 if (present (x
)) call abort ()
280 type(t
), intent(in
), optional
:: x
281 if (present (x
)) call abort ()
285 type(t2
), intent(in
), optional
:: x
286 if (present (x
)) call abort ()
289 subroutine s2tp(x
, psnt
)
290 type(t
), pointer, intent(in
), optional
:: x
292 if (present (x
).neqv
. psnt
) call abort ()
295 subroutine s2t2p(x
, psnt
)
296 type(t2
), pointer, intent(in
), optional
:: x
298 if (present (x
).neqv
. psnt
) call abort ()
301 impure elemental
subroutine s2elem(x
)
302 class(t
), intent(in
), optional
:: x
303 if (present (x
)) call abort ()
305 end subroutine s2elem
306 impure elemental
subroutine s2elem_t(x
)
307 type(t
), intent(in
), optional
:: x
308 if (present (x
)) call abort ()
310 end subroutine s2elem_t
311 impure elemental
subroutine s2elem_t2(x
)
312 type(t2
), intent(in
), optional
:: x
313 if (present (x
)) call abort ()
315 end subroutine s2elem_t2
318 subroutine a1a1(z
, z2
, z3
, z4
, z5
)
319 type(t
), optional
:: z(:), z4(:)[*]
320 type(t
), optional
, pointer :: z2(:)
321 type(t
), optional
, allocatable
:: z3(:), z5(:)[:]
322 type(t
), allocatable
:: x(:)
323 type(t
), pointer :: y(:)
332 call a2p(y
,psnt
=.true
.)
333 call a2p(z2
,psnt
=.false
.)
343 call arp(y
,psnt
=.true
.)
344 call arp(z2
,psnt
=.false
.)
345 ! call s2elem(x) ! FIXME: Segfault
346 ! call s2elem(y) ! FIXME: Segfault
347 ! call s2elem(z) ! FIXME: Segfault
348 ! call s2elem(z2) ! FIXME: Segfault
349 ! call s2elem(z3) ! FIXME: Segfault
350 ! call s2elem(z4) ! FIXME: Segfault
351 ! call s2elem(z5) ! FIXME: Segfault
352 ! call s2elem_t(x) ! FIXME: Conditional jump or move depends on uninitialised value
353 ! call s2elem_t(y) ! FIXME: Conditional jump or move depends on uninitialised value
354 ! call s2elem_t(z) ! FIXME: Conditional jump or move depends on uninitialised value
355 ! call s2elem_t(z2) ! FIXME: Segfault
356 ! call s2elem_t(z3) ! FIXME: Segfault
357 ! call s2elem_t(z4) ! FIXME: Segfault
358 ! call s2elem_t(z5) ! FIXME: Segfault
360 subroutine a1a(z
, z2
, z3
, z4
, z5
)
361 type(t2
), optional
:: z(:), z4(:)[*]
362 type(t2
), optional
, pointer :: z2(:)
363 type(t2
), optional
, allocatable
:: z3(:), z5(:)[:]
364 type(t2
), allocatable
:: x(:)
365 type(t2
), pointer :: y(:)
374 call a2p(y
,psnt
=.true
.)
375 call a2p(z2
,psnt
=.false
.)
385 call arp(y
,psnt
=.true
.)
386 call arp(z2
,psnt
=.false
.)
387 ! call s2elem(x) ! FIXME: Segfault
388 ! call s2elem(y) ! FIXME: Segfault
389 ! call s2elem(z) ! FIXME: Segfault
390 ! call s2elem(z2) ! FIXME: Segfault
391 ! call s2elem(z3) ! FIXME: Segfault
392 ! call s2elem(z4) ! FIXME: Segfault
393 ! call s2elem(z5) ! FIXME: Segfault
394 ! call s2elem_t2(x) ! FIXME: Conditional jump or move depends on uninitialised value
395 ! call s2elem_t2(y) ! FIXME: Conditional jump or move depends on uninitialised value
396 ! call s2elem_t2(z) ! FIXME: Conditional jump or move depends on uninitialised value
397 ! call s2elem_t2(z2) ! FIXME: Segfault
398 ! call s2elem_t2(z3) ! FIXME: Segfault
399 ! call s2elem_t2(z4) ! FIXME: Segfault
400 ! call s2elem_t2(z5) ! FIXME: Segfault
402 subroutine a1ac1(z
, z2
, z3
, z4
, z5
)
403 class(t
), optional
:: z(:), z4(:)[*]
404 class(t
), optional
, pointer :: z2(:)
405 class(t
), optional
, allocatable
:: z3(:), z5(:)[:]
406 class(t
), allocatable
:: x(:)
407 class(t
), pointer :: y(:)
416 call a2p(y
,psnt
=.true
.)
417 call a2p(z2
,psnt
=.false
.)
427 call arp(y
,psnt
=.true
.)
428 call arp(z2
,psnt
=.false
.)
429 ! call s2elem(x) ! FIXME: Segfault
430 ! call s2elem(y) ! FIXME: Segfault
431 ! call s2elem(z) ! FIXME: Segfault
432 ! call s2elem(z2) ! FIXME: Segfault
433 ! call s2elem(z3) ! FIXME: Segfault
434 ! call s2elem(z4) ! FIXME: Segfault
435 ! call s2elem(z5) ! FIXME: Segfault
436 ! call s2elem_t(x) ! FIXME: Segfault
437 ! call s2elem_t(y) ! FIXME: Segfault
438 ! call s2elem_t(z) ! FIXME: Segfault
439 ! call s2elem_t(z2) ! FIXME: Segfault
440 ! call s2elem_t(z3) ! FIXME: Segfault
441 ! call s2elem_t(z4) ! FIXME: Segfault
442 ! call s2elem_t(z5) ! FIXME: Segfault
444 subroutine a1ac(z
, z2
, z3
, z4
, z5
)
445 class(t2
), optional
:: z(:), z4(:)[*]
446 class(t2
), optional
, pointer :: z2(:)
447 class(t2
), optional
, allocatable
:: z3(:), z5(:)[:]
448 class(t2
), allocatable
:: x(:)
449 class(t2
), pointer :: y(:)
458 call a2p(y
,psnt
=.true
.)
459 call a2p(z2
,psnt
=.false
.)
469 call arp(y
,psnt
=.true
.)
470 call arp(z2
,psnt
=.false
.)
471 ! call s2elem(x) ! FIXME: Segfault
472 ! call s2elem(y) ! FIXME: Segfault
473 ! call s2elem(z) ! FIXME: Segfault
474 ! call s2elem(z2) ! FIXME: Segfault
475 ! call s2elem(z3) ! FIXME: Segfault
476 ! call s2elem(z4) ! FIXME: Segfault
477 ! call s2elem(z5) ! FIXME: Segfault
478 ! call s2elem_t2(x) ! FIXME: Segfault
479 ! call s2elem_t2(y) ! FIXME: Segfault
480 ! call s2elem_t2(z) ! FIXME: Segfault
481 ! call s2elem_t2(z2) ! FIXME: Segfault
482 ! call s2elem_t2(z3) ! FIXME: Segfault
483 ! call s2elem_t2(z4) ! FIXME: Segfault
484 ! call s2elem_t2(z5) ! FIXME: Segfault
488 class(t
), intent(in
), optional
:: x(:)
489 if (present (x
)) call abort ()
490 ! print *, present(x)
492 subroutine a2p(x
, psnt
)
493 class(t
), pointer, intent(in
), optional
:: x(:)
495 if (present (x
).neqv
. psnt
) call abort ()
496 ! print *, present(x)
499 class(t
), intent(in
), optional
:: x(:)[*]
500 if (present (x
)) call abort ()
501 ! print *, present(x)
505 subroutine a3a1(z
, z2
, z3
, z4
, z5
)
506 type(t
), optional
:: z(4), z4(4)[*]
507 type(t
), optional
, pointer :: z2(:)
508 type(t
), optional
, allocatable
:: z3(:), z5(:)[:]
509 type(t
), allocatable
:: x(:)
510 type(t
), pointer :: y(:)
519 call a4p(y
,psnt
=.true
.)
520 call a4p(z2
,psnt
=.false
.)
524 ! call a4t(z2) ! FIXME: Segfault
525 ! call a4t(z3) ! FIXME: Segfault
526 ! call a4t(z4) ! FIXME: Segfault
527 ! call a4t(z5) ! FIXME: Segfault
528 call a4tp(y
,psnt
=.true
.)
529 call a4tp(z2
,psnt
=.false
.)
539 call arp(y
,psnt
=.true
.)
540 call arp(z2
,psnt
=.false
.)
541 ! call s2elem(x) ! FIXME: Segfault
542 ! call s2elem(y) ! FIXME: Segfault
543 ! call s2elem(z) ! FIXME: Segfault
544 ! call s2elem(z2) ! FIXME: Segfault
545 ! call s2elem(z3) ! FIXME: Segfault
546 ! call s2elem(z4) ! FIXME: Segfault
547 ! call s2elem(z5) ! FIXME: Segfault
548 ! call s2elem_t(x) ! FIXME: Conditional jump or move depends on uninitialised value
549 ! call s2elem_t(y) ! FIXME: Conditional jump or move depends on uninitialised value
551 ! call s2elem_t(z2) ! FIXME: Segfault
552 ! call s2elem_t(z3) ! FIXME: Segfault
553 ! call s2elem_t(z4) ! FIXME: Segfault
554 ! call s2elem_t(z5) ! FIXME: Segfault
556 subroutine a3a(z
, z2
, z3
)
557 type(t2
), optional
:: z(4)
558 type(t2
), optional
, pointer :: z2(:)
559 type(t2
), optional
, allocatable
:: z3(:)
560 type(t2
), allocatable
:: x(:)
561 type(t2
), pointer :: y(:)
568 call a4p(y
,psnt
=.true
.)
569 call a4p(z2
,psnt
=.false
.)
573 ! call a4t2(z2) ! FIXME: Segfault
574 ! call a4t2(z3) ! FIXME: Segfault
575 call a4t2p(y
,psnt
=.true
.)
576 call a4t2p(z2
,psnt
=.false
.)
582 call arp(y
,psnt
=.true
.)
583 call arp(z2
,psnt
=.false
.)
584 ! call s2elem(x) ! FIXME: Segfault
585 ! call s2elem(y) ! FIXME: Segfault
586 ! call s2elem(z) ! FIXME: Segfault
587 ! call s2elem(z2) ! FIXME: Segfault
588 ! call s2elem(z3) ! FIXME: Segfault
589 ! call s2elem(z4) ! FIXME: Segfault
590 ! call s2elem(z5) ! FIXME: Segfault
591 ! call s2elem_t2(x) ! FIXME: Conditional jump or move depends on uninitialised value
592 ! call s2elem_t2(y) ! FIXME: Conditional jump or move depends on uninitialised value
594 ! call s2elem_t2(z2) ! FIXME: Segfault
595 ! call s2elem_t2(z3) ! FIXME: Segfault
596 ! call s2elem_t2(z4) ! FIXME: Segfault
597 ! call s2elem_t2(z5) ! FIXME: Segfault
599 subroutine a3ac1(z
, z2
, z3
, z4
, z5
)
600 class(t
), optional
:: z(4), z4(4)[*]
601 class(t
), optional
, pointer :: z2(:)
602 class(t
), optional
, allocatable
:: z3(:), z5(:)[:]
603 class(t
), allocatable
:: x(:)
604 class(t
), pointer :: y(:)
613 call a4p(y
,psnt
=.true
.)
614 call a4p(z2
,psnt
=.false
.)
615 ! call a4t(x) ! FIXME: Segfault
616 ! call a4t(y) ! FIXME: Segfault
617 ! call a4t(z) ! FIXME: Segfault
618 ! call a4t(z2) ! FIXME: Segfault
619 ! call a4t(z3) ! FIXME: Segfault
620 ! call a4t(z4) ! FIXME: Segfault
621 ! call a4t(z5) ! FIXME: Segfault
622 ! call a4tp(y,psnt=.true.) ! FIXME: Segfault
623 ! call a4tp(z2,psnt=.false.) ! FIXME: Segfault
633 call arp(y
,psnt
=.true
.)
634 call arp(z2
,psnt
=.false
.)
635 ! call s2elem(x) ! FIXME: Conditional jump or move depends on uninitialised value
636 ! call s2elem(y) ! FIXME: Conditional jump or move depends on uninitialised value
637 ! call s2elem(z) ! FIXME: Segfault
638 ! call s2elem(z2) ! FIXME: Segfault
639 ! call s2elem(z3) ! FIXME: Segfault
640 ! call s2elem(z4) ! FIXME: Segfault
641 ! call s2elem(z5) ! FIXME: Segfault
642 ! call s2elem_t(x) ! FIXME: Conditional jump or move depends on uninitialised value
643 ! call s2elem_t(y) ! FIXME: Conditional jump or move depends on uninitialised value
644 ! call s2elem_t(z) ! FIXME: Segfault
645 ! call s2elem_t(z2) ! FIXME: Segfault
646 ! call s2elem_t(z3) ! FIXME: Segfault
647 ! call s2elem_t(z4) ! FIXME: Segfault
648 ! call s2elem_t(z5) ! FIXME: Segfault
650 subroutine a3ac(z
, z2
, z3
, z4
, z5
)
651 class(t2
), optional
:: z(4), z4(4)[*]
652 class(t2
), optional
, pointer :: z2(:)
653 class(t2
), optional
, allocatable
:: z3(:), z5(:)[:]
654 class(t2
), allocatable
:: x(:)
655 class(t2
), pointer :: y(:)
664 call a4p(y
,psnt
=.true
.)
665 call a4p(z2
,psnt
=.false
.)
666 ! call a4t2(x) ! FIXME: Segfault
667 ! call a4t2(y) ! FIXME: Segfault
668 ! call a4t2(z) ! FIXME: Segfault
669 ! call a4t2(z2) ! FIXME: Segfault
670 ! call a4t2(z3) ! FIXME: Segfault
671 ! call a4t2(z4) ! FIXME: Segfault
672 ! call a4t2(z5) ! FIXME: Segfault
673 ! call a4t2p(y,psnt=.true.) ! FIXME: Segfault
674 ! call a4t2p(z2,psnt=.false.) ! FIXME: Segfault
684 call arp(y
,psnt
=.true
.)
685 call arp(z2
,psnt
=.false
.)
689 class(t
), intent(in
), optional
:: x(4)
690 if (present (x
)) call abort ()
693 subroutine a4p(x
, psnt
)
694 class(t
), pointer, intent(in
), optional
:: x(:)
696 if (present (x
).neqv
. psnt
) call abort ()
700 class(t
), intent(in
), optional
:: x(4)[*]
701 if (present (x
)) call abort ()
705 type(t
), intent(in
), optional
:: x(4)
706 if (present (x
)) call abort ()
710 type(t2
), intent(in
), optional
:: x(4)
711 if (present (x
)) call abort ()
714 subroutine a4tp(x
, psnt
)
715 type(t
), pointer, intent(in
), optional
:: x(:)
717 if (present (x
).neqv
. psnt
) call abort ()
720 subroutine a4t2p(x
, psnt
)
721 type(t2
), pointer, intent(in
), optional
:: x(:)
723 if (present (x
).neqv
. psnt
) call abort ()
729 class(t
), intent(in
), optional
:: x(..)
730 if (present (x
)) call abort ()
735 type(t
), intent(in
), optional
:: x(..)
736 if (present (x
)) call abort ()
740 subroutine arp(x
, psnt
)
741 class(t
), pointer, intent(in
), optional
:: x(..)
743 if (present (x
).neqv
. psnt
) call abort ()
747 subroutine artp(x
, psnt
)
748 type(t
), intent(in
), pointer, optional
:: x(..)
750 if (present (x
).neqv
. psnt
) call abort ()
756 subroutine ar1a1(z
, z2
, z3
)
757 type(t
), optional
:: z(..)
758 type(t
), pointer, optional
:: z2(..)
759 type(t
), allocatable
, optional
:: z3(..)
766 call arp(z2
, .false
.)
767 call artp(z2
, .false
.)
769 subroutine ar1a(z
, z2
, z3
)
770 type(t2
), optional
:: z(..)
771 type(t2
), optional
, pointer :: z2(..)
772 type(t2
), optional
, allocatable
:: z3(..)
776 call arp(z2
, .false
.)
778 subroutine ar1ac1(z
, z2
, z3
)
779 class(t
), optional
:: z(..)
780 class(t
), optional
, pointer :: z2(..)
781 class(t
), optional
, allocatable
:: z3(..)
785 ! call art(z) ! FIXME: ICE - This requires packing support for assumed-rank
786 ! call art(z2)! FIXME: ICE - This requires packing support for assumed-rank
787 ! call art(z3)! FIXME: ICE - This requires packing support for assumed-rank
788 call arp(z2
, .false
.)
789 ! call artp(z2, .false.) ! FIXME: ICE
790 end subroutine ar1ac1
791 subroutine ar1ac(z
, z2
, z3
)
792 class(t2
), optional
:: z(..)
793 class(t2
), optional
, pointer :: z2(..)
794 class(t2
), optional
, allocatable
:: z3(..)
798 call arp(z2
, .false
.)