26 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc1 -pedantic -Werror2module m13 type a14 integer ::x1=15 end type a16 type,extends(a1)::a27 integer ::x2=38 end type a29 type,extends(a2)::a310 integer ::x3=311 end type a312end module m113 14program test15 use m116 type(a3) v17 !PORTABILITY: Whole parent component 'a2' in structure constructor should not be anonymous [-Wanonymous-parents]18 v=a3(a2(x1=18,x2=6),x3=6)19 !PORTABILITY: Whole parent component 'a1' in structure constructor should not be anonymous [-Wanonymous-parents]20 v=a3(a1(x1=18),x2=6,x3=6)21 !PORTABILITY: Whole parent component 'a2' in structure constructor should not be anonymous [-Wanonymous-parents]22 !PORTABILITY: Whole parent component 'a1' in structure constructor should not be anonymous [-Wanonymous-parents]23 v=a3(a2(a1(x1=18),x2=6),x3=6)24 v=a3(a2=a2(a1=a1(x1=18),x2=6),x3=6) ! ok25end26