Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding an example of an invalid array equivalence elimination #174

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Simplifying the test case further
  • Loading branch information
dmikushin committed Nov 16, 2023
commit 5a5209f5e183ee2e7b76f01b4fcada2549447e60
25 changes: 3 additions & 22 deletions samples/equivalence/example2.f90
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
PROGRAM example2
IMPLICIT NONE
INTEGER Highpw , Ibmcdc , Idate(3) , Idrum , Ihalf , Intp , Iprec , Jhalf , Kshift , Ldict , Linkno , Lnknos(15) , Lowpw , Lpch ,&
& Lqro , Mach , Machx , Mask2 , Mask3 , Mtisa , Mxfl , Mzero , Nbpc , Nbpw , Ncpw , Nlpp , Nudflw , Nwpic , Outtap , &
& Sperlk , Sysbuf , Two(32)
CHARACTER*7 Machos
CHARACTER*11 Mchnam
COMMON /chmach/ Mchnam , Machos
COMMON /lhpwx / Lowpw , Highpw , Nwpic , Nudflw , Mxfl , Kshift , Mtisa
COMMON /machin/ Machx , Ihalf , Jhalf , Lqro
COMMON /sem / Mask2 , Mask3 , Lnknos
COMMON /two / Two , Mzero
INTEGER abcd , ak , i , imnth , iyr1 , iyr2 , ka , locf , m1(110) , m2(110) , mask , mconst(220) , mvax , nmach , order , qp , &
& recl
INTEGER andf , complf , khrfn1 , locfx , lshift , rshift
EXTERNAL andf , complf , lshift , rshift
INTEGER m1(110) , m2(110) , mask , mconst(220)
EQUIVALENCE (m1(1),mconst(1)) , (m2(1),mconst(111))
DATA nmach/22/ , m1/200 , 4100 , 871 , 1042 , 1028 , 1028 , 1028 , 1028 , 1028 , 1028 , 1028 , 2052 , 1028 , 2052 , 2052 , 1028 ,&
DATA m1/200 , 4100 , 871 , 1042 , 1028 , 1028 , 1028 , 1028 , 1028 , 1028 , 1028 , 2052 , 1028 , 2052 , 2052 , 1028 ,&
& 1028 , 1028 , 1028 , 1028 , 1028 , 1028 , 506 , 506 , 506 , 506 , 506 , 506 , 506 , 506 , 506 , 506 , 506 , 506 , 506 , &
& 506 , 506 , 506 , 506 , 506 , 506 , 506 , 506 , 506 , 5000 , 5518 , 5518 , 4208 , 5518 , 5518 , 5518 , 5518 , 5518 , 5518 , &
& 5518 , 5509 , 5518 , 5500 , 5500 , 5500 , 5500 , 5500 , 5500 , 5500 , 5518 , 550 , 636 , 832 , 936 , 660 , 832 , 832 , 832 ,&
Expand All @@ -27,11 +14,5 @@ PROGRAM example2
& 1675 , 975 , 1675 , 1 , 4096 , 4096 , 262144 , 4096 , 4096 , 4096 , 4096 , 4096 , 4096 , 4096 , 4096 , 4096 , 0 , 0 , 0 , &
& 0 , 0 , 0 , 0 , 4096 , 0 , 000 , 2426 , 2760 , 4896 , 2355 , 2355 , 2352 , 2355 , 2355 , 2355 , 2355 , 4896 , 2352 , 4896 , &
& 4896 , 2355 , 2355 , 2355 , 000 , 000 , 2355 , 000/
Mach = 7
Sysbuf = mconst(Mach)
Ibmcdc = 1
IF ( Mach==2 .OR. Mach==4 ) Ibmcdc = 0
i = Mach + nmach
Intp = mconst(i)/100
PRINT *, Intp
PRINT *, mconst(29)/100
END PROGRAM