[Bug c/63336] cilkplus array notation ICE in find_rank

2017-12-04 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63336

Paolo Carlini  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #11 from Paolo Carlini  ---
Cilk Plus, deprecated for 7.x, will not be in 8.x.

[Bug c/63336] cilkplus array notation ICE in find_rank

2016-08-30 Thread yves.vandriessche at intel dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63336

--- Comment #10 from Yves Vandriessche  ---
A similar internal compile error is triggered in find_rank when dealing with
two-dimensional array arguments, for both g++-5.2 and g++-6.1.1.

>void test(double Arr[][16]) {
>  double A[16]= {0};
>  for(int i=0; i<4; i++) {
>A[:] += Arr[i][:]; // internal compile error:
>   // in find_rank, at c-family/array-notation-common.c:232
>  }
>  printf("%f \n", A[0]);
>}

This only happens on two-dimensional arrays. Passing a regular array (e.g.
Arr[16]) correctly yields a normal compile error (not an ICE); start-index and
length cannot be determined as `double Arr[16]` degenerates into `double *Arr`.

Complete test code has been attached attached.

[Bug c/63336] cilkplus array notation ICE in find_rank

2016-08-30 Thread yves.vandriessche at intel dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63336

--- Comment #9 from Yves Vandriessche  ---
Created attachment 39518
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39518=edit
2D-array cilk array notation ICE test case

[Bug c/63336] cilkplus array notation ICE in find_rank

2016-04-06 Thread yves.vandriessche at intel dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63336

Yves Vandriessche  changed:

   What|Removed |Added

 CC||yves.vandriessche at intel dot 
com

--- Comment #8 from Yves Vandriessche  ---
reconfirming for g++ (Ubuntu 5.2.1-22ubuntu2) 5.2.1 20151010

compiling with -std-gnu++11 -fcilkplus

I did find a workaround: I do not get the error if I avoid using the array
notation extension on a member. Using a local variable that takes on the
pointer value of the member compiles perfectly.

> struct Test {
>   int nrows;
>   int * rows;
>   Test(int _nrows, int * in_rows): nrows(_nrows) {
> rows = new int[nrows + 1];
> 
> // internal compiler error: in find_rank, at 
> c-family/array-notation-common.c:244
> rows[0:nrows+1] = 0;
> 
> // // workaround
> // int * _rows = rows;
> // _rows[0:nrows+1] = 0;
>   }
> };
> 
> int main() {
>   Test t{1024*1024, nullptr};
> }

[Bug c/63336] cilkplus array notation ICE in find_rank

2015-10-29 Thread jtamagnan at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63336

jtamagnan at gmail dot com changed:

   What|Removed |Added

 CC||jtamagnan at gmail dot com

--- Comment #7 from jtamagnan at gmail dot com ---
I had the same error with the following code:

> class test{
> public:
>   int arr[2][2][2];
> 
>   test()
>   {
> arr[0:2][0:2][0:2] = 1;
>   }
> };
> 
> 
> int main(){
>   test t;
>   return 1;
> }

And compiling with

> gcc cilk_test.cc -std-gnu++11 -fcilkplus

with gcc version: 

> gcc (Debian 5.2.1-21) 5.2.1 20151003

The full output from the compiler was:

> cilk_test.cc: In constructor ‘test::test()’:
> cilk_test.cc:8:3: internal compiler error: in find_rank, at 
> c-family/array-notation-common.c:244
>}
>^
> 0x7567cc find_rank(unsigned int, tree_node*, tree_node*, bool, unsigned long*)
> ../../src/gcc/c-family/array-notation-common.c:244
> 0x6fd22b expand_an_in_modify_expr
> ../../src/gcc/cp/cp-array-notation.c:576
> 0x6fe677 expand_array_notation_exprs(tree_node*)
> ../../src/gcc/cp/cp-array-notation.c:1172
> 0x6fe4f8 expand_array_notation_exprs(tree_node*)
> ../../src/gcc/cp/cp-array-notation.c:1252
> 0x6fe4f8 expand_array_notation_exprs(tree_node*)
> ../../src/gcc/cp/cp-array-notation.c:1252
> 0x6fe4f8 expand_array_notation_exprs(tree_node*)
> ../../src/gcc/cp/cp-array-notation.c:1252
> 0x6fe6c3 expand_array_notation_exprs(tree_node*)
> ../../src/gcc/cp/cp-array-notation.c:1185
> 0x6f97af cp_genericize(tree_node*)
> ../../src/gcc/cp/cp-gimplify.c:1406
> 0x61652a finish_function(int)
> ../../src/gcc/cp/decl.c:14328
> 0x6890e5 cp_parser_function_definition_after_declarator
> ../../src/gcc/cp/parser.c:23528
> 0x690e1c cp_parser_late_parsing_for_member
> ../../src/gcc/cp/parser.c:24205
> 0x6703fd cp_parser_class_specifier_1
> ../../src/gcc/cp/parser.c:20082
> 0x6703fd cp_parser_class_specifier
> ../../src/gcc/cp/parser.c:20108
> 0x6703fd cp_parser_type_specifier
> ../../src/gcc/cp/parser.c:14727
> 0x6851e7 cp_parser_decl_specifier_seq
> ../../src/gcc/cp/parser.c:11958
> 0x68abf1 cp_parser_simple_declaration
> ../../src/gcc/cp/parser.c:11535
> 0x673023 cp_parser_block_declaration
> ../../src/gcc/cp/parser.c:11482
> 0x66d1d9 cp_parser_declaration
> ../../src/gcc/cp/parser.c:11379
> 0x693f4a cp_parser_declaration_seq_opt
> ../../src/gcc/cp/parser.c:11265
> 0x69425f cp_parser_translation_unit
> ../../src/gcc/cp/parser.c:4100
> Please submit a full bug report,
> with preprocessed source if appropriate.
> Please include the complete backtrace with any bug report.
> See  for instructions.

[Bug c/63336] cilkplus array notation ICE in find_rank

2015-09-05 Thread tprince at computer dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63336

--- Comment #6 from tprince at computer dot org ---
Created attachment 36295
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36295=edit
pre-processed C source

pre-processed, without function calls


[Bug c/63336] cilkplus array notation ICE in find_rank

2015-09-05 Thread tprince at computer dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63336

--- Comment #5 from tprince at computer dot org ---
Created attachment 36294
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36294=edit
shortened c code

C source with external function calls removed


[Bug c/63336] cilkplus array notation ICE in find_rank

2015-09-03 Thread bviyer at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63336

Balaji V. Iyer  changed:

   What|Removed |Added

 CC||bviyer at gmail dot com

--- Comment #4 from Balaji V. Iyer  ---
Hi Tim,
Can you provide me a simple(r) test case for this?

Thanks,

Balaji V. Iyer.


[Bug c/63336] cilkplus array notation ICE in find_rank

2015-08-18 Thread barnabe.marc at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63336

--- Comment #3 from Marc barnabe.marc at gmail dot com ---
Created attachment 36197
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=36197action=edit
GCC 5.2 preprocessed ICE code

xz file, because .ii is  2 MB in size.


[Bug c/63336] cilkplus array notation ICE in find_rank

2015-08-18 Thread barnabe.marc at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63336

Marc barnabe.marc at gmail dot com changed:

   What|Removed |Added

 CC||barnabe.marc at gmail dot com

--- Comment #2 from Marc barnabe.marc at gmail dot com ---
Same thing in GCC 5.2


Using built-in specs.
COLLECT_GCC=./../../miscTools/gcc/bin/g++
COLLECT_LTO_WRAPPER=/media/lingsrv/exp//miscTools/gcc/libexec/gcc/x86_64-unknown-linux-gnu/5.2.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ./configure --prefix=/media/lingsrv/exp//miscTools/gcc
--with-gmp=/media/lingsrv/exp/mbarnabe/miscTools/gmp_install/
--with-mpc=/media/lingsrv/exp//miscTools/mpc_install/
--with-mpfr=/media/lingsrv/exp//miscTools/mpfr_install/
Thread model: posix
gcc version 5.2.0 (GCC)

 uname -a
Linux technolin01 3.2.0-4-amd64 #1 SMP Debian 3.2.57-3 x86_64 GNU/Linux


CFLAGS = -D WEIGHTTYPE=float -lm -D THREAD  -O2 -Wall -ffast-math -fcilkplus
-std=c++11


rnnlmlib.cpp:1115:1: internal compiler error: in find_rank, at
c-family/array-notation-common.c:244
 }
 ^
0x74d4bc find_rank(unsigned int, tree_node*, tree_node*, bool, unsigned long*)
../.././gcc/c-family/array-notation-common.c:244
0x74d118 find_rank(unsigned int, tree_node*, tree_node*, bool, unsigned long*)
../.././gcc/c-family/array-notation-common.c:317
0x74d118 find_rank(unsigned int, tree_node*, tree_node*, bool, unsigned long*)
../.././gcc/c-family/array-notation-common.c:317
0x74d118 find_rank(unsigned int, tree_node*, tree_node*, bool, unsigned long*)
../.././gcc/c-family/array-notation-common.c:317
0x74d118 find_rank(unsigned int, tree_node*, tree_node*, bool, unsigned long*)
../.././gcc/c-family/array-notation-common.c:317
0x6f37de cp_expand_cond_array_notations
../.././gcc/cp/cp-array-notation.c:852
0x6f541f expand_array_notation_exprs(tree_node*)
../.././gcc/cp/cp-array-notation.c:1292
0x6f52e8 expand_array_notation_exprs(tree_node*)
../.././gcc/cp/cp-array-notation.c:1212
0x6f5633 expand_array_notation_exprs(tree_node*)
../.././gcc/cp/cp-array-notation.c:1185
0x6f5633 expand_array_notation_exprs(tree_node*)
../.././gcc/cp/cp-array-notation.c:1185
0x6f071f cp_genericize(tree_node*)
../.././gcc/cp/cp-gimplify.c:1406
0x60d75a finish_function(int)
../.././gcc/cp/decl.c:14328
0x6800e5 cp_parser_function_definition_after_declarator
../.././gcc/cp/parser.c:23527
0x680fe0 cp_parser_function_definition_from_specifiers_and_declarator
../.././gcc/cp/parser.c:23433
0x680fe0 cp_parser_init_declarator
../.././gcc/cp/parser.c:17096
0x681dd3 cp_parser_simple_declaration
../.././gcc/cp/parser.c:11607
0x66a033 cp_parser_block_declaration
../.././gcc/cp/parser.c:11481
0x6641e9 cp_parser_declaration
../.././gcc/cp/parser.c:11378
0x68af3a cp_parser_declaration_seq_opt
../.././gcc/cp/parser.c:11264
0x68b24f cp_parser_translation_unit
../.././gcc/cp/parser.c:4100
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.


[Bug c/63336] cilkplus array notation ICE in find_rank

2014-12-17 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63336

Marek Polacek mpolacek at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-12-17
 CC||mpolacek at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Marek Polacek mpolacek at gcc dot gnu.org ---
Confirmed.