[Bug fortran/95331] Unlimited polymorphic arrays have wrong bounds

2020-06-11 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95331
Bug 95331 depends on bug 85868, which changed state.

Bug 85868 Summary: Subarray of a pointer array associated with a pointer dummy 
argument
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85868

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

[Bug fortran/95331] Unlimited polymorphic arrays have wrong bounds

2020-06-11 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95331
Bug 95331 depends on bug 52351, which changed state.

Bug 52351 Summary: Wrong bounds when passing an array section to an intent-in 
pointer dummy
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52351

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

[Bug fortran/95331] Unlimited polymorphic arrays have wrong bounds

2020-06-11 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95331

Thomas Koenig  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED
 CC||tkoenig at gcc dot gnu.org

--- Comment #3 from Thomas Koenig  ---
Fixed on master.

[Bug fortran/95331] Unlimited polymorphic arrays have wrong bounds

2020-06-11 Thread cvs-commit at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95331

--- Comment #2 from CVS Commits  ---
The master branch has been updated by Thomas Kथà¤nig :

https://gcc.gnu.org/g:2ee70f5d161edd99a7af97d166b251bcf83cd91b

commit r11-1235-g2ee70f5d161edd99a7af97d166b251bcf83cd91b
Author: José Rui Faustino de Sousa 
Date:   Thu Jun 11 15:15:25 2020 +0200

PR95331 - Unlimited polymorphic arrays have wrong bounds.

When iterating over a class array use the bounds provided by the
transformed descriptor (in sym->backend_decl) instead of the original
bounds of the array (in the descriptor passed in the class _data)
which are passed in se->expr.

The patch partially depends on the patch for PR52351 and PR85868, but
does not seems to break anything by itself.

gcc/fortran/ChangeLog:

2020-06-11  José Rui Faustino de Sousa  

PR fortran/95331
* trans-array.c (gfc_conv_array_ref): For class array dummy
arguments use the transformed descriptor in sym->backend_decl
instead of the original descriptor.

gcc/testsuite/ChangeLog:

2020-06-11  José Rui Faustino de Sousa  

PR fortran/95331
* gfortran.dg/PR95331.f90: New test.

[Bug fortran/95331] Unlimited polymorphic arrays have wrong bounds

2020-05-26 Thread jrfsousa at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95331

--- Comment #1 from José Rui Faustino de Sousa  ---
Created attachment 48604
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48604=edit
Fortran code demonstrating problems.

Somehow the testcase was left behind...