[Bug fortran/93678] ICE in 9.2/9.2.1 not happening in previous gfortran versions

2020-02-13 Thread sgk at troutmask dot apl.washington.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93678

--- Comment #4 from Steve Kargl  ---
On Thu, Feb 13, 2020 at 03:46:17PM +, mail.luis at web dot de wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93678
> 
> --- Comment #3 from Luis Kornblueh  ---
> Thanks @kargl for simplifing my still very long case. However, a bug has been
> introduced in this version.
> 
> The nested transfers cannot be split into two as the result of the first
> transfer is not a character :: c(1) result, but, in the nested case a 
> presumably  character :: tmp(4) array to keep an integer. which gets passed to
> the outer transfer. A write another, a bit bigger case, doing things 
> correctly.
> 
> I created a new testcase, a little bit larger, but, as I think, correct
> Fortran.
> 

I was trying to get to the minimum code required to
trigger the bug.

[Bug fortran/93678] ICE in 9.2/9.2.1 not happening in previous gfortran versions

2020-02-13 Thread mail.luis at web dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93678

--- Comment #3 from Luis Kornblueh  ---
Thanks @kargl for simplifing my still very long case. However, a bug has been
introduced in this version.

The nested transfers cannot be split into two as the result of the first
transfer is not a character :: c(1) result, but, in the nested case a 
presumably  character :: tmp(4) array to keep an integer. which gets passed to
the outer transfer. A write another, a bit bigger case, doing things correctly.

I created a new testcase, a little bit larger, but, as I think, correct
Fortran.

[Bug fortran/93678] ICE in 9.2/9.2.1 not happening in previous gfortran versions

2020-02-13 Thread mail.luis at web dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93678

--- Comment #2 from Luis Kornblueh  ---
Created attachment 47838
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47838=edit
New testcase

[Bug fortran/93678] ICE in 9.2/9.2.1 not happening in previous gfortran versions

2020-02-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93678

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2020-02-12
 Ever confirmed|0   |1

[Bug fortran/93678] ICE in 9.2/9.2.1 not happening in previous gfortran versions

2020-02-11 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93678

kargl at gcc dot gnu.org changed:

   What|Removed |Added

   Priority|P3  |P4
  Known to fail||10.0, 8.3.1, 9.2.1

[Bug fortran/93678] ICE in 9.2/9.2.1 not happening in previous gfortran versions

2020-02-11 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93678

kargl at gcc dot gnu.org changed:

   What|Removed |Added

 CC||kargl at gcc dot gnu.org

--- Comment #1 from kargl at gcc dot gnu.org ---
Reduced testcase.

Have no idea if original code and/or this testcase is valid Fortran.
My suspicion is that the original code is invalid.

module mo_a

   implicit none

   type t_b
  integer n
  contains
 procedure :: unpackint => b_unpackint
 procedure :: unpackbytes => b_unpackbytes  
   end type t_b

   contains

  function b_unpackbytes(me, s) result(res)
 class(t_b), intent(inout) :: me
 character, intent(in) :: s(:)
 character, pointer :: res(:)
 res => null()
 if (len(s) == 1) me%n = 42
  end function b_unpackbytes

  subroutine b_unpackint(me, val)
 class(t_b), intent(inout) :: me
 integer, intent(out) :: val
 character :: c(1)
 c = transfer(val, c)
 val = transfer(me%unpackbytes(c),  val)
  end subroutine b_unpackint
end module mo_a