This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/49213] [OOP] gfortran rejects structure constructor expression


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

--- Comment #6 from neil.n.carlson at gmail dot com 2011-06-16 22:12:17 UTC ---
(In reply to comment #5)
> (In reply to comment #4)
> > An intuitive way of viewing (and maybe even implementing I guess) the process
> > triggered by a structure constructor [...]
> 
> I think you are wrong here.
> 
> F08:7.2.1.3p13:
> 
> "An intrinsic assignment where the variable is of derived type [...]

Sorry, I wasn't talking about intrinsic assignment.  I was (unsuccessfully)
trying to talk about what happens when a structure constructor expression,
like T(Sobj) is encountered.  The compiler has to generate a temporary
object of type T and define its components, and what I was trying to say
(and I might be wrong about this) is that this process of defining the
components using the expressions given to the constructor is not like
normal assignment (intrinsic or defined) of derived type objects.
The reason for raising this was that the error messages suggest that
that is how the compiler is viewing it.

Sorry for the confusion.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]