Skip to content

Conversation

ssijaric-nv
Copy link
Contributor

Place LARGE_COMMON (SHN_AMD64_LCOMMON) into lbss on x86-64. Needed to
support large Fortran common blocks with medium and large code models on
x86-64:

Sections:
...
25 .lbss b44834508 0000000000004060 0000000000004060 0000304c 2**3
ALLOC
...
SYMBOL TABLE:
...
0000000000004060 g O .lbss 0000000b44834508 BLNK

where BLNK is a large common block resulting from:

program test
implicit integer (i-n)
implicit real8 (a-h, o-z)
parameter (n1=77777, n2=77777)
common v2(n1,n2)
common /ccc/ v6
v6 = 1
v2(6777,6777) = 2
write (
,*) v6, v2(6777, 6777)
end program test

There is a sperate PR for emitting SHN_AMD64_LCOMMON.

Place LARGE_COMMON (SHN_AMD64_LCOMMON) into lbss on x86-64.  Needed to
support large Fortran common blocks with medium and large code models on
x86-64:

Sections:
...
25 .lbss         b44834508  0000000000004060  0000000000004060  0000304c  2**3
                 ALLOC
...
SYMBOL TABLE:
...
0000000000004060 g     O .lbss  0000000b44834508              __BLNK__

where __BLNK__ is a large common block resulting from:

program test
  implicit integer  (i-n)
  implicit real*8   (a-h, o-z)
  parameter (n1=77777, n2=77777)
  common  v2(n1,n2)
  common /ccc/ v6
  v6 = 1
  v2(6777,6777) = 2
  write (*,*) v6, v2(6777, 6777)
end program test

There is a sperate PR for emitting SHN_AMD64_LCOMMON.
@ssijaric-nv
Copy link
Contributor Author

A test case depends on the MC layer support for "largecomm" in LLVM, #161483. Will add a test case after the LLVM patch is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant