[Bug fortran/57284] [OOP] ICE with find_array_spec for polymorphic arrays

2016-05-23 Thread holysword at inbox dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57284

Benedict  changed:

   What|Removed |Added

 CC||holysword at inbox dot com

--- Comment #5 from Benedict  ---
Is there any progress concerning this bug? I'm trying GCC-5.3.

Please, notice that this also happens when the said class is a polymorphic
class (that is, the CLASS(*) declaration).

This particular bug renders gfortran practically unusable for my application.

[Bug fortran/78092] New: ICE when calling SIZEOF on CLASS(*) entry

2016-10-24 Thread holysword at inbox dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78092

Bug ID: 78092
   Summary: ICE when calling SIZEOF on CLASS(*) entry
   Product: gcc
   Version: 6.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: holysword at inbox dot com
  Target Milestone: ---

The following test program returns an ICE at line 14 for all versions of
gfortran I have tested (up to 6.1)

PROGRAM test_stuff
  IMPLICIT NONE
  INTEGER :: ivar1(2,3), ivar2

  ivar1 = 6
  CALL poly_sizeof(ivar1, ivar2)
  PRINT*, 'ivar2: ', ivar2

  CONTAINS

  SUBROUTINE poly_sizeof(arg1,arg2)
CLASS(*), INTENT(IN) :: arg1(:,:)
INTEGER, INTENT(OUT) :: arg2
arg2 = SIZEOF(arg1(1,1))
  END SUBROUTINE
END PROGRAM test_stuff

Changing the type of arg1 in line 12 to INTEGER compiles the program and gives
the expected result. Changing line 14 to "SIZEOF(arg1)" also works. The problem
seems to be specific for when you require the size of a single element of an
array of unlimited polymorphic variables.