[Bug fortran/100971] ICE: Bad IO basetype (7)

2022-10-14 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100971

anlauf at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
   Target Milestone|--- |13.0
 Resolution|--- |FIXED

--- Comment #6 from anlauf at gcc dot gnu.org ---
Fixed for gcc-13.  Closing.

Thanks for the report!

[Bug fortran/100971] ICE: Bad IO basetype (7)

2022-10-14 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100971

--- Comment #5 from CVS Commits  ---
The master branch has been updated by Harald Anlauf :

https://gcc.gnu.org/g:89f20c9ae4641f9b2e87e47f7dab3dc197faa0aa

commit r13-3309-g89f20c9ae4641f9b2e87e47f7dab3dc197faa0aa
Author: Harald Anlauf 
Date:   Sun Oct 9 20:43:32 2022 +0200

Fortran: fix check of polymorphic elements in data transfers [PR100971]

gcc/fortran/ChangeLog:

PR fortran/100971
* resolve.cc (resolve_transfer): Extend check for permissibility
of polymorphic elements in a data transfer to arrays.

gcc/testsuite/ChangeLog:

PR fortran/100971
* gfortran.dg/der_io_5.f90: New test.

[Bug fortran/100971] ICE: Bad IO basetype (7)

2022-10-09 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100971

anlauf at gcc dot gnu.org changed:

   What|Removed |Added

 CC||anlauf at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |anlauf at gcc dot 
gnu.org
 Status|NEW |ASSIGNED

--- Comment #4 from anlauf at gcc dot gnu.org ---
Submitted: https://gcc.gnu.org/pipermail/fortran/2022-October/058305.html

[Bug fortran/100971] ICE: Bad IO basetype (7)

2022-10-06 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100971

--- Comment #3 from anlauf at gcc dot gnu.org ---
Just from a purely technical point, the following would allow to trigger the
proper check, as it allows to look into arrays, and regtests OK:

diff --git a/gcc/fortran/resolve.cc b/gcc/fortran/resolve.cc
index d9d101775f6..bcf951ad756 100644
--- a/gcc/fortran/resolve.cc
+++ b/gcc/fortran/resolve.cc
@@ -10017,6 +10017,7 @@ resolve_transfer (gfc_code *code)

   if (exp == NULL || (exp->expr_type != EXPR_VARIABLE
  && exp->expr_type != EXPR_FUNCTION
+ && exp->expr_type != EXPR_ARRAY
  && exp->expr_type != EXPR_STRUCTURE))
 return;

@@ -10030,6 +10031,7 @@ resolve_transfer (gfc_code *code)

   const gfc_typespec *ts = exp->expr_type == EXPR_STRUCTURE
|| exp->expr_type == EXPR_FUNCTION
+   || exp->expr_type == EXPR_ARRAY
 ? >ts : >symtree->n.sym->ts;

   /* Go to actual component transferred.  */
@@ -10128,6 +10130,9 @@ resolve_transfer (gfc_code *code)
   if (exp->expr_type == EXPR_STRUCTURE)
 return;

+  if (exp->expr_type == EXPR_ARRAY)
+return;
+
   sym = exp->symtree->n.sym;

   if (sym->as != NULL && sym->as->type == AS_ASSUMED_SIZE && exp->ref

[Bug fortran/100971] ICE: Bad IO basetype (7)

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

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1
   Last reconfirmed||2021-06-21

--- Comment #2 from Dominique d'Humieres  ---
> I can confirm this bug.

Me too!

[Bug fortran/100971] ICE: Bad IO basetype (7)

2021-06-20 Thread jvdelisle2 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100971

Jerry DeLisle  changed:

   What|Removed |Added

 CC||jvdelisle2 at gmail dot com

--- Comment #1 from Jerry DeLisle  ---
I can confirm this bug.