[Bug fortran/98897] Erroneous procedure attribute for associate name

2021-02-22 Thread damian at sourceryinstitute dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98897

--- Comment #8 from Damian Rouson  ---
Thanks, Paul and Tobias!

[Bug fortran/98897] Erroneous procedure attribute for associate name

2021-02-13 Thread dominiq at lps dot ens.fr via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98897

Dominique d'Humieres  changed:

   What|Removed |Added

 CC||Bader at lrz dot de

--- Comment #7 from Dominique d'Humieres  ---
*** Bug 67744 has been marked as a duplicate of this bug. ***

[Bug fortran/98897] Erroneous procedure attribute for associate name

2021-02-11 Thread pault at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98897

Paul Thomas  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED

--- Comment #6 from Paul Thomas  ---
Fixed on 10- and 11-branches.

Thanks for the report, Damian.

Paul

PS See PR99065 for the reason for the delay.

[Bug fortran/98897] Erroneous procedure attribute for associate name

2021-02-11 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98897

--- Comment #5 from CVS Commits  ---
The releases/gcc-10 branch has been updated by Paul Thomas :

https://gcc.gnu.org/g:9d3b9a3e70e634c7c48bb12bb35ec8219024f98b

commit r10-9358-g9d3b9a3e70e634c7c48bb12bb35ec8219024f98b
Author: Paul Thomas 
Date:   Thu Feb 11 13:24:50 2021 +

Fortran: Fix calls to associate name typebound subroutines [PR98897].

2021-02-11  Paul Thomas  

gcc/fortran
PR fortran/98897
* match.c (gfc_match_call): Include associate names as possible
entities with typebound subroutines. The target needs to be
resolved for the type.

gcc/testsuite/
PR fortran/98897
* gfortran.dg/typebound_call_32.f90: New test.

(cherry picked from commit ff6903288d96aa1d28ae4912b1270985475f3ba8)

[Bug fortran/98897] Erroneous procedure attribute for associate name

2021-02-11 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98897

--- Comment #4 from CVS Commits  ---
The master branch has been updated by Paul Thomas :

https://gcc.gnu.org/g:ff6903288d96aa1d28ae4912b1270985475f3ba8

commit r11-7188-gff6903288d96aa1d28ae4912b1270985475f3ba8
Author: Paul Thomas 
Date:   Thu Feb 11 13:24:50 2021 +

Fortran: Fix calls to associate name typebound subroutines [PR98897].

2021-02-11  Paul Thomas  

gcc/fortran
PR fortran/98897
* match.c (gfc_match_call): Include associate names as possible
entities with typebound subroutines. The target needs to be
resolved for the type.

gcc/testsuite/
PR fortran/98897
* gfortran.dg/typebound_call_32.f90: New test.

[Bug fortran/98897] Erroneous procedure attribute for associate name

2021-02-02 Thread damian at sourceryinstitute dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98897

--- Comment #3 from Damian Rouson  ---
Thanks for the quick fix, Paul!   Any chance of this being back-ported to the
10 branch?

[Bug fortran/98897] Erroneous procedure attribute for associate name

2021-02-02 Thread pault at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98897

Paul Thomas  changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |pault at gcc dot gnu.org
 CC||pault at gcc dot gnu.org
 Ever confirmed|0   |1
   Last reconfirmed||2021-02-02
 Status|UNCONFIRMED |ASSIGNED

--- Comment #2 from Paul Thomas  ---
Created attachment 50114
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50114=edit
Patch for the PR

The attached regtests too :-)

Thanks for the report, Damian.

Paul

[Bug fortran/98897] Erroneous procedure attribute for associate name

2021-02-01 Thread burnus at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98897

Tobias Burnus  changed:

   What|Removed |Added

 CC||burnus at gcc dot gnu.org

--- Comment #1 from Tobias Burnus  ---
match.c's gfc_match_call has:

  /* If this is a variable of derived-type, it probably starts a type-bound
 procedure call.  */
  if ((sym->attr.flavor != FL_PROCEDURE
   || gfc_is_function_return_value (sym, gfc_current_ns))
  && (sym->ts.type == BT_DERIVED || sym->ts.type == BT_CLASS))
return match_typebound_call (st);

But here we have:
  sym->ts.type == BT_UNKNOWN, sym->attr.flavor == FL_VARIABLE

However, we do have: sym->assoc != NULL && sym->assoc->target != NULL and
'target' has:
  expr_type = EXPR_FUNCTION
  ts = {type = BT_UNKNOWN
  sym->assoc->target->symtree->n.sym
  $29 = {name = "output_data_t", module = "output_data_m",
  but the rest is also the default value.

Thus, the target needs to be resolved at some point – even when parsing '%' at
some point, the DT needs to be known.