[Bug fortran/59093] Segfault in gfc_trans_pointer_assignment

2018-03-07 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59093

kargl at gcc dot gnu.org changed:

   What|Removed |Added

 CC||kargl at gcc dot gnu.org

--- Comment #15 from kargl at gcc dot gnu.org ---
(In reply to Matt Thompson from comment #14)
> Query: What version of GCC will fix this? It was reported fixed last year,
> but GCC 7.3.0 still ICEs out.

If you follow the links, you find

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=34640#c35

that is a fairly large intrusive patch.  I suspect that
Paul did not backport to the 7-branch because of this.
So, the fix will be in 8.0 (or 8.1 can't remember what
the releasing scheme is).

[Bug fortran/59093] Segfault in gfc_trans_pointer_assignment

2018-03-07 Thread matthew.thompson at nasa dot gov
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59093

--- Comment #14 from Matt Thompson  ---
Query: What version of GCC will fix this? It was reported fixed last year, but
GCC 7.3.0 still ICEs out.

[Bug fortran/59093] Segfault in gfc_trans_pointer_assignment

2017-06-11 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59093

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #13 from Dominique d'Humieres  ---
Fixed by the patch for pr34640.

*** This bug has been marked as a duplicate of bug 34640 ***

[Bug fortran/59093] Segfault in gfc_trans_pointer_assignment

2017-05-18 Thread zeccav at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59093

Vittorio Zecca  changed:

   What|Removed |Added

 CC||zeccav at gmail dot com

--- Comment #12 from Vittorio Zecca  ---
Bug still present in gcc 8.0.0 trunk 247930.

In this test case:

  subroutine extract(this, v)
  type :: foo
   real :: v
  end type
  class(foo), target :: this(:)
  real, pointer :: v(:)
  select type (this)
  class is (foo)
   v => this(1:2)%v
  end select
  end subroutine

[Bug fortran/59093] Segfault in gfc_trans_pointer_assignment

2016-06-08 Thread matthew.thompson at nasa dot gov
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59093

--- Comment #11 from Matt Thompson  ---
Bug still present in GCC 6.1.0:

(907) $ gfortran  --version
GNU Fortran (GCC) 6.1.0
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

(908) $ gfortran test.F90
test.F90:23:0:

 GRIDIM => LocStream%Ptr%Tiling(:)%IM

internal compiler error: Segmentation fault
0xa94eff crash_signal
../../gcc-6.1.0/gcc/toplev.c:333
0x6edd9d gfc_trans_pointer_assignment(gfc_expr*, gfc_expr*)
../../gcc-6.1.0/gcc/fortran/trans-expr.c:7945
0x6b594a trans_code
../../gcc-6.1.0/gcc/fortran/trans.c:1697
0x6d8cdc gfc_generate_function_code(gfc_namespace*)
../../gcc-6.1.0/gcc/fortran/trans-decl.c:6154
0x6d8b57 gfc_generate_contained_functions
../../gcc-6.1.0/gcc/fortran/trans-decl.c:5144
0x6d8b57 gfc_generate_function_code(gfc_namespace*)
../../gcc-6.1.0/gcc/fortran/trans-decl.c:6083
0x671920 translate_all_program_units
../../gcc-6.1.0/gcc/fortran/parse.c:5613
0x671920 gfc_parse_file()
../../gcc-6.1.0/gcc/fortran/parse.c:5819
0x6b2ab5 gfc_be_parse_file
../../gcc-6.1.0/gcc/fortran/f95-lang.c:201
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

[Bug fortran/59093] Segfault in gfc_trans_pointer_assignment

2016-04-06 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59093

Paul Thomas  changed:

   What|Removed |Added

 CC||damian at sourceryinstitute 
dot or
   ||g, pault at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |pault at gcc dot gnu.org

--- Comment #10 from Paul Thomas  ---
It is the same as PR34640, which was already assigned to me, PR57116 and is
related to PR40737.

Paul

[Bug fortran/59093] Segfault in gfc_trans_pointer_assignment

2015-05-21 Thread matthew.thompson at nasa dot gov
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59093

Matt Thompson matthew.thompson at nasa dot gov changed:

   What|Removed |Added

Version|4.9.1   |5.1.0

--- Comment #9 from Matt Thompson matthew.thompson at nasa dot gov ---
This bug is still present in 5.1.0 stable. Using the code in Comment #3, I see:

(350) $ gfortran --version
GNU Fortran (GCC) 5.1.0
Copyright (C) 2015 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING

(351) $ gfortran test.F90
test.F90:23:0:

 GRIDIM = LocStream%Ptr%Tiling(:)%IM
 1
internal compiler error: Segmentation fault
0xa7efff crash_signal
../../gcc-5.1.0/gcc/toplev.c:383
0x6ff34a gfc_trans_pointer_assignment(gfc_expr*, gfc_expr*)
../../gcc-5.1.0/gcc/fortran/trans-expr.c:7612
0x6cb196 trans_code
../../gcc-5.1.0/gcc/fortran/trans.c:1682
0x6eab63 gfc_generate_function_code(gfc_namespace*)
../../gcc-5.1.0/gcc/fortran/trans-decl.c:5841
0x6ea9c7 gfc_generate_contained_functions
../../gcc-5.1.0/gcc/fortran/trans-decl.c:4979
0x6ea9c7 gfc_generate_function_code(gfc_namespace*)
../../gcc-5.1.0/gcc/fortran/trans-decl.c:5765
0x688e60 translate_all_program_units
../../gcc-5.1.0/gcc/fortran/parse.c:5341
0x688e60 gfc_parse_file()
../../gcc-5.1.0/gcc/fortran/parse.c:5538
0x6c8315 gfc_be_parse_file
../../gcc-5.1.0/gcc/fortran/f95-lang.c:228
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See http://gcc.gnu.org/bugs.html for instructions.


[Bug fortran/59093] Segfault in gfc_trans_pointer_assignment

2015-01-25 Thread anlauf at gmx dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59093

Harald Anlauf anlauf at gmx dot de changed:

   What|Removed |Added

 CC||anlauf at gmx dot de

--- Comment #8 from Harald Anlauf anlauf at gmx dot de ---
(In reply to Matt Thompson from comment #7)
 I'm not sure if anyone is even looking at this bug anymore, but I wanted to
 say it is still present in gcc 4.9.1. Using the test from ja...@gcc.gnu.org:

Still present in gcc 5 trunk rev. 220062.


[Bug fortran/59093] Segfault in gfc_trans_pointer_assignment

2014-08-14 Thread matthew.thompson at nasa dot gov
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59093

Matt Thompson matthew.thompson at nasa dot gov changed:

   What|Removed |Added

Version|4.8.1   |4.9.1

--- Comment #7 from Matt Thompson matthew.thompson at nasa dot gov ---
I'm not sure if anyone is even looking at this bug anymore, but I wanted to say
it is still present in gcc 4.9.1. Using the test from ja...@gcc.gnu.org:

$ gfortran --version
GNU Fortran (GCC) 4.9.1
Copyright (C) 2014 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING

$ gfortran test_from_gcc.F90
test_from_gcc.F90: In function ‘mapl_locstreamget’:
test_from_gcc.F90:23:0: internal compiler error: Segmentation fault
 GRIDIM = LocStream%Ptr%Tiling(:)%IM
 ^
0x50f628 ???
../sysdeps/x86_64/elf/start.S:113
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See http://gcc.gnu.org/bugs.html for instructions.

The bug also still exists with 4.8.3.

Does anyone have any idea if this will ever be fixed?

[Bug fortran/59093] Segfault in gfc_trans_pointer_assignment

2014-06-11 Thread matthew.thompson at nasa dot gov
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59093

--- Comment #6 from Matt Thompson matthew.thompson at nasa dot gov ---
Has there been any work/success on this bug? It's still affecting our ability
to compile this code with gfortran.


[Bug fortran/59093] Segfault in gfc_trans_pointer_assignment

2014-03-26 Thread matthew.thompson at nasa dot gov
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59093

--- Comment #5 from Matt Thompson matthew.thompson at nasa dot gov ---
An additional thought. You have a reduced test case which dies in Comment #3
(which fails for gfortran 4.9). However, you can make something similar which
succeeds:

program main

implicit none

type :: MAPL_LocStream
  type(MAPL_LocStreamType), pointer :: Ptr
end type

type MAPL_Tiling
   integer :: IM
end type

type MAPL_LocStreamType
   type(MAPL_Tiling), pointer  :: Tiling(:)
end type

contains

  subroutine MAPL_LocStreamGet (GRIDIM)
type(MAPL_LocStream) :: LocStream
integer, pointer :: GRIDIM(:)

integer, pointer :: LP(:)

LP = LocStream%Ptr%Tiling(:)%IM

  end subroutine

end program main


So, it's not that gfortran/gcc can't do the pointer, it's that it can't do it
to a pointer passed through the interface. Note that this still fails:


program main

implicit none

type :: MAPL_LocStream
  type(MAPL_LocStreamType), pointer :: Ptr
end type

type MAPL_Tiling
   integer :: IM
end type

type MAPL_LocStreamType
   type(MAPL_Tiling), pointer  :: Tiling(:)
end type

contains

  subroutine MAPL_LocStreamGet (GRIDIM)
type(MAPL_LocStream) :: LocStream
integer, pointer :: GRIDIM(:)

integer, pointer :: LP(:)

LP = LocStream%Ptr%Tiling(:)%IM
GRIDIM = LP

  end subroutine

end program main

with:
$ gfortran --version
GNU Fortran (GCC) 4.9.0 20140105 (experimental)
Copyright (C) 2014 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING

$ gfortran test.fix.F90
test.fix.F90: In function ‘mapl_locstreamget’:
test.fix.F90:26:0: internal compiler error: Segmentation fault
 GRIDIM = LP
 ^
0x50ff58 ???
../sysdeps/x86_64/elf/start.S:113
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See http://gcc.gnu.org/bugs.html for instructions.

[Bug fortran/59093] Segfault in gfc_trans_pointer_assignment

2014-03-19 Thread matthew.thompson at nasa dot gov
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59093

--- Comment #4 from Matt Thompson matthew.thompson at nasa dot gov ---
Any progress on this bug in the latest versions of the compiler?