[Bug fortran/72755] Internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.c:1369

2018-05-13 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72755

Paul Thomas  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 CC||pault at gcc dot gnu.org
 Resolution|--- |FIXED

--- Comment #12 from Paul Thomas  ---
This is fixed by the patch for PRs68846 and 70864 - all the way back to
6-branch.

Thanks for the report.

Paul

[Bug fortran/72755] Internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.c:1369

2018-05-13 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72755

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|NEW |WAITING

--- Comment #11 from Dominique d'Humieres  ---
The tests in comments 6 and 9 are fixed on trunk (9.0, r260189), likely r260113
(pr68846, pr70864).

Compiling the original test attached to comment 0 now gives the error

pr72755.f90:457:10:

 res = huge(0.0_8)
  1
Error: Arithmetic overflow converting REAL(8) to REAL(4) at (1). This check can
be disabled with the option '-fno-range-check'
pr72755.f90:1082:6:

   use m_util_convert
  1
Fatal Error: Can't open module file 'm_util_convert.mod' for reading at (1): No
such file or directory
compilation terminated.

which expected with

! The resulting real(kind=8)
  real(kind=4) :: res

The test compiles with '-fno-range-check' or if I fix the above typo.

If there is no objection in the coming days I'll mark this PR as a duplicate of
pr70864.

[Bug fortran/72755] Internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.c:1369

2016-12-06 Thread gerhard.steinmetz.fort...@t-online.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72755

--- Comment #10 from Gerhard Steinmetz  
---
Reduced source is nearly identical, backtrace completely identical
to that of pr70864 comment 3.

[Bug fortran/72755] Internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.c:1369

2016-12-06 Thread gerhard.steinmetz.fort...@t-online.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72755

Gerhard Steinmetz  changed:

   What|Removed |Added

 CC||gerhard.steinmetz.fortran@t
   ||-online.de

--- Comment #9 from Gerhard Steinmetz  
---
Reduced and simplified a bit more. Element "buffer" in "t_string"
is not needed to produce the ICE, thus commented out.


$ cat pr72755_c9.f90
module m72755
   type t_string
  ! character(len=:), allocatable :: buffer
   contains
  procedure :: string_assign_from_string
  generic :: assignment(=) => string_assign_from_string
   end type
   type t_msg
  type(t_string) :: text
   end type
contains
   subroutine string_assign_from_string( left, right )
  class(t_string), intent(inout) :: left
  type(t_string), intent(in) :: right
   end subroutine
   subroutine messages_push_back( array, msg )
  type(t_msg), allocatable, intent(inout) :: array(:)
  type(t_msg), intent(in) :: msg
  array(1) = msg   !!
   end subroutine
end module


$ gfortran-7-20161204 -c pr72755_c9.f90
pr72755_c9.f90:21:0:

 end module

internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.c:1477
0x75a352 gfc_get_symbol_decl(gfc_symbol*)
../../gcc/fortran/trans-decl.c:1477
0x75e5b7 generate_local_decl
../../gcc/fortran/trans-decl.c:5327
0x71825b do_traverse_symtree
../../gcc/fortran/symbol.c:3994
0x75f412 generate_local_vars
../../gcc/fortran/trans-decl.c:5527
0x75f412 gfc_generate_function_code(gfc_namespace*)
../../gcc/fortran/trans-decl.c:6206
0x7331f9 gfc_generate_module_code(gfc_namespace*)
../../gcc/fortran/trans.c:2164
0x6e72fd translate_all_program_units
../../gcc/fortran/parse.c:6025
0x6e72fd gfc_parse_file()
../../gcc/fortran/parse.c:6238
0x72b182 gfc_be_parse_file
../../gcc/fortran/f95-lang.c:202

[Bug fortran/72755] Internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.c:1369

2016-07-30 Thread fmartinez at gmv dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72755

--- Comment #8 from Fran Martinez Fadrique  ---
Thanks for the quick check.
Sorry for the lengthy modules but I could not figure out the precise location
of the problema within m_messages.f03.
Is there a posible work around at hand?
Thanks,
Fran

[Bug fortran/72755] Internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.c:1369

2016-07-30 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72755

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-07-30
 Blocks||68241
 Ever confirmed|0   |1

--- Comment #7 from Dominique d'Humieres  ---
Confirmed from 4.9 up to trunk. "Deferred-length character component" not
supported on 4.8. Related to/duplicate of pr70864?


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68241
[Bug 68241] [meta-bug] Deferred-length character

[Bug fortran/72755] Internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.c:1369

2016-07-29 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72755

kargl at gcc dot gnu.org changed:

   What|Removed |Added

 CC||kargl at gcc dot gnu.org

--- Comment #6 from kargl at gcc dot gnu.org ---
Reduced to something less than 3000 lines of code.  Sheesh.

module m_string
   implicit none
   type t_string
  character(len=:), allocatable :: buffer
  contains
 generic :: assignment(=) => string_assign_from_string
 procedure, private :: string_assign_from_string
   end type t_string
   contains
  subroutine string_assign_from_string( left, right )
 class(t_string), intent(inout) :: left
 type(t_string), intent(in) :: right
  end subroutine string_assign_from_string
end module m_string

module m_msg
   use m_string
   implicit none
   type t_msg
  integer :: code = 0
  type(t_string) :: text, mod, proc
  contains
 procedure :: get_code => msg_code_get
   end type t_msg
   contains
  elemental function msg_code_get( this ) result(res)
 class(t_msg), intent(in) :: this
 integer :: res
 res = this%code
  end function msg_code_get
end module m_msg

module m_messages
   use m_msg
   implicit none
   type t_messages
  integer :: unit = -1
  type(t_msg), dimension(:), allocatable :: error_buffer
  type(t_msg), dimension(:), allocatable :: warning_buffer
   end type t_messages
   contains
  subroutine messages_push_back( array, msg )
 type(t_msg), dimension(:), allocatable, intent(inout) :: array
 type(t_msg), intent(in) :: msg
 integer idx
 idx = count(array%get_code() /= 0) + 1
 array(idx) = msg
  end subroutine messages_push_back
end module m_messages

[Bug fortran/72755] Internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.c:1369

2016-07-29 Thread fmartinez at gmv dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72755

--- Comment #5 from Fran Martinez Fadrique  ---
Created attachment 39033
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39033=edit
Dependency

[Bug fortran/72755] Internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.c:1369

2016-07-29 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72755

--- Comment #4 from kargl at gcc dot gnu.org ---
Insufficient has been provided.

% grep -E ^module a.f90 b.f90 c.f90 
a.f90:module m_messages
b.f90:module m_msg
c.f90:module m_string

% gfc7 -c c.f90
c.f90:13:6:

   use m_util_convert
  1
Fatal Error: Can't open module file 'm_util_convert.mod' for reading

[Bug fortran/72755] Internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.c:1369

2016-07-29 Thread fmartinez at gmv dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72755

--- Comment #3 from Fran Martinez Fadrique  ---
The same problem appears in previous versions (at least 6.1.1 and 5.4)

[Bug fortran/72755] Internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.c:1369

2016-07-29 Thread fmartinez at gmv dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72755

--- Comment #1 from Fran Martinez Fadrique  ---
Created attachment 39031
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39031=edit
Dependency

[Bug fortran/72755] Internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.c:1369

2016-07-29 Thread fmartinez at gmv dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72755

--- Comment #2 from Fran Martinez Fadrique  ---
Created attachment 39032
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39032=edit
Dependency