[Bug fortran/55825] New: [OOP] Bogus rank error with CLASS pointer assignment using structure constructors

burnus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Dec 28 17:08:00 GMT 2012


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

             Bug #: 55825
           Summary: [OOP] Bogus rank error with CLASS pointer assignment
                    using structure constructors
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org
                CC: janus@gcc.gnu.org, pault@gcc.gnu.org


Created attachment 29058
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29058
Failing test case

Another test case by Reinhold Bader.

  type :: t_ptr
     class(interior), pointer :: r(:) => null()
  end type t_ptr
...
  type(interior), target :: r(3)
  type(t_ptr) :: o1
...
  o1 = t_ptr(r)

Gives:

  o1 = t_ptr(r)      ! fine, r has TARGET attribute and can't go away
             1
Error: The rank of the element in the structure constructor at (1) does not
match that of the component (1/0)



More information about the Gcc-bugs mailing list