[Bug middle-end/57541] [Cilkplus]: internal compiler error: in gimplify_expr, at gimplify.c:7809

2013-06-10 Thread anna.m.tikhonova at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57541

--- Comment #9 from Anna  ---
Issue that is very alike to issue mentioned in Comment 7:

int A[10];

int main () {
  int a;
  a = __sec_reduce (1);
}

$ gcc -fcilkplus 1.c
1.c: In function 'main':
1.c:6:1: internal compiler error: tree check: accessed operand 6 of call_expr
with 4 operands in fix_builtin_array_notation_fn, at c/c-array-notation.c:145
 }
 ^
0xaf30d7 tree_operand_check_failed(int, tree_node const*, char const*, int,
char const*)
/home/anna/trunk/gcc/tree.c:9258
0x531b89 tree_operand_check(tree_node*, int, char const*, int, char const*)
/home/anna/trunk/gcc/tree.h:4125
0x54a9e7 fix_builtin_array_notation_fn
/home/anna/trunk/gcc/c/c-array-notation.c:145
0x5511ec build_array_notation_expr(unsigned int, tree_node*, tree_node*,
tree_code, unsigned int, tree_node*, tree_node*)
/home/anna/trunk/gcc/c/c-array-notation.c:731
0x555218 expand_array_notation_exprs(tree_node*)
/home/anna/trunk/gcc/c/c-array-notation.c:2311
0x554e50 expand_array_notation_exprs(tree_node*)
/home/anna/trunk/gcc/c/c-array-notation.c:2299
0x543d43 c_parser_compound_statement
/home/anna/trunk/gcc/c/c-parser.c:4098
0x544bfa c_parser_declaration_or_fndef
/home/anna/trunk/gcc/c/c-parser.c:1758
0x5499db c_parser_external_declaration
/home/anna/trunk/gcc/c/c-parser.c:1363
0x54a446 c_parser_translation_unit
/home/anna/trunk/gcc/c/c-parser.c:1251
0x54a446 c_parse_file()
/home/anna/trunk/gcc/c/c-parser.c:11000
0x59c024 c_common_parse_file()
/home/anna/trunk/gcc/c-family/c-opts.c:1046
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.


[Bug middle-end/57541] [Cilkplus]: internal compiler error: in gimplify_expr, at gimplify.c:7809

2013-06-10 Thread anna.m.tikhonova at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57541

--- Comment #8 from Anna  ---
Thing from Comment 1 is still reproducible with this case:
int A[10];

int main () {
  int a;
  a = __sec_reduce_add (1);
}

$ gcc -fcilkplus 1.c
1.c: In function 'main':
1.c:5:5: internal compiler error: in gimplify_var_or_parm_decl, at
gimplify.c:2042
   a = __sec_reduce_add (1);
 ^
0x78b57b gimplify_var_or_parm_decl
/home/anna/trunk/gcc/gimplify.c:2042
0x78d24b gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**,
bool (*)(tree_node*), int)
/home/anna/trunk/gcc/gimplify.c:7565
0x798883 gimplify_modify_expr
/home/anna/trunk/gcc/gimplify.c:4851
0x78d213 gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**,
bool (*)(tree_node*), int)
/home/anna/trunk/gcc/gimplify.c:7160
0x790836 gimplify_stmt(tree_node**, gimple_statement_d**)
/home/anna/trunk/gcc/gimplify.c:5692
0x78cafb gimplify_statement_list
/home/anna/trunk/gcc/gimplify.c:1521
0x78cafb gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**,
bool (*)(tree_node*), int)
/home/anna/trunk/gcc/gimplify.c:7549
0x790836 gimplify_stmt(tree_node**, gimple_statement_d**)
/home/anna/trunk/gcc/gimplify.c:5692
0x78cafb gimplify_statement_list
/home/anna/trunk/gcc/gimplify.c:1521
0x78cafb gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**,
bool (*)(tree_node*), int)
/home/anna/trunk/gcc/gimplify.c:7549
0x790836 gimplify_stmt(tree_node**, gimple_statement_d**)
/home/anna/trunk/gcc/gimplify.c:5692
0x78cafb gimplify_statement_list
/home/anna/trunk/gcc/gimplify.c:1521
0x78cafb gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**,
bool (*)(tree_node*), int)
/home/anna/trunk/gcc/gimplify.c:7549
0x790836 gimplify_stmt(tree_node**, gimple_statement_d**)
/home/anna/trunk/gcc/gimplify.c:5692
0x791ec1 gimplify_body(tree_node*, bool)
/home/anna/trunk/gcc/gimplify.c:8193
0x792376 gimplify_function_tree(tree_node*)
/home/anna/trunk/gcc/gimplify.c:8325
0x62951f analyze_function
/home/anna/trunk/gcc/cgraphunit.c:629
0x62c514 analyze_functions
/home/anna/trunk/gcc/cgraphunit.c:913
0x62d9c5 finalize_compilation_unit()
/home/anna/trunk/gcc/cgraphunit.c:2097
0x50a333 c_write_global_declarations()
/home/anna/trunk/gcc/c/c-decl.c:10118
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.


[Bug middle-end/57541] [Cilkplus]: internal compiler error: in gimplify_expr, at gimplify.c:7809

2013-06-10 Thread anna.m.tikhonova at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57541

--- Comment #7 from Anna  ---
(In reply to Anna from comment #6)
> Created attachment 30285 [details]
> Another test case reproducing the original thing

And another issue in slightly changed test case from this attachment:
int A[10];

int main () {
  int a;
  a = __sec_reduce_add ();
}

$ gcc -fcilkplus 1.c
1.c: In function 'main':
1.c:6:1: internal compiler error: tree check: accessed operand 4 of call_expr
with 3 operands in fix_builtin_array_notation_fn, at c/c-array-notation.c:158
 }
 ^
0xaf30d7 tree_operand_check_failed(int, tree_node const*, char const*, int,
char const*)
/home/anna/trunk/gcc/tree.c:9258
0x54a7e6 tree_operand_check
/home/anna/trunk/gcc/tree.h:4125
0x54a7e6 fix_builtin_array_notation_fn
/home/anna/trunk/gcc/c/c-array-notation.c:158
0x5511ec build_array_notation_expr(unsigned int, tree_node*, tree_node*,
tree_code, unsigned int, tree_node*, tree_node*)
/home/anna/trunk/gcc/c/c-array-notation.c:731
0x555218 expand_array_notation_exprs(tree_node*)
/home/anna/trunk/gcc/c/c-array-notation.c:2311
0x554e50 expand_array_notation_exprs(tree_node*)
/home/anna/trunk/gcc/c/c-array-notation.c:2299
0x543d43 c_parser_compound_statement
/home/anna/trunk/gcc/c/c-parser.c:4098
0x544bfa c_parser_declaration_or_fndef
/home/anna/trunk/gcc/c/c-parser.c:1758
0x5499db c_parser_external_declaration
/home/anna/trunk/gcc/c/c-parser.c:1363
0x54a446 c_parser_translation_unit
/home/anna/trunk/gcc/c/c-parser.c:1251
0x54a446 c_parse_file()
/home/anna/trunk/gcc/c/c-parser.c:11000
0x59c024 c_common_parse_file()
/home/anna/trunk/gcc/c-family/c-opts.c:1046
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

Compiler used to get Comment-5, Comment-6 and this issue is:
Target: x86_64-unknown-linux-gnu
Configured with: /home/anna/trunk/configure --with-arch=corei7
--with-cpu=corei7 --enable-clocale=gnu --with-system-zlib --enable-shared
--with-demangler-in-ld --enable-cloog-backend=isl --with-fpmath=sse
--enable-languages=c,c++,fortran,java,lto
Thread model: posix
gcc version 4.9.0 20130608 (experimental) (GCC)


[Bug middle-end/57541] [Cilkplus]: internal compiler error: in gimplify_expr, at gimplify.c:7809

2013-06-10 Thread anna.m.tikhonova at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57541

--- Comment #6 from Anna  ---
Created attachment 30285
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30285&action=edit
Another test case reproducing the original thing


[Bug middle-end/57541] [Cilkplus]: internal compiler error: in gimplify_expr, at gimplify.c:7809

2013-06-10 Thread anna.m.tikhonova at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57541

--- Comment #5 from Anna  ---
(In reply to Balaji V. Iyer from comment #4)
> Hello,
> This issue should be fixed in trunk revision 199837. Please let me know
> otherwise.
> 
> Thanks,
> 
> Balaji V. Iyer.

Hi Balaji,
I still can reproduce segfault mentioned in Comment 2.


[Bug middle-end/57577] internal compiler error: tree check: expected class 'expression', have 'constant' (integer_cst) in tree_operand_check, at tree.h:4123

2013-06-10 Thread anna.m.tikhonova at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57577

--- Comment #1 from Anna  ---
Also, when I change "A[:] = foo (B[:][:]);" to "A[0] = foo (B[:][:]);"
compilation hangs.


[Bug middle-end/57577] New: internal compiler error: tree check: expected class 'expression', have 'constant' (integer_cst) in tree_operand_check, at tree.h:4123

2013-06-10 Thread anna.m.tikhonova at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57577

Bug ID: 57577
   Summary: internal compiler error: tree check: expected class
'expression', have 'constant' (integer_cst) in
tree_operand_check, at tree.h:4123
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: anna.m.tikhonova at gmail dot com

Created attachment 30284
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30284&action=edit
Reproducer

Hi,
attached test case fails with ICE:

$ gcc -fcilkplus 1.c
1.c: In function 'main':
1.c:7:1: internal compiler error: tree check: expected class 'expression', have
'constant' (integer_cst) in tree_operand_check, at tree.h:4123
 }
 ^
0xae7d99 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
/home/anna/trunk/gcc/tree.c:9110
0x4c3cef expr_check
/home/anna/trunk/gcc/tree.h:3859
0x4c3cef tree_operand_check
/home/anna/trunk/gcc/tree.h:4123
0x531755 tree_operand_check(tree_node*, int, char const*, int, char const*)
/home/anna/trunk/gcc/tree.h:4111
0x55255d build_array_notation_expr(unsigned int, tree_node*, tree_node*,
tree_code, unsigned int, tree_node*, tree_node*)
/home/anna/trunk/gcc/c/c-array-notation.c:1264
0x555cf8 expand_array_notation_exprs(tree_node*)
/home/anna/trunk/gcc/c/c-array-notation.c:2777
0x555b90 expand_array_notation_exprs(tree_node*)
/home/anna/trunk/gcc/c/c-array-notation.c:2765
0x5438f3 c_parser_compound_statement
/home/anna/trunk/gcc/c/c-parser.c:4098
0x5447aa c_parser_declaration_or_fndef
/home/anna/trunk/gcc/c/c-parser.c:1758
0x54958b c_parser_external_declaration
/home/anna/trunk/gcc/c/c-parser.c:1363
0x549ff6 c_parser_translation_unit
/home/anna/trunk/gcc/c/c-parser.c:1251
0x549ff6 c_parse_file()
/home/anna/trunk/gcc/c/c-parser.c:11000
0x59c954 c_common_parse_file()
/home/anna/trunk/gcc/c-family/c-opts.c:1046
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.

Compiler used is:
Target: x86_64-unknown-linux-gnu
Configured with: /home/anna/trunk/configure --with-arch=corei7
--with-cpu=corei7 --enable-clocale=gnu --with-system-zlib --enable-shared
--with-demangler-in-ld --enable-cloog-backend=isl --with-fpmath=sse
--enable-languages=c,c++,fortran,java,lto
Thread model: posix
gcc version 4.9.0 20130608 (experimental) (GCC)


[Bug middle-end/57541] [Cilkplus]: internal compiler error: in gimplify_expr, at gimplify.c:7809

2013-06-06 Thread anna.m.tikhonova at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57541

--- Comment #2 from Anna  ---
Comment out line "long l = (long)N;" and here's another ICE.

$ gcc -fcilkplus 1.c
1.c: In function 'main':
1.c:4:18: error: 'N' undeclared (first use in this function)
   char c = (char)N;
  ^
1.c:4:18: note: each undeclared identifier is reported only once for each
function it appears in
1.c:7:5: error: 'l' undeclared (first use in this function)
   A[l:s:c];
 ^
1.c:7:6: error: expected array notation expression before ':' token
   A[l:s:c];
  ^
1.c:7:6: internal compiler error: Segmentation fault
0x8fee9f crash_signal
/home/anna/trunk/gcc/toplev.c:333
0x54b5aa contains_struct_check
/home/anna/trunk/gcc/tree.h:3803
0x54b5aa build_array_notation_ref(unsigned int, tree_node*, tree_node*,
tree_node*, tree_node*, tree_node*)
/home/anna/trunk/gcc/c/c-array-notation.c:2809
0x53c5ce c_parser_array_notation
/home/anna/trunk/gcc/c/c-parser.c:11165
0x53dad6 c_parser_postfix_expression_after_primary
/home/anna/trunk/gcc/c/c-parser.c:6978
0x534e70 c_parser_postfix_expression
/home/anna/trunk/gcc/c/c-parser.c:6850
0x53681a c_parser_unary_expression
/home/anna/trunk/gcc/c/c-parser.c:6042
0x53ac86 c_parser_cast_expression
/home/anna/trunk/gcc/c/c-parser.c:5880
0x53aeae c_parser_binary_expression
/home/anna/trunk/gcc/c/c-parser.c:5691
0x53b7c7 c_parser_conditional_expression
/home/anna/trunk/gcc/c/c-parser.c:5486
0x53bdd0 c_parser_expr_no_commas
/home/anna/trunk/gcc/c/c-parser.c:5405
0x53c2dd c_parser_expression
/home/anna/trunk/gcc/c/c-parser.c:7139
0x53cd44 c_parser_expression_conv
/home/anna/trunk/gcc/c/c-parser.c:7170
0x545b46 c_parser_statement_after_labels
/home/anna/trunk/gcc/c/c-parser.c:4599
0x543067 c_parser_compound_statement_nostart
/home/anna/trunk/gcc/c/c-parser.c:4261
0x54387b c_parser_compound_statement
/home/anna/trunk/gcc/c/c-parser.c:4094
0x5447aa c_parser_declaration_or_fndef
/home/anna/trunk/gcc/c/c-parser.c:1758
0x54958b c_parser_external_declaration
/home/anna/trunk/gcc/c/c-parser.c:1363
0x549ff6 c_parser_translation_unit
/home/anna/trunk/gcc/c/c-parser.c:1251
0x549ff6 c_parse_file()
/home/anna/trunk/gcc/c/c-parser.c:11000
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

Compiler used is:
Target: x86_64-unknown-linux-gnu
Configured with: /home/anna/trunk/configure --with-arch=corei7
--with-cpu=corei7 --enable-clocale=gnu --with-system-zlib --enable-shared
--with-demangler-in-ld --enable-cloog-backend=isl --with-fpmath=sse
--enable-languages=c,c++,fortran,java,lto
Thread model: posix
gcc version 4.9.0 20130605 (experimental) (GCC)


[Bug middle-end/57541] [Cilkplus]: internal compiler error: in gimplify_expr, at gimplify.c:7809

2013-06-06 Thread anna.m.tikhonova at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57541

--- Comment #1 from Anna  ---
Same test, another ICE.

$ gcc -fcilkplus 1.c -DN=10
1.c: In function 'main':
1.c:4:8: internal compiler error: in gimplify_var_or_parm_decl, at
gimplify.c:2042
   char c = (char)N;
^
0x78a33b gimplify_var_or_parm_decl
/home/anna/trunk/gcc/gimplify.c:2042
0x78c00b gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**,
bool (*)(tree_node*), int)
/home/anna/trunk/gcc/gimplify.c:7565
0x797643 gimplify_modify_expr
/home/anna/trunk/gcc/gimplify.c:4851
0x78bfd3 gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**,
bool (*)(tree_node*), int)
/home/anna/trunk/gcc/gimplify.c:7160
0x78f5f6 gimplify_stmt(tree_node**, gimple_statement_d**)
/home/anna/trunk/gcc/gimplify.c:5692
0x78d5cd gimplify_and_add
/home/anna/trunk/gcc/gimplify.c:327
0x78d5cd gimplify_decl_expr
/home/anna/trunk/gcc/gimplify.c:1468
0x78d5cd gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**,
bool (*)(tree_node*), int)
/home/anna/trunk/gcc/gimplify.c:7327
0x78f5f6 gimplify_stmt(tree_node**, gimple_statement_d**)
/home/anna/trunk/gcc/gimplify.c:5692
0x78b8bb gimplify_statement_list
/home/anna/trunk/gcc/gimplify.c:1521
0x78b8bb gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**,
bool (*)(tree_node*), int)
/home/anna/trunk/gcc/gimplify.c:7549
0x78f5f6 gimplify_stmt(tree_node**, gimple_statement_d**)
/home/anna/trunk/gcc/gimplify.c:5692
0x790c81 gimplify_body(tree_node*, bool)
/home/anna/trunk/gcc/gimplify.c:8193
0x791136 gimplify_function_tree(tree_node*)
/home/anna/trunk/gcc/gimplify.c:8325
0x6282ef analyze_function
/home/anna/trunk/gcc/cgraphunit.c:629
0x62b2e4 analyze_functions
/home/anna/trunk/gcc/cgraphunit.c:913
0x62c795 finalize_compilation_unit()
/home/anna/trunk/gcc/cgraphunit.c:2097
0x509ee3 c_write_global_declarations()
/home/anna/trunk/gcc/c/c-decl.c:10118
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.


[Bug middle-end/57541] New: [Cilkplus]: internal compiler error: in gimplify_expr, at gimplify.c:7809

2013-06-06 Thread anna.m.tikhonova at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57541

Bug ID: 57541
   Summary: [Cilkplus]: internal compiler error: in gimplify_expr,
at gimplify.c:7809
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: anna.m.tikhonova at gmail dot com

Created attachment 30266
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30266&action=edit
Reproducer

Hi,
Attached test case fails with ICE:

$ gcc -fcilkplus 1.c
1.c: In function 'main':
1.c:4:18: error: 'N' undeclared (first use in this function)
   char c = (char)N;
  ^
1.c:4:18: note: each undeclared identifier is reported only once for each
function it appears in
1.c:7:3: internal compiler error: in gimplify_expr, at gimplify.c:7809
   A[l:s:c];
   ^
0x78dacf gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**,
bool (*)(tree_node*), int)
/home/anna/trunk/gcc/gimplify.c:7809
0x78f5f6 gimplify_stmt(tree_node**, gimple_statement_d**)
/home/anna/trunk/gcc/gimplify.c:5692
0x78b8bb gimplify_statement_list
/home/anna/trunk/gcc/gimplify.c:1521
0x78b8bb gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**,
bool (*)(tree_node*), int)
/home/anna/trunk/gcc/gimplify.c:7549
0x78f5f6 gimplify_stmt(tree_node**, gimple_statement_d**)
/home/anna/trunk/gcc/gimplify.c:5692
0x790c81 gimplify_body(tree_node*, bool)
/home/anna/trunk/gcc/gimplify.c:8193
0x791136 gimplify_function_tree(tree_node*)
/home/anna/trunk/gcc/gimplify.c:8325
0x6282ef analyze_function
/home/anna/trunk/gcc/cgraphunit.c:629
0x62b2e4 analyze_functions
/home/anna/trunk/gcc/cgraphunit.c:913
0x62c795 finalize_compilation_unit()
/home/anna/trunk/gcc/cgraphunit.c:2097
0x509ee3 c_write_global_declarations()
/home/anna/trunk/gcc/c/c-decl.c:10118
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 testsuite/53981] New: gcc.dg/20020201-1.c fails with Android NDK

2012-07-16 Thread anna.m.tikhonova at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53981

 Bug #: 53981
   Summary: gcc.dg/20020201-1.c fails with Android NDK
Classification: Unclassified
   Product: gcc
   Version: 4.8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: testsuite
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: anna.m.tikhon...@gmail.com


Created attachment 27803
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27803
Proposed fix

Hi,

when I compile gcc.dg/20020201-1.c with android ndk gcc (4.4 or 4.6) I get the
following error:
/tmp/ccK41Qjx.o: In function `doit':
20020201-1.c:(.text+0x43): undefined reference to `srand'
20020201-1.c:(.text+0x48): undefined reference to `rand'
20020201-1.c:(.text+0x55): undefined reference to `rand'
collect2: ld returned 1 exit status

In srand man it is stated that you need to include stdlib.h for (s)rand.
Adding #include  fixes the issue.

Thanks,
Anna