Bug 92755 - [10 Regression] ICE in gfc_dep_resolver, at fortran/dependency.c:2123
Summary: [10 Regression] ICE in gfc_dep_resolver, at fortran/dependency.c:2123
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 10.0
: P4 normal
Target Milestone: 10.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2019-12-02 18:44 UTC by G. Steinmetz
Modified: 2019-12-08 12:29 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work: 9.2.0
Known to fail: 10.0
Last reconfirmed: 2019-12-03 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description G. Steinmetz 2019-12-02 18:44:51 UTC
Additional case, switched between 20190630 and 20190728 :


$ cat z1.f90
program p
   type t
   end type
   type t2
      class(t), allocatable :: a(:)
   end type
   type(t2) :: z
   z%a = [z%a]
end


$ gfortran-10-20190630 -c z1.f90
$
$ gfortran-10-20191201 -c z1.f90
z1.f90:8:0:

    8 |    z%a = [z%a]
      |
internal compiler error: in gfc_dep_resolver, at fortran/dependency.c:2123
0x6c9416 gfc_dep_resolver(gfc_ref*, gfc_ref*, gfc_reverse*, bool)
        ../../gcc/fortran/dependency.c:2123
0x6c98ac gfc_check_dependency(gfc_expr*, gfc_expr*, bool)
        ../../gcc/fortran/dependency.c:1394
0x6e2c8e gfc_conv_resolve_dependencies(gfc_loopinfo*, gfc_ss*, gfc_ss*)
        ../../gcc/fortran/trans-array.c:4851
0x714bc5 gfc_trans_assignment_1
        ../../gcc/fortran/trans-expr.c:10806
0x6d4617 trans_code
        ../../gcc/fortran/trans.c:1852
0x6fda64 gfc_generate_function_code(gfc_namespace*)
        ../../gcc/fortran/trans-decl.c:6798
0x686c26 translate_all_program_units
        ../../gcc/fortran/parse.c:6302
0x686c26 gfc_parse_file()
        ../../gcc/fortran/parse.c:6541
0x6d10bf gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:210
Comment 1 Martin Liška 2019-12-03 09:49:09 UTC
Started with r273807.
Comment 2 Thomas Koenig 2019-12-08 12:25:46 UTC
Author: tkoenig
Date: Sun Dec  8 12:25:15 2019
New Revision: 279086

URL: https://gcc.gnu.org/viewcvs?rev=279086&root=gcc&view=rev
Log:
2019-12-08  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/92755
	* dependency.c (gfc_dep_resolver):  Move skipping of _data ref
	into the loop.

2019-12-08  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/92755
	* gfortran.dg/dependency_57.f90: New test.


Added:
    trunk/gcc/testsuite/gfortran.dg/dependency_57.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/dependency.c
    trunk/gcc/testsuite/ChangeLog
Comment 3 Thomas Koenig 2019-12-08 12:29:36 UTC
Fixed.

Thanks a lot for the bug report!