public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/61963] New: CilkPlus Array Notation ICE in build_array_notation_ref on malformed function arguments.
@ 2014-07-30 12:04 nick.tomlinson at arm dot com
2014-08-01 17:06 ` [Bug other/61963] " kyukhin at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: nick.tomlinson at arm dot com @ 2014-07-30 12:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61963
Bug ID: 61963
Summary: CilkPlus Array Notation ICE in
build_array_notation_ref on malformed function
arguments.
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
Created attachment 33212
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33212&action=edit
A minimal reproducer
GCC ICEs when presented with a malformed function argument list, and two
(or more) uses of the parameter in array notation.
==== Steps to reproduce ====
- Build with: g++ -fcilkplus -c arrayice.cpp
- Observe that an ICE is produced.
==== What I expected to happen ====
- g++ should produce an error message, but without ICEing.
==== What actually happened ====
- Trunk g++ produced the following output:
$ ${GCC_TRUNK}/bin/g++ -fcilkplus -c arrayice.cpp
arrayice.cpp:3:15: error: expected ',' or '...' before 'int'
void f (int * int *a)
^
arrayice.cpp: In function 'void f(int*)':
arrayice.cpp:7:3: error: 'a' was not declared in this scope
a[0:64] = 0;
^
arrayice.cpp:8:9: internal compiler error: in build_array_notation_ref,
at cp/cp-array-notation.c:1396
a[0:64] = 0;
^
0x74c12a 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:1396
0x65d94f cp_parser_array_notation
/home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:6388
0x65d94f cp_parser_postfix_open_square_expression
/home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:6453
0x65d94f cp_parser_postfix_expression
/home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:6053
0x660968 cp_parser_unary_expression
/home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:7293
0x661599 cp_parser_binary_expression
/home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:8036
0x661b6b cp_parser_assignment_expression
/home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:8279
0x664213 cp_parser_expression
/home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:8441
0x664a3c cp_parser_expression
/home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:8480
0x664a3c cp_parser_expression_statement
/home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:9819
0x6595e8 cp_parser_statement
/home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:9670
0x65a3f9 cp_parser_statement_seq_opt
/home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:9942
0x65a566 cp_parser_compound_statement
/home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:9896
0x66ba4b cp_parser_function_body
/home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:18961
0x66ba4b cp_parser_ctor_initializer_opt_and_function_body
/home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:18997
0x6720f3 cp_parser_function_definition_after_declarator
/home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:23162
0x672fae cp_parser_function_definition_from_specifiers_and_declarator
/home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:23074
0x672fae cp_parser_init_declarator
/home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:16824
0x674195 cp_parser_simple_declaration
/home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:11421
0x657da3 cp_parser_block_declaration
/home/nicholas/GCCCilk/bug/native/gcc-4.9.0/gcc/cp/parser.c:11302
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.
- My system GCC produces the following output:
$ g++ -fcilkplus -c arrayice.cpp
arrayice.cpp:3:15: error: expected ',' or '...' before 'int'
void f (int * int *a)
^
arrayice.cpp: In function 'void f(int*)':
arrayice.cpp:7:3: error: 'a' was not declared in this scope
a[0:64] = 0;
^
arrayice.cpp:8: confused by earlier errors, bailing out
==== Environment ====
I have tried this with:
- My system GCC (g++, version 4.9.1)
- A native build of GCC (${GCC_TRUNK}/bin/g++, 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 20140730 (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] 4+ messages in thread
* [Bug other/61963] CilkPlus Array Notation ICE in build_array_notation_ref on malformed function arguments.
2014-07-30 12:04 [Bug other/61963] New: CilkPlus Array Notation ICE in build_array_notation_ref on malformed function arguments nick.tomlinson at arm dot com
@ 2014-08-01 17:06 ` kyukhin at gcc dot gnu.org
2014-08-01 17:20 ` kyukhin at gcc dot gnu.org
2014-08-04 11:26 ` nick.tomlinson at arm dot com
2 siblings, 0 replies; 4+ messages in thread
From: kyukhin at gcc dot gnu.org @ 2014-08-01 17:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61963
--- Comment #1 from Kirill Yukhin <kyukhin at gcc dot gnu.org> ---
Author: kyukhin
Date: Fri Aug 1 17:06:00 2014
New Revision: 213493
URL: https://gcc.gnu.org/viewcvs?rev=213493&root=gcc&view=rev
Log:
PR other/61963
gcc/cp/
* parser.c (cp_parser_array_notation): Added check for array_type.
gcc/testsuite/
* c-c++-common/cilk-plus/AN/pr61963.c: New test.
Added:
branches/gcc-4_9-branch/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61963.c
Modified:
branches/gcc-4_9-branch/gcc/cp/ChangeLog
branches/gcc-4_9-branch/gcc/cp/parser.c
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug other/61963] CilkPlus Array Notation ICE in build_array_notation_ref on malformed function arguments.
2014-07-30 12:04 [Bug other/61963] New: CilkPlus Array Notation ICE in build_array_notation_ref on malformed function arguments nick.tomlinson at arm dot com
2014-08-01 17:06 ` [Bug other/61963] " kyukhin at gcc dot gnu.org
@ 2014-08-01 17:20 ` kyukhin at gcc dot gnu.org
2014-08-04 11:26 ` nick.tomlinson at arm dot com
2 siblings, 0 replies; 4+ messages in thread
From: kyukhin at gcc dot gnu.org @ 2014-08-01 17:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61963
--- Comment #2 from Kirill Yukhin <kyukhin at gcc dot gnu.org> ---
Author: kyukhin
Date: Fri Aug 1 17:20:02 2014
New Revision: 213494
URL: https://gcc.gnu.org/viewcvs?rev=213494&root=gcc&view=rev
Log:
PR other/61963
gcc/cp/
* parser.c (cp_parser_array_notation): Added check for array_type.
gcc/testsuite/
* c-c++-common/cilk-plus/AN/pr61963.c: New test.
Added:
trunk/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61963.c
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug other/61963] CilkPlus Array Notation ICE in build_array_notation_ref on malformed function arguments.
2014-07-30 12:04 [Bug other/61963] New: CilkPlus Array Notation ICE in build_array_notation_ref on malformed function arguments nick.tomlinson at arm dot com
2014-08-01 17:06 ` [Bug other/61963] " kyukhin at gcc dot gnu.org
2014-08-01 17:20 ` kyukhin at gcc dot gnu.org
@ 2014-08-04 11:26 ` nick.tomlinson at arm dot com
2 siblings, 0 replies; 4+ messages in thread
From: nick.tomlinson at arm dot com @ 2014-08-04 11:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61963
Nick Tomlinson <nick.tomlinson at arm dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from Nick Tomlinson <nick.tomlinson at arm dot com> ---
I built GCC r213543 this morning, and have found that the code in the minimal
reproducer no longer produces an ICE - good work! :D - Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-08-04 11:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-30 12:04 [Bug other/61963] New: CilkPlus Array Notation ICE in build_array_notation_ref on malformed function arguments nick.tomlinson at arm dot com
2014-08-01 17:06 ` [Bug other/61963] " kyukhin at gcc dot gnu.org
2014-08-01 17:20 ` kyukhin at gcc dot gnu.org
2014-08-04 11:26 ` nick.tomlinson at arm dot com
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).