[Bug fortran/40737] New: Pointer references sometimes fail to define "span" symbols

dh458 at oakapple dot net gcc-bugzilla@gcc.gnu.org
Mon Jul 13 21:37:00 GMT 2009


This bug appears in gfortran 4.4.0 on sparc-solaris, x86-solaris, and
x86-linux.
The attached test case is extracted from SPECmpi 2007 129.tera_tf

The two test files testmod.F90 and testuse.F90 define and use pointer types.
With -DBIGMOD certain variables are defined in the module; with -UBIGMOD,
in the user.   Correct results are obtained with the latter; the code generated
for the lines

         Ro => Hydro_vars( first_cell:last_cell, j, k)%cell_var( ro_var)
         Ets => Hydro_vars( first_cell:last_cell, j, k)%cell_var( ets_var)
         Um => Hydro_vars( first_cell:last_cell, j, k)%cell_var( u_var)
         Um_p1 => Hydro_vars( first_cell:last_cell, j, k)%cell_var( up1_var)
         Um_p2 => Hydro_vars( first_cell:last_cell, j, k)%cell_var( up2_var)

both uses and defines various symbols like

testuse.s:      sethi   %h44(span.1.696), %g1
testuse.s:      or      %g1, %m44(span.1.696), %g1
testuse.s:      or      %g1, %l44(span.1.696), %g1

testuse.s:      .local  span.1.696
testuse.s:      .common span.1.696,8,8


but with -UBIGMOD, the symbols are referred to but nowhere defined.

Compile e.g.

gfortran -S testmod.F90 testuse.F90 -UBIGMOD -m64
or
gfortran -S testmod.F90 testuse.F90 -DBIGMOD -m64

Same results for -m32


-- 
           Summary: Pointer references sometimes fail to define "span"
                    symbols
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dh458 at oakapple dot net
  GCC host triplet: sparc-sun-solaris2.10


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40737



More information about the Gcc-bugs mailing list