From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20717 invoked by alias); 4 Aug 2014 11:32:36 -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 20677 invoked by uid 48); 4 Aug 2014 11:32:30 -0000 From: "nick.tomlinson at arm dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/62008] New: CilkPlus Array Notation ICE in build_array_notation_ref when trying to build a multidimensional array from a pointer. Date: Mon, 04 Aug 2014 11:32:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Version: 4.10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: nick.tomlinson at arm dot com X-Bugzilla-Status: UNCONFIRMED 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 cf_gcchost cf_gcctarget cf_gccbuild attachments.created 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: 2014-08/txt/msg00179.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62008 Bug ID: 62008 Summary: CilkPlus Array Notation ICE in build_array_notation_ref when trying to build a multidimensional array from a pointer. Product: gcc Version: 4.10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other Assignee: unassigned at gcc dot gnu.org Reporter: nick.tomlinson at arm dot com Host: x86_64-unknown-linux-gnu Target: x86_64-unknown-linux-gnu Build: r213543 Created attachment 33234 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33234&action=edit Minimal reproducer ==== Steps to reproduce ==== - Build with: g++ -fcilkplus -c multidim.cpp - Observe that an ICE is produced. ==== What I expected to happen ==== - g++ should compile the code without generating an ICE or any other error (I *think* the code is valid). ==== What actually happened ==== - Trunk g++ produced the following output: $ ${GCC_TRUNK}/bin/g++ -fcilkplus -c multidim.cpp multidim.cpp: In function 'void f(int*, int, int)': multidim.cpp:4:25: internal compiler error: in build_array_notation_ref, at cp/cp-array-notation.c:1407 tmp[:][:] = a[0:w][0:h]; ^ 0x74ee4a build_array_notation_ref(unsigned int, tree_node*, tree_node*, tree_node*, tree_node*, tree_node*) /home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/cp-array-notation.c:1407 0x661549 cp_parser_array_notation /home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:6388 0x661549 cp_parser_postfix_open_square_expression /home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:6453 0x661549 cp_parser_postfix_expression /home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:6053 0x664558 cp_parser_unary_expression /home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:7293 0x665189 cp_parser_binary_expression /home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:8036 0x66575b cp_parser_assignment_expression /home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:8279 0x665bf5 cp_parser_assignment_expression /home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:8329 0x665bf5 cp_parser_constant_expression /home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:8539 0x665936 cp_parser_assignment_expression /home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:8298 0x667e03 cp_parser_expression /home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:8441 0x66862c cp_parser_expression /home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:8480 0x66862c cp_parser_expression_statement /home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:9819 0x65d1d8 cp_parser_statement /home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:9670 0x65dfe9 cp_parser_statement_seq_opt /home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:9942 0x65e156 cp_parser_compound_statement /home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:9896 0x66f64b cp_parser_function_body /home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:18961 0x66f64b cp_parser_ctor_initializer_opt_and_function_body /home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:18997 0x675cf3 cp_parser_function_definition_after_declarator /home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:23162 0x676bae cp_parser_function_definition_from_specifiers_and_declarator /home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:23074 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. ==== Environment ==== I have tried this with: - My system GCC (g++, version 4.9.1) - A native build of GCC (${GCC_TRUNK}/bin/g++, revision r213543) - I have also seen an ICE for the same code in revision r213234. ${GCC_TRUNK}/bin/g++ is a native build of GCC, with the following specified to the configure script: ./configure --prefix=${GCC_TRUNK} \ --enable-languages=c,c++,fortran --disable-sjlj-exceptions And make invoked as: make CXXFLAGS="-g3 -O0" -j9 $ uname -a Linux squamata 3.15.7-1-ARCH #1 SMP PREEMPT Mon Jul 28 20:06:17 CEST 2014 x86_64 GNU/Linux $ g++ --version g++ (GCC) 4.9.1 Copyright (C) 2014 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. $ ${GCC_TRUNK}/bin/g++ --version g++ (GCC) 4.10.0 20140804 (experimental) Copyright (C) 2014 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.