[Bug fortran/80291] New: internal compiler error: in gfc_conv_expr_descriptor, at fortran/trans-array.c:6662

2017-04-03 Thread snowfed at mail dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80291

Bug ID: 80291
   Summary: internal compiler error: in gfc_conv_expr_descriptor,
at fortran/trans-array.c:6662
   Product: gcc
   Version: 5.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: snowfed at mail dot ru
  Target Milestone: ---

Created attachment 41108
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41108&action=edit
This small program reproduces the compiler bug.

Dear gfortran developers!


I stumbled upon this compiler bug which is quite easy to reproduce (source code
attached). Don't know if it's been fixed in future releases of the compiler
although I doubt it because it wouldn't be a common problem to occur.



Example (Ubuntu 16.04)

$ gfortran bug_gfortran.f90 -ggdb
bug_gfortran.f90:67:0:

 vertices = cell%get_vertex(pack([1,2,3,4], cell%get_mask([1,2,3,4])))
 1
internal compiler error: in gfc_conv_expr_descriptor, at
fortran/trans-array.c:6662
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.


Fedor

[Bug fortran/80291] internal compiler error: in gfc_conv_expr_descriptor, at fortran/trans-array.c:6662

2017-04-03 Thread snowfed at mail dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80291

--- Comment #2 from snowfed  ---
Created attachment 41109
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41109&action=edit
This small program reproduces the compiler bug (SIMPLIFIED).

This new test program is much more simple than the previous one. It's slightly
different though.

[Bug fortran/80291] [5/6/7 Regression] internal compiler error: in gfc_conv_expr_descriptor, at fortran/trans-array.c:6662

2017-04-04 Thread snowfed at mail dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80291

--- Comment #4 from snowfed  ---
(In reply to Jakub Jelinek from comment #3)
> r163260 rejected it:
> Error: Incompatible ranks 0 and 1 in assignment at (1)
> and r163270 already ICEs like everything later.
> In that range only r163263 mentions gfc_conv_procedure_call where the ICE
> occurred at that point.

Jacub,

Sorry if I got something wrong as I'm no specialist in the area of compilers
but it doesn't seem to be a regression problem. From what I understand,
regression = used to work, no longer does. 

You mention a revision which apparently gave a compile-time error but I'm
fairly certain the code is valid. It's just that there are a few modern Fortran
features in it that could easily be unsupported at the time of that revision (6
years ago).

By the way, Intel Fortran compiles this code alright, and gfortran too with
certain modifications to the code.

Fedor

[Bug fortran/80291] [OOP] ICE in gfc_conv_expr_descriptor, at fortran/trans-array.c:6662

2017-04-10 Thread snowfed at mail dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80291

--- Comment #7 from snowfed  ---
In the slightly reduced version of the test case cell is not allocated when
reaching associate structure. Maybe, allocate(cell) is worth being added. For
example, when I compile the example with ifort and run it I get SIGSEGV.

[Bug fortran/80931] ICE on move_alloc in gimplify_expr, at gimplify.c:11335

2018-08-16 Thread snowfed at mail dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80931

--- Comment #5 from snowfed  ---
If you don't mind my asking, are you the Fortran book author Arjen Markus?

[Bug fortran/80931] ICE on move_alloc in gimplify_expr, at gimplify.c:11335

2018-08-17 Thread snowfed at mail dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80931

--- Comment #7 from snowfed  ---
Wow! Read your book with great pleasure! (the Russian translation of it)

(In reply to Arjen Markus from comment #6)
> Yes, I am :).
> 
> Regards,
> 
> Arjen
>

[Bug fortran/80931] ICE on move_alloc in gimplify_expr, at gimplify.c:11335

2018-05-18 Thread snowfed at mail dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80931

snowfed  changed:

   What|Removed |Added

 CC||snowfed at mail dot ru

--- Comment #3 from snowfed  ---
Just stumbled upon this bug as well.
Here is my minimal example (slightly smaller than Tiziano's).

module buggy
implicit none

type type_t
character(:), dimension(:), allocatable :: characters

contains
procedure :: mover
end type type_t

contains

subroutine mover (self)
implicit none
class(type_t), intent(in out) :: self
character(:), dimension(:), allocatable :: new
allocate(character(5) :: new(2018))
call move_alloc(new, self%characters)
end subroutine mover

end module buggy