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: unassig...@gcc.gnu.org
        ReportedBy: ja...@gcc.gnu.org
                CC: bur...@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.

Reply via email to