public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/46262] New: [4.6 Regression] [OOP] tree check: expected function_type or method_type, have pointer_type
@ 2010-11-01 19:35 janus at gcc dot gnu.org
  2010-11-01 19:43 ` [Bug fortran/46262] " janus at gcc dot gnu.org
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: janus at gcc dot gnu.org @ 2010-11-01 19:35 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: [4.6 Regression] [OOP] tree check: expected
                    function_type or method_type, have pointer_type
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: janus@gcc.gnu.org


The following code ICEs with current trunk:


module integrable_model_module

  implicit none 

  type :: integrable_model
  contains
    procedure :: multiply
    generic :: operator(*) => multiply
  end type integrable_model

  contains

    subroutine integrate (model)
      class(integrable_model) :: model
      print *,d_dt(model)*2.0
    end subroutine

    function d_dt (this)
      class(integrable_model), intent(in) :: this
      class(integrable_model), allocatable :: d_dt
    end function

    real function multiply(lhs, rhs)
      class(integrable_model), intent(in) :: lhs
      real, intent(in) :: rhs
    end function

end module


integrable_model.f03: In function ‘integrate’:
integrable_model.f03:15:0: internal compiler error: tree check: expected
function_type or method_type, have pointer_type in gimplify_call_expr, at
gimplify.c:2354

It is reported to work with 4.5.x and a 4.6 snapshot from 20100703.


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

* [Bug fortran/46262] [4.6 Regression] [OOP] tree check: expected function_type or method_type, have pointer_type
  2010-11-01 19:35 [Bug fortran/46262] New: [4.6 Regression] [OOP] tree check: expected function_type or method_type, have pointer_type janus at gcc dot gnu.org
@ 2010-11-01 19:43 ` janus at gcc dot gnu.org
  2010-11-01 19:45 ` janus at gcc dot gnu.org
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: janus at gcc dot gnu.org @ 2010-11-01 19:43 UTC (permalink / raw)
  To: gcc-bugs

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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code

--- Comment #1 from janus at gcc dot gnu.org 2010-11-01 19:43:41 UTC ---
-fdump-tree-original shows wrong code being generated:


      struct class$integrable_model_a <T3f8> (struct class$integrable_model &
restrict) D.1529;
      static real(kind=4) C.1528 = 2.0e+0;
      struct class$integrable_model_a D.1527;

      D.1527 = d_dt ((struct class$integrable_model *) model);
      D.1529 = d_dt (&D.1527, &C.1528);
      _gfortran_transfer_real_write (&dt_parm.0, &D.1529, 4);


The second call to "d_dt" should actually be a call to
"D.1527->$vptr->multiply".


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

* [Bug fortran/46262] [4.6 Regression] [OOP] tree check: expected function_type or method_type, have pointer_type
  2010-11-01 19:35 [Bug fortran/46262] New: [4.6 Regression] [OOP] tree check: expected function_type or method_type, have pointer_type janus at gcc dot gnu.org
  2010-11-01 19:43 ` [Bug fortran/46262] " janus at gcc dot gnu.org
@ 2010-11-01 19:45 ` janus at gcc dot gnu.org
  2010-11-01 19:49 ` janus at gcc dot gnu.org
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: janus at gcc dot gnu.org @ 2010-11-01 19:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from janus at gcc dot gnu.org 2010-11-01 19:45:12 UTC ---
The following variant:


module integrable_model_module

  implicit none 

  type :: integrable_model
  contains
    procedure :: multiply
    generic :: operator(*) => multiply
  end type integrable_model

  contains

    subroutine integrate (model)
      class(integrable_model) :: model
      real :: r
      r = d_dt(model)*2.0
    end subroutine

    function d_dt (this)
      class(integrable_model), intent(in) :: this
      class(integrable_model), allocatable :: d_dt
    end function

    real function multiply(lhs, rhs)
      class(integrable_model), intent(in) :: lhs
      real, intent(in) :: rhs
    end function

end module


yields:

integrable_model.f03: In function ‘integrate’:
integrable_model.f03:16:0: internal compiler error: in fold_convert_loc, at
fold-const.c:1934


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

* [Bug fortran/46262] [4.6 Regression] [OOP] tree check: expected function_type or method_type, have pointer_type
  2010-11-01 19:35 [Bug fortran/46262] New: [4.6 Regression] [OOP] tree check: expected function_type or method_type, have pointer_type janus at gcc dot gnu.org
  2010-11-01 19:43 ` [Bug fortran/46262] " janus at gcc dot gnu.org
  2010-11-01 19:45 ` janus at gcc dot gnu.org
@ 2010-11-01 19:49 ` janus at gcc dot gnu.org
  2010-11-02  3:33 ` jvdelisle at gcc dot gnu.org
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: janus at gcc dot gnu.org @ 2010-11-01 19:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from janus at gcc dot gnu.org 2010-11-01 19:49:28 UTC ---
Created attachment 22222
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22222
full test case

When fixing, one should make sure that the full code from

http://portal.acm.org/citation.cfm?id=1644001.1644004

also works (attached). Originally reported by Ralph Kube at
http://gcc.gnu.org/ml/fortran/2010-11/msg00003.html.


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

* [Bug fortran/46262] [4.6 Regression] [OOP] tree check: expected function_type or method_type, have pointer_type
  2010-11-01 19:35 [Bug fortran/46262] New: [4.6 Regression] [OOP] tree check: expected function_type or method_type, have pointer_type janus at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2010-11-01 19:49 ` janus at gcc dot gnu.org
@ 2010-11-02  3:33 ` jvdelisle at gcc dot gnu.org
  2010-11-02  5:22 ` jvdelisle at gcc dot gnu.org
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: jvdelisle at gcc dot gnu.org @ 2010-11-02  3:33 UTC (permalink / raw)
  To: gcc-bugs

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

Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jvdelisle at gcc dot
                   |                            |gnu.org

--- Comment #4 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> 2010-11-02 03:33:35 UTC ---
I have a regression hunt running.


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

* [Bug fortran/46262] [4.6 Regression] [OOP] tree check: expected function_type or method_type, have pointer_type
  2010-11-01 19:35 [Bug fortran/46262] New: [4.6 Regression] [OOP] tree check: expected function_type or method_type, have pointer_type janus at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2010-11-02  3:33 ` jvdelisle at gcc dot gnu.org
@ 2010-11-02  5:22 ` jvdelisle at gcc dot gnu.org
  2010-11-02  7:29 ` janus at gcc dot gnu.org
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: jvdelisle at gcc dot gnu.org @ 2010-11-02  5:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> 2010-11-02 05:22:42 UTC ---
Passes at r162312 and fails at r162313.


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

* [Bug fortran/46262] [4.6 Regression] [OOP] tree check: expected function_type or method_type, have pointer_type
  2010-11-01 19:35 [Bug fortran/46262] New: [4.6 Regression] [OOP] tree check: expected function_type or method_type, have pointer_type janus at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2010-11-02  5:22 ` jvdelisle at gcc dot gnu.org
@ 2010-11-02  7:29 ` janus at gcc dot gnu.org
  2010-11-03 15:38 ` rguenth at gcc dot gnu.org
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: janus at gcc dot gnu.org @ 2010-11-02  7:29 UTC (permalink / raw)
  To: gcc-bugs

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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pault at gcc dot gnu.org

--- Comment #6 from janus at gcc dot gnu.org 2010-11-02 07:29:20 UTC ---
(In reply to comment #5)
> Passes at r162312 and fails at r162313.

Thanks for checking, Jerry. r162313 was Paul's fix for PR42385 ("poylmorphic
operators do not work"):

http://gcc.gnu.org/viewcvs?view=revision&revision=162313


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

* [Bug fortran/46262] [4.6 Regression] [OOP] tree check: expected function_type or method_type, have pointer_type
  2010-11-01 19:35 [Bug fortran/46262] New: [4.6 Regression] [OOP] tree check: expected function_type or method_type, have pointer_type janus at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2010-11-02  7:29 ` janus at gcc dot gnu.org
@ 2010-11-03 15:38 ` rguenth at gcc dot gnu.org
  2010-11-03 16:02 ` jakub at gcc dot gnu.org
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-11-03 15:38 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.6.0


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

* [Bug fortran/46262] [4.6 Regression] [OOP] tree check: expected function_type or method_type, have pointer_type
  2010-11-01 19:35 [Bug fortran/46262] New: [4.6 Regression] [OOP] tree check: expected function_type or method_type, have pointer_type janus at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2010-11-03 15:38 ` rguenth at gcc dot gnu.org
@ 2010-11-03 16:02 ` jakub at gcc dot gnu.org
  2010-11-28 15:48 ` jvdelisle at gcc dot gnu.org
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-11-03 16:02 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4
                 CC|                            |jakub at gcc dot gnu.org


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

* [Bug fortran/46262] [4.6 Regression] [OOP] tree check: expected function_type or method_type, have pointer_type
  2010-11-01 19:35 [Bug fortran/46262] New: [4.6 Regression] [OOP] tree check: expected function_type or method_type, have pointer_type janus at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2010-11-03 16:02 ` jakub at gcc dot gnu.org
@ 2010-11-28 15:48 ` jvdelisle at gcc dot gnu.org
  2010-11-28 16:10 ` jvdelisle at gcc dot gnu.org
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: jvdelisle at gcc dot gnu.org @ 2010-11-28 15:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> 2010-11-28 15:23:56 UTC ---
I believe I have this isolated to the changes in resolve.c

Eliminating those changes in the offending patch eliminates the ICE.  Of
course, though the code compiles, it does not link.


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

* [Bug fortran/46262] [4.6 Regression] [OOP] tree check: expected function_type or method_type, have pointer_type
  2010-11-01 19:35 [Bug fortran/46262] New: [4.6 Regression] [OOP] tree check: expected function_type or method_type, have pointer_type janus at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2010-11-28 15:48 ` jvdelisle at gcc dot gnu.org
@ 2010-11-28 16:10 ` jvdelisle at gcc dot gnu.org
  2011-01-05  9:35 ` [Bug fortran/46262] " janus at gcc dot gnu.org
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: jvdelisle at gcc dot gnu.org @ 2010-11-28 16:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> 2010-11-28 15:52:06 UTC ---
Specifically, this line is involved with the problem.

Index: resolve.c
===================================================================
--- resolve.c    (revision 167220)
+++ resolve.c    (working copy)
@@ -5739,7 +5739,6 @@ resolve_typebound_function (gfc_expr* e)
       e->symtree = expr->symtree;
       e->ref = gfc_copy_ref (expr->ref);
       gfc_add_vptr_component (e);
-      gfc_add_component_ref (e, name);
       e->value.function.esym = NULL;
       return SUCCESS;
     }


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

* [Bug fortran/46262] [OOP] tree check: expected function_type or method_type, have pointer_type
  2010-11-01 19:35 [Bug fortran/46262] New: [4.6 Regression] [OOP] tree check: expected function_type or method_type, have pointer_type janus at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2010-11-28 16:10 ` jvdelisle at gcc dot gnu.org
@ 2011-01-05  9:35 ` janus at gcc dot gnu.org
  2011-03-07  8:39 ` janus at gcc dot gnu.org
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: janus at gcc dot gnu.org @ 2011-01-05  9:35 UTC (permalink / raw)
  To: gcc-bugs

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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.6 Regression] [OOP] tree |[OOP] tree check: expected
                   |check: expected             |function_type or
                   |function_type or            |method_type, have
                   |method_type, have           |pointer_type
                   |pointer_type                |

--- Comment #9 from janus at gcc dot gnu.org 2011-01-05 09:33:56 UTC ---
(In reply to comment #1)
> -fdump-tree-original shows wrong code being generated:
> 
> 
>       struct class$integrable_model_a <T3f8> (struct class$integrable_model &
> restrict) D.1529;
>       static real(kind=4) C.1528 = 2.0e+0;
>       struct class$integrable_model_a D.1527;
> 
>       D.1527 = d_dt ((struct class$integrable_model *) model);
>       D.1529 = d_dt (&D.1527, &C.1528);
>       _gfortran_transfer_real_write (&dt_parm.0, &D.1529, 4);
> 
> 
> The second call to "d_dt" should actually be a call to
> "D.1527->$vptr->multiply".

Note that 4.5 also produces wrong code here:

      real(kind=4) D.1560;
      static real(kind=4) C.1559 = 2.0e+0;
      struct .class.integrable_model.a D.1558;

      D.1558 = d_dt ((struct .class.integrable_model *) model);
      D.1560 = multiply (&D.1558, &C.1559);
      _gfortran_transfer_real (&dt_parm.0, &D.1560, 4);

It has a static call to 'multiply', instead of a polymorphic call via the vptr.
So, since 4.5 also does not handle the test case correctly, I think it's fair
to remove the "regression" tag.

In a way one could even argue that the ICE in 4.6 is an improvement over 4.5
silently giving wrong results for such cases, since the user does at least get
*some* error message (even though a crude and uninformative one), instead of
assuming the feature was supported and getting wrong results in the end!


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

* [Bug fortran/46262] [OOP] tree check: expected function_type or method_type, have pointer_type
  2010-11-01 19:35 [Bug fortran/46262] New: [4.6 Regression] [OOP] tree check: expected function_type or method_type, have pointer_type janus at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2011-01-05  9:35 ` [Bug fortran/46262] " janus at gcc dot gnu.org
@ 2011-03-07  8:39 ` janus at gcc dot gnu.org
  2011-03-22 14:54 ` janus at gcc dot gnu.org
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: janus at gcc dot gnu.org @ 2011-03-07  8:39 UTC (permalink / raw)
  To: gcc-bugs

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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dominique.pelletier at
                   |                            |polymtl dot ca

--- Comment #10 from janus at gcc dot gnu.org 2011-03-07 08:39:23 UTC ---
*** Bug 48011 has been marked as a duplicate of this bug. ***


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

* [Bug fortran/46262] [OOP] tree check: expected function_type or method_type, have pointer_type
  2010-11-01 19:35 [Bug fortran/46262] New: [4.6 Regression] [OOP] tree check: expected function_type or method_type, have pointer_type janus at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  2011-03-07  8:39 ` janus at gcc dot gnu.org
@ 2011-03-22 14:54 ` janus at gcc dot gnu.org
  2011-03-25 21:02 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: janus at gcc dot gnu.org @ 2011-03-22 14:54 UTC (permalink / raw)
  To: gcc-bugs

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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011.03.22 14:44:00
     Ever Confirmed|0                           |1


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

* [Bug fortran/46262] [OOP] tree check: expected function_type or method_type, have pointer_type
  2010-11-01 19:35 [Bug fortran/46262] New: [4.6 Regression] [OOP] tree check: expected function_type or method_type, have pointer_type janus at gcc dot gnu.org
                   ` (12 preceding siblings ...)
  2011-03-22 14:54 ` janus at gcc dot gnu.org
@ 2011-03-25 21:02 ` jakub at gcc dot gnu.org
  2011-04-28 17:21 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-03-25 21:02 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.6.0                       |4.6.1

--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-03-25 19:53:03 UTC ---
GCC 4.6.0 is being released, adjusting target milestone.


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

* [Bug fortran/46262] [OOP] tree check: expected function_type or method_type, have pointer_type
  2010-11-01 19:35 [Bug fortran/46262] New: [4.6 Regression] [OOP] tree check: expected function_type or method_type, have pointer_type janus at gcc dot gnu.org
                   ` (13 preceding siblings ...)
  2011-03-25 21:02 ` jakub at gcc dot gnu.org
@ 2011-04-28 17:21 ` rguenth at gcc dot gnu.org
  2012-01-02 12:48 ` pault at gcc dot gnu.org
  2012-01-02 13:04 ` pault at gcc dot gnu.org
  16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-04-28 17:21 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.6.1                       |---


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

* [Bug fortran/46262] [OOP] tree check: expected function_type or method_type, have pointer_type
  2010-11-01 19:35 [Bug fortran/46262] New: [4.6 Regression] [OOP] tree check: expected function_type or method_type, have pointer_type janus at gcc dot gnu.org
                   ` (14 preceding siblings ...)
  2011-04-28 17:21 ` rguenth at gcc dot gnu.org
@ 2012-01-02 12:48 ` pault at gcc dot gnu.org
  2012-01-02 13:04 ` pault at gcc dot gnu.org
  16 siblings, 0 replies; 18+ messages in thread
From: pault at gcc dot gnu.org @ 2012-01-02 12:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 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


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

* [Bug fortran/46262] [OOP] tree check: expected function_type or method_type, have pointer_type
  2010-11-01 19:35 [Bug fortran/46262] New: [4.6 Regression] [OOP] tree check: expected function_type or method_type, have pointer_type janus at gcc dot gnu.org
                   ` (15 preceding siblings ...)
  2012-01-02 12:48 ` pault at gcc dot gnu.org
@ 2012-01-02 13:04 ` pault at gcc dot gnu.org
  16 siblings, 0 replies; 18+ messages in thread
From: pault at gcc dot gnu.org @ 2012-01-02 13:04 UTC (permalink / raw)
  To: gcc-bugs

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

Paul Thomas <pault at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #13 from Paul Thomas <pault at gcc dot gnu.org> 2012-01-02 13:03:12 UTC ---
Fixed on trunk.

Thanks to everybody for the reports and testcases.

Paul


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

end of thread, other threads:[~2012-01-02 13:04 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-01 19:35 [Bug fortran/46262] New: [4.6 Regression] [OOP] tree check: expected function_type or method_type, have pointer_type janus at gcc dot gnu.org
2010-11-01 19:43 ` [Bug fortran/46262] " janus at gcc dot gnu.org
2010-11-01 19:45 ` janus at gcc dot gnu.org
2010-11-01 19:49 ` janus at gcc dot gnu.org
2010-11-02  3:33 ` jvdelisle at gcc dot gnu.org
2010-11-02  5:22 ` jvdelisle at gcc dot gnu.org
2010-11-02  7:29 ` janus at gcc dot gnu.org
2010-11-03 15:38 ` rguenth at gcc dot gnu.org
2010-11-03 16:02 ` jakub at gcc dot gnu.org
2010-11-28 15:48 ` jvdelisle at gcc dot gnu.org
2010-11-28 16:10 ` jvdelisle at gcc dot gnu.org
2011-01-05  9:35 ` [Bug fortran/46262] " janus at gcc dot gnu.org
2011-03-07  8:39 ` janus at gcc dot gnu.org
2011-03-22 14:54 ` janus at gcc dot gnu.org
2011-03-25 21:02 ` jakub at gcc dot gnu.org
2011-04-28 17:21 ` rguenth at gcc dot gnu.org
2012-01-02 12:48 ` pault at gcc dot gnu.org
2012-01-02 13:04 ` pault 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).