public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/62008] New: CilkPlus Array Notation ICE in build_array_notation_ref when trying to build a multidimensional array from a pointer.
@ 2014-08-04 11:32 nick.tomlinson at arm dot com
2014-08-22 9:37 ` [Bug other/62008] " kyukhin at gcc dot gnu.org
2014-08-22 9:40 ` kyukhin at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: nick.tomlinson at arm dot com @ 2014-08-04 11:32 UTC (permalink / raw)
To: gcc-bugs
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 <http://gcc.gnu.org/bugs.html> 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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug other/62008] CilkPlus Array Notation ICE in build_array_notation_ref when trying to build a multidimensional array from a pointer.
2014-08-04 11:32 [Bug other/62008] New: CilkPlus Array Notation ICE in build_array_notation_ref when trying to build a multidimensional array from a pointer nick.tomlinson at arm dot com
@ 2014-08-22 9:37 ` kyukhin at gcc dot gnu.org
2014-08-22 9:40 ` kyukhin at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: kyukhin at gcc dot gnu.org @ 2014-08-22 9:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62008
--- Comment #1 from Kirill Yukhin <kyukhin at gcc dot gnu.org> ---
Author: kyukhin
Date: Fri Aug 22 09:37:01 2014
New Revision: 214305
URL: https://gcc.gnu.org/viewcvs?rev=214305&root=gcc&view=rev
Log:
PR other/62008
gcc/c/
* c-parser.c (c_parser_array_notation): Check for correct
type of an array added.
gcc/cp/
* cp-array-notation.c (build_array_notation_ref): Added correct
handling of case with incorrect array.
gcc/testsuite/
* c-c++-common/cilk-plus/AN/pr62008.c: New test.
Added:
trunk/gcc/testsuite/c-c++-common/cilk-plus/AN/pr62008.c
Modified:
trunk/gcc/c/ChangeLog
trunk/gcc/c/c-parser.c
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-array-notation.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug other/62008] CilkPlus Array Notation ICE in build_array_notation_ref when trying to build a multidimensional array from a pointer.
2014-08-04 11:32 [Bug other/62008] New: CilkPlus Array Notation ICE in build_array_notation_ref when trying to build a multidimensional array from a pointer nick.tomlinson at arm dot com
2014-08-22 9:37 ` [Bug other/62008] " kyukhin at gcc dot gnu.org
@ 2014-08-22 9:40 ` kyukhin at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: kyukhin at gcc dot gnu.org @ 2014-08-22 9:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62008
--- Comment #2 from Kirill Yukhin <kyukhin at gcc dot gnu.org> ---
Author: kyukhin
Date: Fri Aug 22 09:40:13 2014
New Revision: 214306
URL: https://gcc.gnu.org/viewcvs?rev=214306&root=gcc&view=rev
Log:
PR other/62008
gcc/c/
* c-parser.c (c_parser_array_notation): Check for correct
type of an array added.
gcc/cp/
* cp-array-notation.c (build_array_notation_ref): Added correct
handling of case with incorrect array.
gcc/testsuite/
* c-c++-common/cilk-plus/AN/pr62008.c: New test.
Added:
branches/gcc-4_9-branch/gcc/testsuite/c-c++-common/cilk-plus/AN/pr62008.c
Modified:
branches/gcc-4_9-branch/gcc/c/ChangeLog
branches/gcc-4_9-branch/gcc/c/c-parser.c
branches/gcc-4_9-branch/gcc/cp/ChangeLog
branches/gcc-4_9-branch/gcc/cp/cp-array-notation.c
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-08-22 9:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-04 11:32 [Bug other/62008] New: CilkPlus Array Notation ICE in build_array_notation_ref when trying to build a multidimensional array from a pointer nick.tomlinson at arm dot com
2014-08-22 9:37 ` [Bug other/62008] " kyukhin at gcc dot gnu.org
2014-08-22 9:40 ` kyukhin at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).