From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 87A033858C50; Tue, 27 Sep 2022 16:19:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 87A033858C50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664295575; bh=20Hijx9c86ahyXjiy+RoEpJRCHmZKxO+SLcVYaI1sDw=; h=From:To:Subject:Date:From; b=DOY9qiWCzZpLvhz1MLG3wQyk7kF03lUCeHoU6tKar+yGsB1L/j+Fbn/i3Asv08xLG guA3b6zU9rIzhQfRCm3tOsbqmNJjWyFVhIy2TREEH6MMwW+0k5GRe9k7CCk7Ui0/uj KV63FxwvbnSBCtZomhEJTGyj0kzVLHGbZFBVMVJY= From: "gscfq@t-online.de" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/107054] New: [10/11/12/13 Regression] ICE in gfc_simplify_unpack, at fortran/simplify.cc:8461 Date: Tue, 27 Sep 2022 16:19:35 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gscfq@t-online.de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107054 Bug ID: 107054 Summary: [10/11/12/13 Regression] ICE in gfc_simplify_unpack, at fortran/simplify.cc:8461 Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gscfq@t-online.de Target Milestone: --- Starts with r10, originally with r12 between 20211003 and 20211010 : $ cat z1.f90 program p type t integer :: n =3D 0 end type type(t), parameter :: a(4) =3D t(2) type(t), parameter :: b(4) =3D reshape(a,[2]) type(t), parameter :: c(2) =3D pack(b,[.false.,.true.,.false.,.true.]) type(t), parameter :: d(4) =3D unpack(c,[.false.,.true.,.false.,.true.],= a) end $ cat z2.f90 program p type t integer :: n =3D 0 end type type(t), parameter :: a(2) =3D t(2) type(t), parameter :: b(4) =3D reshape(a,[2]) type(t), parameter :: c(2) =3D pack(b,[.false.,.true.,.false.,.true.]) type(t), parameter :: d(4) =3D unpack(c,[.false.,.true.,.false.,.true.],= a) end $ cat z3.f90 program p type t integer :: n =3D 0 end type type(t), parameter :: a(2,2) =3D t(2) type(t), parameter :: b(4) =3D reshape(a,[2]) type(t), parameter :: c(2) =3D pack(b,[.false.,.true.,.false.,.true.]) type(t), parameter :: d(4) =3D unpack(c,[.false.,.true.,.false.,.true.],= b) end $ cat z4.f90 module m type t integer :: n end type type(t), parameter :: a(4) =3D t(1) type(t), parameter :: b(4) =3D t(2) type(t), parameter :: c(2) =3D pack (b, [.false., .false., .false., .tru= e.]) type(t), parameter :: d(4) =3D unpack (c, [.false., .true., .false., .tr= ue.], a) end $ gfortran-9 -c z1.f90 z1.f90:6:29: 6 | type(t), parameter :: b(4) =3D reshape(a,[2]) | 1 Error: Different shape for array assignment at (1) on dimension 1 (4 and 2) $ gfortran-13-20220925 -c z1.f90 f951: internal compiler error: in gfc_simplify_unpack, at fortran/simplify.cc:8461 0x891bbf gfc_simplify_unpack(gfc_expr*, gfc_expr*, gfc_expr*) ../../gcc/fortran/simplify.cc:8461 0x80a50a do_simplify ../../gcc/fortran/intrinsic.cc:4677 0x81549a gfc_intrinsic_func_interface(gfc_expr*, int) ../../gcc/fortran/intrinsic.cc:5056 0x86ab38 resolve_unknown_f ../../gcc/fortran/resolve.cc:2990 0x86ab38 resolve_function ../../gcc/fortran/resolve.cc:3347 0x86ab38 gfc_resolve_expr(gfc_expr*) ../../gcc/fortran/resolve.cc:7194 0x7fa394 gfc_reduce_init_expr(gfc_expr*) ../../gcc/fortran/expr.cc:3164 0x7fd320 gfc_match_init_expr(gfc_expr**) ../../gcc/fortran/expr.cc:3212 0x7e72bb variable_decl ../../gcc/fortran/decl.cc:3028 0x7e72bb gfc_match_data_decl() ../../gcc/fortran/decl.cc:6331 0x852f83 match_word ../../gcc/fortran/parse.cc:67 0x852f83 decode_statement ../../gcc/fortran/parse.cc:378 0x8549ca next_free ../../gcc/fortran/parse.cc:1399 0x8549ca next_statement ../../gcc/fortran/parse.cc:1631 0x855f6b parse_spec ../../gcc/fortran/parse.cc:4170 0x85912c parse_progunit ../../gcc/fortran/parse.cc:6212 0x85a7f1 gfc_parse_file() ../../gcc/fortran/parse.cc:6757 0x8a925f gfc_be_parse_file ../../gcc/fortran/f95-lang.cc:229=