PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gfortran.dg / spellcheck-structure.f90
blob929e05f21519538864f7f0a44e2ab77d9b797180
1 ! { dg-do compile }
2 ! test levenshtein based spelling suggestions
3 implicit none
5 !!!!!!!!!!!!!! structure tests !!!!!!!!!!!!!!
6 type type1
7 real :: radius
8 integer :: i
9 end type type1
11 type type2
12 integer :: myint
13 type(type1) :: mytype
14 end type type2
16 type type3
17 type(type2) :: type_2
18 end type type3
19 type type4
20 type(type3) :: type_3
21 end type type4
23 type(type1) :: t1
24 t1%radiuz = .0 ! { dg-error ".radiuz. at .1. is not a member of the .type1. structure; did you mean .radius.\\?" }
25 t1%x = .0 ! { dg-error ".x. at .1. is not a member of the .type1. structure" }
26 type(type2) :: t2
27 t2%mytape%radius = .0 ! { dg-error ".mytape. at .1. is not a member of the .type2. structure; did you mean .mytype.\\?" }
28 t2%mytype%radious = .0 ! { dg-error ".radious. at .1. is not a member of the .type1. structure; did you mean .radius.\\?" }
29 type(type4) :: t4
30 t4%type_3%type_2%mytype%radium = 88.0 ! { dg-error ".radium. at .1. is not a member of the .type1. structure; did you mean .radius.\\?" }
32 !!!!!!!!!!!!!! symbol tests !!!!!!!!!!!!!!
33 integer :: iarg1
34 iarg2 = 1 ! { dg-error "Symbol .iarg2. at .1. has no IMPLICIT type; did you mean .iarg1.\\?" }
35 end