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