[Bug fortran/82994] ICE in gfc_match_deallocate, at fortran/match.c:4478

2018-01-26 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82994

kargl at gcc dot gnu.org changed:

   What|Removed |Added

   Priority|P3  |P4
 CC||kargl at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |kargl at gcc dot gnu.org

--- Comment #3 from kargl at gcc dot gnu.org ---
I have a patch.

[Bug fortran/82994] ICE in gfc_match_deallocate, at fortran/match.c:4478

2017-11-14 Thread gs...@t-online.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82994

--- Comment #1 from G. Steinmetz  ---


Now allocated, but still not declared allocatable :
(here gcc-chk was configured with --enable-checking=yes)

$ cat z2.f90
program p
   type t
   end type
   class(t) :: x
   allocate (x)
   deallocate (x)
end


$ gfortran-8-20171112-chk -c z2.f90
z2.f90:5:13:

allocate (x)
 1
Error: Allocate-object at (1) is neither a data pointer nor an allocatable
variable
f951: internal compiler error: Segmentation fault
0xcaca2f crash_signal
../../gcc/toplev.c:325
0x6ee643 gfc_match_deallocate()
../../gcc/fortran/match.c:4478
0x70b309 match_word_omp_simd
../../gcc/fortran/parse.c:93
0x70fd4f match_word
../../gcc/fortran/parse.c:466
0x70fd4f decode_statement
../../gcc/fortran/parse.c:466
0x7107f4 next_free
../../gcc/fortran/parse.c:1225
0x7107f4 next_statement
../../gcc/fortran/parse.c:1457
0x7120dc parse_spec
../../gcc/fortran/parse.c:3834
0x7145d3 parse_progunit
../../gcc/fortran/parse.c:5637
0x715b94 gfc_parse_file()
../../gcc/fortran/parse.c:6177
0x75b20f gfc_be_parse_file
../../gcc/fortran/f95-lang.c:204

[Bug fortran/82994] ICE in gfc_match_deallocate, at fortran/match.c:4478

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

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-11-14
 Ever confirmed|0   |1

--- Comment #2 from Dominique d'Humieres  ---
Confirmed from 4.8 up to trunk (8.0).

My instrumented compiler gives

../../work/gcc/fortran/match.c:4473:7: runtime error: member access within null
pointer of type 'struct gfc_component'

[Bug fortran/82994] ICE in gfc_match_deallocate, at fortran/match.c:4478

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

--- Comment #4 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Wed Feb  7 22:29:22 2018
New Revision: 257465

URL: https://gcc.gnu.org/viewcvs?rev=257465&root=gcc&view=rev
Log:
2018-02-07  Steven G. Kargl  

PR fortran/82994
* match.c (gfc_match_deallocate): Check for NULL pointer.

2018-02-07  Steven G. Kargl  

PR fortran/82994
* gfortran.dg/deallocate_error_3.f90: New test.
* gfortran.dg/deallocate_error_4.f90: New test.

Added:
trunk/gcc/testsuite/gfortran.dg/deallocate_error_3.f90
trunk/gcc/testsuite/gfortran.dg/deallocate_error_4.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/match.c
trunk/gcc/testsuite/ChangeLog

[Bug fortran/82994] ICE in gfc_match_deallocate, at fortran/match.c:4478

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

--- Comment #5 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Wed Feb  7 22:36:24 2018
New Revision: 257467

URL: https://gcc.gnu.org/viewcvs?rev=257467&root=gcc&view=rev
Log:
2018-02-07  Steven G. Kargl  

PR fortran/82994
* match.c (gfc_match_deallocate): Check for NULL pointer.

2018-02-07  Steven G. Kargl  

PR fortran/82994
* gfortran.dg/deallocate_error_3.f90: New test.
* gfortran.dg/deallocate_error_4.f90: New test.

Added:
branches/gcc-7-branch/gcc/testsuite/gfortran.dg/deallocate_error_3.f90
branches/gcc-7-branch/gcc/testsuite/gfortran.dg/deallocate_error_4.f90
Modified:
branches/gcc-7-branch/gcc/fortran/ChangeLog
branches/gcc-7-branch/gcc/fortran/match.c
branches/gcc-7-branch/gcc/testsuite/ChangeLog

[Bug fortran/82994] ICE in gfc_match_deallocate, at fortran/match.c:4478

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

kargl at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |6.5

--- Comment #7 from kargl at gcc dot gnu.org ---
Fixed on 6-branch, 7-branch, and trunk.
Thanks for the bug report.

[Bug fortran/82994] ICE in gfc_match_deallocate, at fortran/match.c:4478

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

--- Comment #6 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Wed Feb  7 22:41:59 2018
New Revision: 257468

URL: https://gcc.gnu.org/viewcvs?rev=257468&root=gcc&view=rev
Log:
2018-02-07  Steven G. Kargl  

PR fortran/82994
* match.c (gfc_match_deallocate): Check for NULL pointer.

2018-02-07  Steven G. Kargl  

PR fortran/82994
* gfortran.dg/deallocate_error_3.f90: New test.
* gfortran.dg/deallocate_error_4.f90: New test.

Added:
branches/gcc-6-branch/gcc/testsuite/gfortran.dg/deallocate_error_3.f90
branches/gcc-6-branch/gcc/testsuite/gfortran.dg/deallocate_error_4.f90
Modified:
branches/gcc-6-branch/gcc/fortran/ChangeLog
branches/gcc-6-branch/gcc/fortran/match.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog