public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pault at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/46328] [OOP] type-bound operator call with non-trivial polymorphic operand
Date: Mon, 02 Jan 2012 12:50:00 -0000	[thread overview]
Message-ID: <bug-46328-4-c9pypbq4La@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-46328-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #7 from Paul Thomas <pault at gcc dot gnu.org> 2012-01-02 12:46:15 UTC ---
Author: pault
Date: Mon Jan  2 12:46:08 2012
New Revision: 182796

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182796
Log:
2012-01-02  Paul Thomas  <pault@gcc.gnu.org>

    PR fortran/51529
    * trans-array.c (gfc_array_allocate): Null allocated memory of
    newly allocted class arrays.

    PR fortran/46262
    PR fortran/46328
    PR fortran/51052
    * interface.c(build_compcall_for_operator): Add a type to the
    expression.
    * trans-expr.c (conv_base_obj_fcn_val): New function.
    (gfc_conv_procedure_call): Use base_expr to detect non-variable
    base objects and, ensuring that there is a temporary variable,
    build up the typebound call using conv_base_obj_fcn_val.
    (gfc_trans_class_assign): Pick out class procedure pointer
    assignments and do the assignment with no further prcessing.
    (gfc_trans_class_array_init_assign, gfc_trans_class_init_assign
    gfc_trans_class_assign): Move to top of file.
    * gfortran.h : Add 'base_expr' field to gfc_expr.
    * resolve.c (get_declared_from_expr): Add 'types' argument to
    switch checking of derived types on or off.
    (resolve_typebound_generic_call): Set the new argument.
    (resolve_typebound_function, resolve_typebound_subroutine):
    Set 'types' argument for get_declared_from_expr appropriately.
    Identify base expression, if not a variable, in the argument
    list of class valued calls. Assign it to the 'base_expr' field
    of the final expression. Strip away all references after the
    last class reference.


2012-01-02  Paul Thomas  <pault@gcc.gnu.org>

    PR fortran/46262
    PR fortran/46328
    PR fortran/51052
    * gfortran.dg/typebound_operator_7.f03: New.
    * gfortran.dg/typebound_operator_8.f03: New.

Added:
    trunk/gcc/testsuite/gfortran.dg/typebound_operator_7.f03
    trunk/gcc/testsuite/gfortran.dg/typebound_operator_8.f03
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/dump-parse-tree.c
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/interface.c
    trunk/gcc/fortran/resolve.c
    trunk/gcc/fortran/trans-array.c
    trunk/gcc/fortran/trans-expr.c
    trunk/gcc/testsuite/ChangeLog


  parent reply	other threads:[~2012-01-02 12:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-06  9:30 [Bug fortran/46328] New: ICE with class in parentheses tkoenig at gcc dot gnu.org
2010-11-06 12:02 ` [Bug fortran/46328] [OOP] type-bound operator call with non-trivial polymorphic operand janus at gcc dot gnu.org
2011-08-10  4:46 ` damian at rouson dot net
2011-10-30 11:39 ` janus at gcc dot gnu.org
2011-10-31  2:07 ` damian at rouson dot net
2011-10-31 21:04 ` janus at gcc dot gnu.org
2011-10-31 21:52 ` janus at gcc dot gnu.org
2012-01-02 12:50 ` pault at gcc dot gnu.org [this message]
2012-01-02 13:02 ` pault at gcc dot gnu.org
2012-01-02 17:02 ` damian at rouson dot net
2012-01-06 16:29 ` burnus at gcc dot gnu.org
2012-01-06 18:07 ` burnus at gcc dot gnu.org
2012-01-09 23:24 ` burnus at gcc dot gnu.org
2012-01-09 23:28 ` burnus at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-46328-4-c9pypbq4La@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).