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/31205] aliased operator assignment produces wrong result



------- Comment #4 from pault at gcc dot gnu dot org  2007-06-27 15:56 -------
(In reply to comment #2)
> This is related to PR 14771, most likely the parentheses are being ignored.

The parentheses are being ignored - in fact they disappear completely; I
presume that gfc_simplify_expr is the culprit.

In addition, a temporary needs to be made for intent(out), derived types with a
default initializer and the initialization applied to that, when the variable
is aliassed.

I note that other compilers apply the initialization in the callee, whereas
gfortran leaves that duty to the caller.  I think that the former is "cleaner"
in some sense and that we should make the change.

Thus, this little beauty comprises at least two bugs and should probably be
three PRs:-)  I propose that, for the sake of tractability, it should be left
as it is.

Paul


-- 


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


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