public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/57508] New: [OOP] Intrinsic assignment+defined-assignment for comps: ROCEDURE attribute of '_F.DA0' conflicts with VARIABLE attribute
@ 2013-06-03  9:07 burnus at gcc dot gnu.org
  2013-06-03 11:22 ` [Bug fortran/57508] [4.8/4.9 Regression] [OOP] Intrinsic assignment+defined-assignment for comps: PROCEDURE " janus at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-06-03  9:07 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 57508
           Summary: [OOP] Intrinsic assignment+defined-assignment for
                    comps: ROCEDURE attribute of '_F.DA0' conflicts with
                    VARIABLE attribute
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
                CC: pault at gcc dot gnu.org

The following code fails with the error message:

end module 
           1
Error: PROCEDURE attribute of '_F.DA0' conflicts with VARIABLE attribute at (1)


That's due to the support of calling defined assignment for the components in
an intrinsic assignment, which was added in GCC 4.8.

The _F.DA0 variable is generated in resolve.c's get_temp_from_expr.


module ForTrilinos_ref_counter
  type ref_counter
  contains
      procedure :: assign
      generic   :: assignment(=) => assign
  end type
contains
  subroutine assign (lhs, rhs)
    class (ref_counter), intent(inout) :: lhs
    class (ref_counter), intent(in) :: rhs
  end subroutine
end module
module FEpetra_BlockMap
  use ForTrilinos_ref_counter, only : ref_counter
  type :: Epetra_BlockMap 
    type(ref_counter) :: counter
  end type
contains
  function from_struct() result(new_Epetra_BlockMap)
    type(Epetra_BlockMap) :: new_Epetra_BlockMap
  end function
  type(Epetra_BlockMap) function create_arbitrary()
    create_arbitrary = from_struct()
  end function
end module


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-06-14 11:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-03  9:07 [Bug fortran/57508] New: [OOP] Intrinsic assignment+defined-assignment for comps: ROCEDURE attribute of '_F.DA0' conflicts with VARIABLE attribute burnus at gcc dot gnu.org
2013-06-03 11:22 ` [Bug fortran/57508] [4.8/4.9 Regression] [OOP] Intrinsic assignment+defined-assignment for comps: PROCEDURE " janus at gcc dot gnu.org
2013-06-03 21:08 ` burnus at gcc dot gnu.org
2013-06-11 16:19 ` burnus at gcc dot gnu.org
2013-06-14 11:25 ` burnus at gcc dot gnu.org
2013-06-14 11:26 ` burnus at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).