46 lines · plain
1! Check that symbols without SAVE attribute from an EQUIVALENCE2! with at least one symbol being SAVEd (explicitly or implicitly)3! have implicit SAVE attribute.4!RUN: %flang_fc1 -fdebug-dump-symbols %s | FileCheck %s5 6subroutine test1()7 ! CHECK-LABEL: Subprogram scope: test18 ! CHECK: i1, SAVE size=4 offset=0: ObjectEntity type: INTEGER(4) init:1_49 ! CHECK: j1, SAVE size=4 offset=0: ObjectEntity type: INTEGER(4)10 integer :: i1 = 111 integer :: j112 equivalence(i1,j1)13end subroutine test114 15subroutine test2()16 ! CHECK-LABEL: Subprogram scope: test217 ! CHECK: i1, SAVE size=4 offset=0: ObjectEntity type: INTEGER(4) init:1_418 ! CHECK: j1, SAVE size=4 offset=0: ObjectEntity type: INTEGER(4)19 integer :: i1 = 120 integer :: j121 equivalence(j1,i1)22end subroutine test223 24subroutine test3()25 ! CHECK-LABEL: Subprogram scope: test326 ! CHECK: i1, SAVE size=4 offset=0: ObjectEntity type: INTEGER(4)27 ! CHECK: j1, SAVE size=4 offset=0: ObjectEntity type: INTEGER(4)28 ! CHECK: k1, SAVE (InCommonBlock) size=4 offset=0: ObjectEntity type: INTEGER(4)29 integer :: i130 integer :: j1, k131 common /blk/ k132 save /blk/33 equivalence(i1,j1,k1)34end subroutine test335 36subroutine test4()37 ! CHECK-LABEL: Subprogram scope: test438 ! CHECK: i1, SAVE size=4 offset=0: ObjectEntity type: INTEGER(4) init:1_439 ! CHECK: j1, SAVE size=4 offset=0: ObjectEntity type: INTEGER(4)40 ! CHECK: k1, SAVE (InCommonBlock) size=4 offset=0: ObjectEntity type: INTEGER(4)41 integer :: i1 = 142 integer :: j1, k143 common /blk/ k144 equivalence(i1,j1,k1)45end subroutine test446