1! RUN: bbc -fdebug-dump-pre-fir %s 2>&1 | FileCheck %s 2 3! Note: PFT dump output is fairly stable, including node indexes and 4! annotations, so all output is CHECKed. 5 6 ! CHECK: 1 Program <anonymous> 7 ! CHECK: 1 PrintStmt: print* 8 print* 9 10 ! CHECK: <<DoConstruct>> -> 8 11 ! CHECK: 2 NonLabelDoStmt -> 7: do i = 1, 5 12 ! CHECK: <<IfConstruct>> -> 7 13 ! CHECK: 3 ^IfStmt [negate] -> 7: if(i <= 1 .or. i >= 5) cycle 14 ! CHECK: 6 ^PrintStmt: print*, i 15 ! CHECK: 5 EndIfStmt 16 ! CHECK: <<End IfConstruct>> 17 ! CHECK: 7 EndDoStmt -> 2: end do 18 ! CHECK: <<End DoConstruct>> 19 do i = 1, 5 20 if (i <= 1 .or. i >= 5) cycle 21 print*, i 22 end do 23 24 ! CHECK: 8 PrintStmt: print* 25 print* 26 27 ! CHECK: <<DoConstruct>> -> 15 28 ! CHECK: 9 NonLabelDoStmt -> 14: do i = 1, 5 29 ! CHECK: <<IfConstruct>> -> 14 30 ! CHECK: 10 ^IfStmt [negate] -> 14: if(i <= 1 .or. i >= 5) cycle 31 ! CHECK: 13 ^PrintStmt: print*, i 32 ! CHECK: 12 EndIfStmt 33 ! CHECK: <<End IfConstruct>> 34 ! CHECK: 14 EndDoStmt -> 9: 2 end do 35 ! CHECK: <<End DoConstruct>> 36 do i = 1, 5 37 if (i <= 1 .or. i >= 5) cycle 38 print*, i 392 end do 40 41 ! CHECK: 15 PrintStmt: print* 42 print* 43 44 ! CHECK:<<DoConstruct!>> -> 30 45 ! CHECK: 16 NonLabelDoStmt -> 29: outer: do i = 1, 3 46 ! CHECK: <<DoConstruct!>> -> 29 47 ! CHECK: 17 ^NonLabelDoStmt -> 28: inner: do j = 1, 5 48 ! CHECK: <<IfConstruct!>> -> 28 49 ! CHECK: 18 ^IfStmt [negate] -> 28: if(j <= 1 .or. j >= 5) cycle inner 50 ! CHECK: <<IfConstruct!>> -> 28 51 ! CHECK: 21 ^IfStmt [negate] -> 28: if(j == 3) goto 3 52 ! CHECK: <<IfConstruct!>> -> 27 53 ! CHECK: 24 ^IfStmt -> 27: if(j == 4) cycle outer 54 ! CHECK: 25 ^CycleStmt! -> 29: cycle outer 55 ! CHECK: 26 EndIfStmt 56 ! CHECK: <<End IfConstruct!>> 57 ! CHECK: 27 ^PrintStmt: print*, j 58 ! CHECK: 23 EndIfStmt 59 ! CHECK: <<End IfConstruct!>> 60 ! CHECK: 20 EndIfStmt 61 ! CHECK: <<End IfConstruct!>> 62 ! CHECK: 28 ^EndDoStmt -> 17: 3 end do inner 63 ! CHECK: <<End DoConstruct!>> 64 ! CHECK: 29 ^EndDoStmt -> 16: end do outer 65 ! CHECK:<<End DoConstruct!>> 66 outer: do i = 1, 3 67 inner: do j = 1, 5 68 if (j <= 1 .or. j >= 5) cycle inner 69 if (j == 3) goto 3 70 if (j == 4) cycle outer 71 print*, j 72 3 end do inner 73 end do outer 74 75 ! CHECK: 30 ^PrintStmt: print* 76 print* 77 78 ! CHECK:<<DoConstruct>> -> 40 79 ! CHECK: 31 NonLabelDoStmt -> 39: do i = 1, 5 80 ! CHECK: <<IfConstruct>> -> 39 81 ! CHECK: 32 ^IfStmt [negate] -> 39: if(i == 3) goto 4 82 ! CHECK: <<IfConstruct>> -> 39 83 ! CHECK: 35 ^IfStmt [negate] -> 39: if(i <= 1 .or. i >= 5) cycle 84 ! CHECK: 38 ^PrintStmt: print*, i 85 ! CHECK: 37 EndIfStmt 86 ! CHECK: <<End IfConstruct>> 87 ! CHECK: 34 EndIfStmt 88 ! CHECK: <<End IfConstruct>> 89 ! CHECK: 39 EndDoStmt -> 31: 4 end do 90 ! CHECK:<<End DoConstruct>> 91 do i = 1, 5 92 if (i == 3) goto 4 93 if (i <= 1 .or. i >= 5) cycle 94 print*, i 954 end do 96end 97