[Bug fortran/51292] New: RESULT var with -finit-local-zero -fno-automatic results in error

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Nov 24 11:34:00 GMT 2011


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

             Bug #: 51292
           Summary: RESULT var with -finit-local-zero -fno-automatic
                    results in error
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jakub@gcc.gnu.org
                CC: burnus@gcc.gnu.org


function foo (a)
  integer :: foo
  foo = 1
end function foo
function bar (a) result (h)
  integer :: h
  h = 1
end function bar

fails to compile with -finit-local-zero -fno-automatic.  H variable is in that
case TREE_STATIC (should it really be?) and -finit-local-zero adds initializer
for it, on which then the FE errors out.



More information about the Gcc-bugs mailing list