From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 43213 invoked by alias); 19 Oct 2015 17:43:23 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 43193 invoked by uid 48); 19 Oct 2015 17:43:20 -0000 From: "trippels at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/68010] internal compiler error: in tree_to_shwi, at tree.h:3661 Date: Mon, 19 Oct 2015 17:43:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Version: 4.9.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: trippels at gcc dot gnu.org X-Bugzilla-Status: NEW 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: cf_known_to_work cf_known_to_fail Message-ID: In-Reply-To: References: 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 X-SW-Source: 2015-10/txt/msg01509.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D68010 Markus Trippelsdorf changed: What |Removed |Added ---------------------------------------------------------------------------- Known to work|5.2.1, 6.0 | Known to fail| |5.2.1, 6.0 --- Comment #5 from Markus Trippelsdorf --- Reduced testcase ICEs with all supported versions: markus@x4 tmp % cat c.ii template auto begin(_Container __cont) -> decltype(__cont.begin()); template auto end(_Container __cont) -> decltype(__cont.end()); class A { public: int begin(); int end(); }; namespace boost {} namespace b =3D boost; namespace boost { template struct B; template struct C; template struct B {}; template struct C { typedef C base_type; template C(B); }; } template class StructDecoder : boost::C { public: StructDecoder() : StructDecoder::base_type(start_rule) { namespace bs =3D boost; using namespace bs; } b::B start_rule; }; namespace qi =3D boost; class D { public: D(int, int); }; struct F : qi::C<> { F(int, D func) : base_type(program), report_error(func) {} qi::B program; StructDecoder q_syslog_desc; D report_error; }; int NFGParserparse_tokens; void NFGParserparse() { A str; D error_report(begin(str), end(str)); F(NFGParserparse_tokens, error_report); } markus@x4 tmp % g++ -c -g -std=3Dc++11 c.ii c.ii: In constructor =E2=80=98StructDecoder::StructDecoder() [with= Skipper =3D int]=E2=80=99: c.ii:49:1: internal compiler error: in tree_to_shwi, at tree.c:7289 } ^ 0xf22ae2 tree_to_shwi(tree_node const*) ../../gcc/gcc/tree.c:7289 0x983033 add_data_member_location_attribute ../../gcc/gcc/dwarf2out.c:15480 0x98c748 gen_inheritance_die ../../gcc/gcc/dwarf2out.c:20345 0x98c748 gen_member_die ../../gcc/gcc/dwarf2out.c:20397 0x98c748 gen_struct_or_union_type_die ../../gcc/gcc/dwarf2out.c:20517 0x98c748 gen_tagged_type_die ../../gcc/gcc/dwarf2out.c:20718 0x98b1cd gen_type_die_with_usage ../../gcc/gcc/dwarf2out.c:20880 0x98c036 gen_type_die ../../gcc/gcc/dwarf2out.c:20935 0x9948fa modified_type_die ../../gcc/gcc/dwarf2out.c:10950 0x99404b force_type_die ../../gcc/gcc/dwarf2out.c:21265 0x99378d get_context_die ../../gcc/gcc/dwarf2out.c:21180 0x99378d force_decl_die ../../gcc/gcc/dwarf2out.c:21199 0x993894 get_context_die ../../gcc/gcc/dwarf2out.c:21183 0x993894 force_decl_die ../../gcc/gcc/dwarf2out.c:21199 0x98e2a7 dwarf2out_imported_module_or_decl_1 ../../gcc/gcc/dwarf2out.c:21752 0x98e592 process_scope_var ../../gcc/gcc/dwarf2out.c:21053 0x98e807 decls_for_scope ../../gcc/gcc/dwarf2out.c:21081 0x9a4b9d gen_lexical_block_die ../../gcc/gcc/dwarf2out.c:19950 0x9a4b9d gen_block_die ../../gcc/gcc/dwarf2out.c:21025 0x98e892 decls_for_scope ../../gcc/gcc/dwarf2out.c:21095 >>From gcc-bugs-return-499955-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Oct 19 17:48:41 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 53181 invoked by alias); 19 Oct 2015 17:48:41 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 53151 invoked by uid 48); 19 Oct 2015 17:48:37 -0000 From: "gerhard.steinmetz.fortran@t-online.de" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/68019] New: ICE on rank mismatch of implied-shape array of user-defined type Date: Mon, 19 Oct 2015 17:48:00 -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: 5.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gerhard.steinmetz.fortran@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: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-10/txt/msg01510.txt.bz2 Content-length: 1194 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68019 Bug ID: 68019 Summary: ICE on rank mismatch of implied-shape array of user-defined type Product: gcc Version: 5.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fortran@t-online.de Target Milestone: --- With a rank mismatch of "arr" : $ cat z1.f90 program p integer :: i type t integer :: n end type type(t), parameter :: vec(*) = [(t(i), i = 1, 4)] type(t), parameter :: arr(*) = reshape(vec, [2, 2]) end $ gfortran -g -O0 -Wall -fcheck=all z1.f90 f951: internal compiler error: in add_init_expr_to_sym, at fortran/decl.c:1457 --- Whereas : $ cat z2.f90 program p integer :: i integer, parameter :: vec(*) = [(i, i = 1, 4)] integer, parameter :: arr(*) = reshape(vec, [2, 2]) end $ gfortran -g -O0 -Wall -fcheck=all z2.f90 z2.f90:4:31: integer, parameter :: arr(*) = reshape(vec, [2, 2]) 1 Error: Incompatible ranks 1 and 2 in assignment at (1)