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

           Summary: [OOP] calling STORAGE_SIZE on a NULL-initialized class
                    pointer
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: ja...@gcc.gnu.org


Follow-up to PR47180 / PR47024:

type :: t
  real(4) :: c
end type
class(t), pointer :: x => null()
print *, storage_size (x)
end

This currently gives a segfault at runtime, because the _vptr component of 'x'
is wrongly initialized to NULL, while it should point to the vtab of the
declared type. If one adds an additional pointer assignment statement

x => null()

everything works fine (due to the fix of PR47180). Only the NULL initialization
still gets it wrong.

Reply via email to