[Bug c/79788] New: ICE in expand_expr_real_2, at expr.c:9557
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79788 Bug ID: 79788 Summary: ICE in expand_expr_real_2, at expr.c:9557 Product: gcc Version: 7.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- With testfile ./gcc.dg/pr38934.c : $ gcc-7-20170226 -m32 -mmpx -fcheck-pointer-bounds -ftrapv -c pr38934.c pr38934.c: In function 'f': pr38934.c:14:13: warning: integer constant is so large that it is unsigned if (p >= -9223372036854775808LL - (signed char) g) ^ pr38934.c: In function 'f.chkp': pr38934.c:14:35: internal compiler error: in expand_expr_real_2, at expr.c:9557 if (p >= -9223372036854775808LL - (signed char) g) ~~~^ 0x8dccd2 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode, expand_modifier) ../../gcc/expr.c:9557 0x7b71e2 expand_gimple_stmt_1 ../../gcc/cfgexpand.c:3676 0x7b71e2 expand_gimple_stmt ../../gcc/cfgexpand.c:3737 0x7b998e expand_gimple_basic_block ../../gcc/cfgexpand.c:5744 0x7bfa56 execute ../../gcc/cfgexpand.c:6357
[Bug c/79787] New: ICE in remove_unreachable_nodes, at ipa.c:469
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79787 Bug ID: 79787 Summary: ICE in remove_unreachable_nodes, at ipa.c:469 Product: gcc Version: 7.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- With testfiles ./gcc.target/i386/bmi-1.c and ./gcc.target/i386/bmi-2.c at -Os|1|2|3 : $ gcc-7-20170226 -O2 -mmpx -fcheck-pointer-bounds -c bmi-1.c In file included from .../lib64/gcc/x86_64-pc-linux-gnu/7.0.1/include/immintrin.h:81:0, from .../lib64/gcc/x86_64-pc-linux-gnu/7.0.1/include/x86intrin.h:48, from bmi-1.c:10: bmi-1.c: In function 'func_tzcnt32_2.chkp': .../lib64/gcc/x86_64-pc-linux-gnu/7.0.1/include/bmiintrin.h:104:1: error: inlining failed in call to always_inline '_tzcnt_u32.chkp': target specific option mismatch _tzcnt_u32 (unsigned int __X) ^~ bmi-1.c:77:10: note: called from here return _tzcnt_u32(X); ^ bmi-1.c: At top level: bmi-1.c:78:1: internal compiler error: in remove_unreachable_nodes, at ipa.c:469 } ^ 0xa29c05 symbol_table::remove_unreachable_nodes(_IO_FILE*) ../../gcc/ipa.c:469 0xb1aaf8 execute_todo ../../gcc/passes.c:2030
[Bug c++/79786] New: ICE tree check: expected class 'type', have 'declaration' (var_decl) in iamcu_alignment, at config/i386/i386.c:30263
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79786 Bug ID: 79786 Summary: ICE tree check: expected class 'type', have 'declaration' (var_decl) in iamcu_alignment, at config/i386/i386.c:30263 Product: gcc Version: 7.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- Over 400 testfiles from ./gcc/testsuite/g++.dg/* expose a symptom with options "-m32 -miamcu" and version 6/7 (-miamcu not implemented before) : ./g++.dg/rtti/anon-ns1.C ./g++.dg/opt/inline1.C ./g++.dg/abi/inline1.C ./g++.dg/abi/rtti3.C ./g++.dg/eh/throw3.C ./g++.dg/abi/vtt1.C ./g++.dg/opt/vt1.C ... $ cat vt1.C # for example struct S { virtual void vm (void) {}; } x; $ gcc-7-20170226 -m32 -miamcu -c vt1.C vt1.C:4:4: internal compiler error: tree check: expected class 'type', have 'declaration' (var_decl) in iamcu_alignment, at config/i386/i386.c:30263 } x; ^ 0x1090287 tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*) ../../gcc/tree.c:9866 0x538 tree_class_check(tree_node*, tree_code_class, char const*, int, char const*) ../../gcc/tree.h:3187 0x538 iamcu_alignment ../../gcc/config/i386/i386.c:30263 0x115203b ix86_data_alignment(tree_node*, int, bool) ../../gcc/config/i386/i386.c:30317 0x7d2cff emit_tinfo_decl(tree_node*) ../../gcc/cp/rtti.c:1616 0x777894 c_parse_final_cleanups() ../../gcc/cp/decl2.c:4568
[Bug c++/79785] New: ICE in gimplify_expr, at gimplify.c:11950
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79785 Bug ID: 79785 Summary: ICE in gimplify_expr, at gimplify.c:11950 Product: gcc Version: 7.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- With testfile ./g++.dg/ext/int128-3.C down to version 4.9 : $ gcc-7-20170226 -c int128-3.C $ gcc-7-20170226 -m32 -c int128-3.C int128-3.C:7:3: error: overflow in enumeration values at 'e2' e2, e3 ^~ int128-3.C:12:27: error: expected primary-expression before '__int128' SA(1, sizeof(E) == sizeof(__int128)); ^ int128-3.C:10:27: note: in definition of macro 'SA' #define SA(I,X) int a##I[(X)? 1 : -1] ^ int128-3.C:12:27: error: expected ')' before '__int128' SA(1, sizeof(E) == sizeof(__int128)); ^ int128-3.C:10:27: note: in definition of macro 'SA' #define SA(I,X) int a##I[(X)? 1 : -1] ^ int128-3.C:12:37: error: expected ')' before ';' token SA(1, sizeof(E) == sizeof(__int128)); ^ int128-3.C:12:37: error: expected ']' before ';' token int128-3.C: In function 'void __static_initialization_and_destruction_0(int, int)': int128-3.C:8:3: internal compiler error: in gimplify_expr, at gimplify.c:11950 } e = e3; ^ 0xb7b2fa gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc/gimplify.c:11950 0xb8723f gimplify_modify_expr ../../gcc/gimplify.c:5457 0xb79a7d gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc/gimplify.c:11192 0xb7d226 gimplify_stmt(tree_node**, gimple**) ../../gcc/gimplify.c:6478 0xb79d21 gimplify_cleanup_point_expr ../../gcc/gimplify.c:6230 0xb79d21 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc/gimplify.c:11567 0xb7d226 gimplify_stmt(tree_node**, gimple**) ../../gcc/gimplify.c:6478 0xb785e3 gimplify_statement_list ../../gcc/gimplify.c:1716 0xb785e3 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc/gimplify.c:11619 0xb7d226 gimplify_stmt(tree_node**, gimple**) ../../gcc/gimplify.c:6478 0xb83249 gimplify_cond_expr ../../gcc/gimplify.c:3971 0xb79ab4 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc/gimplify.c:11148 0xb7d226 gimplify_stmt(tree_node**, gimple**) ../../gcc/gimplify.c:6478 0xb83249 gimplify_cond_expr ../../gcc/gimplify.c:3971 0xb79ab4 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc/gimplify.c:11148 0xb7d226 gimplify_stmt(tree_node**, gimple**) ../../gcc/gimplify.c:6478 0xb808e9 gimplify_body(tree_node*, bool) ../../gcc/gimplify.c:12388 0xb80f84 gimplify_function_tree(tree_node*) ../../gcc/gimplify.c:12546 0x9e6fe7 cgraph_node::analyze() ../../gcc/cgraphunit.c:657 0x9ea753 analyze_functions ../../gcc/cgraphunit.c:1118
[Bug c/79758] New: ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in store_parm_decls_oldstyle, at c/c-decl.c:8973
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79758 Bug ID: 79758 Summary: ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in store_parm_decls_oldstyle, at c/c-decl.c:8973 Product: gcc Version: 7.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- With invalid code on x86_64 GNU/Linux down to at least 4.8 (configured with --enable-checking=yes) : $ cat z1.c void fn1 (int[a]) { }; void fn1 (b) { }; $ gcc-7-20170226 -c z1.c z1.c:1:15: error: 'a' undeclared here (not in a function) void fn1 (int[a]) { }; ^ z1.c: In function 'fn1': z1.c:1:14: error: parameter name omitted void fn1 (int[a]) { }; ^ z1.c: At top level: z1.c:2:6: error: redefinition of 'fn1' void fn1 (b) { }; ^~~ z1.c:1:6: note: previous definition of 'fn1' was here void fn1 (int[a]) { }; ^~~ z1.c: In function 'fn1': z1.c:2:6: warning: type of 'b' defaults to 'int' [-Wimplicit-int] void fn1 (b) { }; ^~~ z1.c:2:1: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in store_parm_decls_oldstyle, at c/c-decl.c:8973 void fn1 (b) { }; ^~~~ 0xea3607 tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*) ../../gcc/tree.c:9866 0x672ead tree_class_check(tree_node*, tree_code_class, char const*, int, char const*) ../../gcc/tree.h:3187 0x672ead store_parm_decls_oldstyle ../../gcc/c/c-decl.c:8973 0x672ead store_parm_decls() ../../gcc/c/c-decl.c:9147 0x6d05af c_parser_declaration_or_fndef ../../gcc/c/c-parser.c:2074 0x6d87fb c_parser_external_declaration ../../gcc/c/c-parser.c:1468 0x6d9259 c_parser_translation_unit ../../gcc/c/c-parser.c:1348 0x6d9259 c_parse_file() ../../gcc/c/c-parser.c:18173 0x737b02 c_common_parse_file() ../../gcc/c-family/c-opts.c:1107
[Bug c/79757] New: ICE in declare_vars, at gimplify.c:634
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79757 Bug ID: 79757 Summary: ICE in declare_vars, at gimplify.c:634 Product: gcc Version: 7.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- With invalid code on x86_64 GNU/Linux and option -fsanitize=undefined or -fsanitize=integer-divide-by-zero, down to version 4.9 (configured with --enable-checking=yes) : $ cat z1.c void fn1 () { unsigned __int128 x, y; int a() //; unsigned long long z = x % y; } $ gcc-7-20170226 -fsanitize=undefined -c z1.c z1.c: In function 'a': z1.c:5:3: error: parameter 'z' is initialized unsigned long long z = x % y; ^~~~ z1.c:5:3: internal compiler error: Segmentation fault 0xbf9f9f crash_signal ../../gcc/toplev.c:337 0x96d463 gbind* as_a<gbind*, gimple>(gimple*) ../../gcc/is-a.h:192 0x96d463 declare_vars(tree_node*, gimple*, bool) ../../gcc/gimplify.c:634 0x94999a create_tmp_var(tree_node*, char const*) ../../gcc/gimple-expr.c:477 0xc1bce1 ubsan_encode_value(tree_node*, bool) ../../gcc/ubsan.c:146 0x757fa5 ubsan_instrument_division(unsigned int, tree_node*, tree_node*) ../../gcc/c-family/c-ubsan.c:100 0x69aeab build_binary_op(unsigned int, tree_code, tree_node*, tree_node*, int) ../../gcc/c/c-typeck.c:11834 0x69e7a6 parser_build_binary_op(unsigned int, tree_code, c_expr, c_expr) ../../gcc/c/c-typeck.c:3637 0x6bbd8a c_parser_binary_expression ../../gcc/c/c-parser.c:6818 0x6bc225 c_parser_conditional_expression ../../gcc/c/c-parser.c:6458 0x6bc980 c_parser_expr_no_commas ../../gcc/c/c-parser.c:6375 0x6c371a c_parser_initializer ../../gcc/c/c-parser.c:4351 0x6cfe5d c_parser_declaration_or_fndef ../../gcc/c/c-parser.c:1919 0x6d06ee c_parser_declaration_or_fndef ../../gcc/c/c-parser.c:2073 0x6d4dc2 c_parser_compound_statement_nostart ../../gcc/c/c-parser.c:4831 0x6d53ee c_parser_compound_statement ../../gcc/c/c-parser.c:4740 0x6d082c c_parser_declaration_or_fndef ../../gcc/c/c-parser.c:2112 0x6d87fb c_parser_external_declaration ../../gcc/c/c-parser.c:1468 0x6d9259 c_parser_translation_unit ../../gcc/c/c-parser.c:1348 0x6d9259 c_parse_file() ../../gcc/c/c-parser.c:18173
[Bug c/79756] New: ICE in execute_todo, at passes.c:2011
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79756 Bug ID: 79756 Summary: ICE in execute_todo, at passes.c:2011 Product: gcc Version: 7.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- Affects versions down to 4.9 (configured with --enable-checking=yes) : $ cat z1.c typedef int V __attribute__ ((vector_size(4))); void fn1 () { (V){(1,0)}[0] = 0; } $ gcc-7-20170226 -c z1.c z1.c: In function 'fn1': z1.c:5:1: internal compiler error: in execute_todo, at passes.c:2011 } ^ 0xb1abb3 execute_todo ../../gcc/passes.c:2011 $ gcc-6-official -c z1.c $ gcc-6-20170202 -c z1.c z1.c: In function 'fn1': z1.c:5:1: internal compiler error: in verify_ssa, at tree-ssa.c:916 } ^ 0xd48b59 verify_ssa(bool, bool) ../../gcc/tree-ssa.c:916 0xa8312d execute_function_todo ../../gcc/passes.c:1965 0xa8385d do_per_function ../../gcc/passes.c:1652 0xa839ab execute_todo ../../gcc/passes.c:2010
[Bug c/79755] New: ICE: segfault in cgraph_node::get, at cgraph.h:1261
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79755 Bug ID: 79755 Summary: ICE: segfault in cgraph_node::get, at cgraph.h:1261 Product: gcc Version: 7.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- Affects versions down to 4.9 (configured with --enable-checking=yes) : $ cat z1.c void foo () {} #pragma weak foo = _foo int _foo = 0; $ gcc-7-20170226 -c z1.c z1.c:1:6: error: 'foo' defined both normally and as 'alias' attribute void foo () {} ^~~ z1.c:1:6: error: 'foo' alias in between function and variable is not supported z1.c:3:5: warning: '_foo' aliased declaration int _foo = 0; ^~~~ z1.c:1:6: internal compiler error: Segmentation fault void foo () {} ^~~ 0xbf9f9f crash_signal ../../gcc/toplev.c:337 0x7f25e2 cgraph_node::get(tree_node const*) ../../gcc/cgraph.h:1261 0x7f25e2 cgraph_node::analyze() ../../gcc/cgraphunit.c:630 0x7f5d93 analyze_functions ../../gcc/cgraphunit.c:1118 0x7f68da symbol_table::finalize_compilation_unit() ../../gcc/cgraphunit.c:2599
[Bug c/79754] New: ICE in type_natural_mode, at config/i386/i386.c:8760
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79754 Bug ID: 79754 Summary: ICE in type_natural_mode, at config/i386/i386.c:8760 Product: gcc Version: 7.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- With invalid code on x86_64 GNU/Linux, down to at least 4.8 : $ cat z1.c _Decimal32 typedef int V __attribute__ ((vector_size(16))); int fn1 (V a) { } $ gcc-7-20170226 -c z1.c z1.c:2:9: error: two or more data types in declaration specifiers typedef int V __attribute__ ((vector_size(16))); ^~~ z1.c: In function 'fn1': z1.c:3:5: internal compiler error: in type_natural_mode, at config/i386/i386.c:8760 int fn1 (V a) { } ^~~ 0xf194da type_natural_mode ../../gcc/config/i386/i386.c:8760 0xf3af61 ix86_function_arg_advance ../../gcc/config/i386/i386.c:9729 0x92852b gimplify_parameters() ../../gcc/function.c:4010 0x98a707 gimplify_body(tree_node*, bool) ../../gcc/gimplify.c:12384 0x98aac4 gimplify_function_tree(tree_node*) ../../gcc/gimplify.c:12546 0x7f2627 cgraph_node::analyze() ../../gcc/cgraphunit.c:657 0x7f5d93 analyze_functions ../../gcc/cgraphunit.c:1118 0x7f68da symbol_table::finalize_compilation_unit() ../../gcc/cgraphunit.c:2599
[Bug c/79753] New: ICE in ix86_expand_builtin, at config/i386/i386.c:36869
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79753 Bug ID: 79753 Summary: ICE in ix86_expand_builtin, at config/i386/i386.c:36869 Product: gcc Version: 7.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- Affects version 7 on x86_64 GNU/Linux at -Os|1|2|3, testfile ./gcc.dg/pr41340.c : $ gcc-7-20170226 -O0 -mmpx -fcheck-pointer-bounds -c pr41340.c $ gcc-7-20170226 -O2 -mmpx -fcheck-pointer-bounds -c pr41340.c pr41340.c: In function 'fn5.chkp': pr41340.c:46:1: internal compiler error: in ix86_expand_builtin, at config/i386/i386.c:36869 fn5 (struct S3 x, T *y) ^~~ 0xf72254 ix86_expand_builtin ../../gcc/config/i386/i386.c:36869 0x793606 expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode, int) ../../gcc/builtins.c:6362 0x8c5a14 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) ../../gcc/expr.c:10810 0x8d1be6 store_expr_with_bounds(tree_node*, rtx_def*, int, bool, bool, tree_node*) ../../gcc/expr.c:5552 0x8d37d0 expand_assignment(tree_node*, tree_node*, bool) ../../gcc/expr.c:5321 0x7b7cfa expand_call_stmt ../../gcc/cfgexpand.c:2656 0x7b7cfa expand_gimple_stmt_1 ../../gcc/cfgexpand.c:3571 0x7b7cfa expand_gimple_stmt ../../gcc/cfgexpand.c:3737 0x7b998e expand_gimple_basic_block ../../gcc/cfgexpand.c:5744 0x7bfa56 execute ../../gcc/cfgexpand.c:6357
[Bug c/79733] ICE in int_mode_for_mode, at stor-layout.c:406
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79733 --- Comment #4 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- Nothing fancy at all, no arch-specific flags. $ gcc-7-20170226 -v Using built-in specs. COLLECT_GCC=.../bin/gcc COLLECT_LTO_WRAPPER=.../lib/gcc/x86_64-pc-linux-gnu/7.0.1/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../configure --enable-languages=c,c++,fortran,lto --enable-checking=yes --disable-bootstrap --disable-multilib Thread model: posix gcc version 7.0.1 20170226 (experimental) (GCC) How about this reduction ? $ cat z1.c typedef unsigned short __mmask16; extern __inline int __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) _mm512_kortestc (__mmask16 __A, __mmask16 __B) { return (__mmask16) __builtin_ia32_kortestchi ((__mmask16) __A, (__mmask16) __B); } void avx512f_test () { volatile __mmask16 k1 = 0; __mmask16 k2 = 0; volatile short r; r = _mm512_kortestc (k1, k2); } $ gcc-7-20170226 -O0 -mavx512f -c z1.c $ gcc-7-20170226 -O2 -mavx512f -c z1.c z1.c: In function 'avx512f_test': z1.c:7:10: internal compiler error: in int_mode_for_mode, at stor-layout.c:406 return (__mmask16) __builtin_ia32_kortestchi ((__mmask16) __A, ^~~ (__mmask16) __B); 0xbe8a9f int_mode_for_mode(machine_mode) ../../gcc/stor-layout.c:406 0x8bccae emit_move_via_integer ../../gcc/expr.c:3289 0x8c9a7a emit_move_insn_1(rtx_def*, rtx_def*) ../../gcc/expr.c:3670 0x8c9dd4 emit_move_insn(rtx_def*, rtx_def*) ../../gcc/expr.c:3738 0x8ad0f2 copy_to_reg(rtx_def*) ../../gcc/explow.c:585 0xf6d4d1 ix86_expand_builtin ../../gcc/config/i386/i386.c:37800 0x793606 expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode, int) ../../gcc/builtins.c:6362 0x8c5a14 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) ../../gcc/expr.c:10810 0x8d1be6 store_expr_with_bounds(tree_node*, rtx_def*, int, bool, bool, tree_node*) ../../gcc/expr.c:5552 0x8d37d0 expand_assignment(tree_node*, tree_node*, bool) ../../gcc/expr.c:5321 0x7b7cfa expand_call_stmt ../../gcc/cfgexpand.c:2656 0x7b7cfa expand_gimple_stmt_1 ../../gcc/cfgexpand.c:3571 0x7b7cfa expand_gimple_stmt ../../gcc/cfgexpand.c:3737 0x7b998e expand_gimple_basic_block ../../gcc/cfgexpand.c:5744 0x7bfa56 execute ../../gcc/cfgexpand.c:6357 --- BTW, these variants (w/o "volatile") compile : // ... void avx512f_test () { volatile __mmask16 k1 = 0; volatile __mmask16 k2 = 0; volatile short r; r = _mm512_kortestc (k1, k2); } // ... void avx512f_test () { volatile __mmask16 k1 = 0; __mmask16 k2 = 0; short r; r = _mm512_kortestc (k1, k2); }
[Bug target/79559] [5/6 Regression] ICE in ix86_print_operand, at config/i386/i386.c:18189
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79559 --- Comment #7 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- Using version gcc-7-20170226, above cases compile on my environment, too. But pr79729 does not (yes, appending to this pr would have been better).
[Bug c/79733] New: ICE in int_mode_for_mode, at stor-layout.c:406
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79733 Bug ID: 79733 Summary: ICE in int_mode_for_mode, at stor-layout.c:406 Product: gcc Version: 7.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- With testfile ./gcc.target/i386/avx512f-kortestw-2.c, down to version 4.9, at -Os|1|2|3 and with one of -mavx512f -mavx512pf -mavx512er -mavx512cd -mavx512vl -mavx512bw -mavx512dq -mavx512ifma -mavx512vbmi $ gcc-7-20170226 -O2 -mavx512f -c avx512f-kortestw-1.c In file included from .../gcc/x86_64-pc-linux-gnu/7.0.1/include/immintrin.h:45:0, from avx512f-kortestw-1.c:5: .../gcc/x86_64-pc-linux-gnu/7.0.1/include/avx512fintrin.h: In function 'avx512f_test': .../gcc/x86_64-pc-linux-gnu/7.0.1/include/avx512fintrin.h:10095:10: internal compiler error: in int_mode_for_mode, at stor-layout.c:406 return (__mmask16) __builtin_ia32_kortestchi ((__mmask16) __A, ^~~ (__mmask16) __B); 0xbe8a9f int_mode_for_mode(machine_mode) ../../gcc/stor-layout.c:406 0x8bccae emit_move_via_integer ../../gcc/expr.c:3289 0x8c9a7a emit_move_insn_1(rtx_def*, rtx_def*) ../../gcc/expr.c:3670 0x8c9dd4 emit_move_insn(rtx_def*, rtx_def*) ../../gcc/expr.c:3738 0x8ad0f2 copy_to_reg(rtx_def*) ../../gcc/explow.c:585 0xf6d4d1 ix86_expand_builtin ../../gcc/config/i386/i386.c:37800 0x793606 expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode, int) ../../gcc/builtins.c:6362 0x8c5a14 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) ../../gcc/expr.c:10810 0x8d1be6 store_expr_with_bounds(tree_node*, rtx_def*, int, bool, bool, tree_node*) ../../gcc/expr.c:5552 0x8d37d0 expand_assignment(tree_node*, tree_node*, bool) ../../gcc/expr.c:5321 0x7b7cfa expand_call_stmt ../../gcc/cfgexpand.c:2656 0x7b7cfa expand_gimple_stmt_1 ../../gcc/cfgexpand.c:3571 0x7b7cfa expand_gimple_stmt ../../gcc/cfgexpand.c:3737 0x7b998e expand_gimple_basic_block ../../gcc/cfgexpand.c:5744 0x7bfa56 execute ../../gcc/cfgexpand.c:6357
[Bug c++/79734] New: ICE: verify_gimple failed
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79734 Bug ID: 79734 Summary: ICE: verify_gimple failed Product: gcc Version: 7.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- With version 6/7 (on x86_64 GNU/Linux). Reduced from ./g++.dg/ext/vector27.C : $ cat z1.cc typedef float vecf __attribute__ ((vector_size (4 * sizeof (float; void g (vecf *a, vecf *b) { *a = (*a < 1 && !(*b > 2)) ? *a + *b : 3; } $ gcc-7-20170226 -c z1.cc $ gcc-7-20170226 -mavx512vl -c z1.cc z1.cc: In function 'void g(vecf*, vecf*)': z1.cc:2:6: error: mode size of non-integral result does not match field size of BIT_FIELD_REF void g (vecf *a, vecf *b) ^ BIT_FIELD_REF <_3, 8, 0> z1.cc:4:16: note: in statement *a = (*a < 1 && !(*b > 2)) ? *a + *b : 3; ^ _16 = BIT_FIELD_REF <_3, 8, 0>; z1.cc:2:6: error: mode size of non-integral result does not match field size of BIT_FIELD_REF void g (vecf *a, vecf *b) ^ BIT_FIELD_REF <_17, 8, 0> z1.cc:4:16: note: in statement *a = (*a < 1 && !(*b > 2)) ? *a + *b : 3; ^ _18 = BIT_FIELD_REF <_17, 8, 0>; z1.cc:2:6: error: mode size of non-integral result does not match field size of BIT_FIELD_REF void g (vecf *a, vecf *b) ^ BIT_FIELD_REF <_3, 8, 8> z1.cc:4:16: note: in statement *a = (*a < 1 && !(*b > 2)) ? *a + *b : 3; ^ _21 = BIT_FIELD_REF <_3, 8, 8>; z1.cc:2:6: error: mode size of non-integral result does not match field size of BIT_FIELD_REF void g (vecf *a, vecf *b) ^ BIT_FIELD_REF <_22, 8, 8> z1.cc:4:16: note: in statement *a = (*a < 1 && !(*b > 2)) ? *a + *b : 3; ^ _23 = BIT_FIELD_REF <_22, 8, 8>; z1.cc:2:6: error: mode size of non-integral result does not match field size of BIT_FIELD_REF void g (vecf *a, vecf *b) ^ BIT_FIELD_REF <_3, 8, 16> z1.cc:4:16: note: in statement *a = (*a < 1 && !(*b > 2)) ? *a + *b : 3; ^ _26 = BIT_FIELD_REF <_3, 8, 16>; z1.cc:2:6: error: mode size of non-integral result does not match field size of BIT_FIELD_REF void g (vecf *a, vecf *b) ^ BIT_FIELD_REF <_27, 8, 16> z1.cc:4:16: note: in statement *a = (*a < 1 && !(*b > 2)) ? *a + *b : 3; ^ _28 = BIT_FIELD_REF <_27, 8, 16>; z1.cc:2:6: error: mode size of non-integral result does not match field size of BIT_FIELD_REF void g (vecf *a, vecf *b) ^ BIT_FIELD_REF <_3, 8, 24> z1.cc:4:16: note: in statement *a = (*a < 1 && !(*b > 2)) ? *a + *b : 3; ^ _31 = BIT_FIELD_REF <_3, 8, 24>; z1.cc:2:6: error: mode size of non-integral result does not match field size of BIT_FIELD_REF void g (vecf *a, vecf *b) ^ BIT_FIELD_REF <_32, 8, 24> z1.cc:4:16: note: in statement *a = (*a < 1 && !(*b > 2)) ? *a + *b : 3; ^ _33 = BIT_FIELD_REF <_32, 8, 24>; z1.cc:2:6: internal compiler error: verify_gimple failed void g (vecf *a, vecf *b) ^ 0xe2dfc6 verify_gimple_in_cfg(function*, bool) ../../gcc/tree-cfg.c:5266 0xd0f823 execute_function_todo ../../gcc/passes.c:1966 0xd10155 execute_todo ../../gcc/passes.c:2016
[Bug c/79732] New: ICE in set_ssa_default_def, at tree-dfa.c:327
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79732 Bug ID: 79732 Summary: ICE in set_ssa_default_def, at tree-dfa.c:327 Product: gcc Version: 7.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- With a mismatch (int/void), down to at least 4.8, at -Os, -O1 or higher. No ICE seen with 4.9 : $ cat z1.c int bar () __attribute__ ((alias ("foo"))); void foo () { } int main () { return bar(); } $ gcc-7-20170226 -O2 -c z1.c z1.c: In function 'main': z1.c:3:22: internal compiler error: Segmentation fault int main () { return bar(); } ^ 0xbf9f9f crash_signal ../../gcc/toplev.c:337 0xc4fe42 set_ssa_default_def(function*, tree_node*, tree_node*) ../../gcc/tree-dfa.c:327 0xc7e012 expand_call_inline ../../gcc/tree-inline.c:4790 0xc7f4a4 gimple_expand_calls_inline ../../gcc/tree-inline.c:4868 0xc7f4a4 optimize_inline_calls(tree_node*) ../../gcc/tree-inline.c:5008 0x1328d91 early_inliner(function*) ../../gcc/ipa-inline.c:2721
[Bug c/79731] New: ICE: verify_gimple failed
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79731 Bug ID: 79731 Summary: ICE: verify_gimple failed Product: gcc Version: 7.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- Affects version 7 at -Os, -O1 or higher. $ cat z1.c typedef unsigned V __attribute__ ((vector_size (8))); V foo (unsigned x, V v) { do { v %= x; x = 1; } while (v[1]); return v; } void fn2 () { V x = foo (5, (V) { 0, 1 }); if (x[0] || x[1] || x[2] || x[3]); } $ gcc-7-20170226 -O2 -c z1.c z1.c: In function 'fn2': z1.c:11:6: error: position plus size exceeds size of referenced object in BIT_FIELD_REF void fn2 () ^~~ BIT_FIELD_REF <x, 64, 64> z1.c:14:28: note: in statement if (x[0] || x[1] || x[2] || x[3]); ~^~~ _4 = BIT_FIELD_REF <x, 64, 64>; z1.c:11:6: internal compiler error: verify_gimple failed void fn2 () ^~~ 0xc40f16 verify_gimple_in_cfg(function*, bool) ../../gcc/tree-cfg.c:5266 0xb1a203 execute_function_todo ../../gcc/passes.c:1966 0xb1ab35 execute_todo ../../gcc/passes.c:2016
[Bug c/79730] New: ICE tree check: expected var_decl, have function_decl in finish_decl, at c/c-decl.c:5063
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79730 Bug ID: 79730 Summary: ICE tree check: expected var_decl, have function_decl in finish_decl, at c/c-decl.c:5063 Product: gcc Version: 7.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- Affects versions down to 4.9 (configured with --enable-checking=yes) : $ cat z1.c register int x() asm ("x"); $ cat z2.c register float x() asm ("x()"); $ gcc-7-20170226 -c z1.c z1.c:1:14: error: invalid storage class for function 'x' register int x() asm ("x"); ^ z1.c:1:1: internal compiler error: tree check: expected var_decl, have function_decl in finish_decl, at c/c-decl.c:5063 register int x() asm ("x"); ^~~~ 0xea2fcc tree_check_failed(tree_node const*, char const*, int, char const*, ...) ../../gcc/tree.c:9815 0x668f71 tree_check(tree_node*, char const*, int, char const*, tree_code) ../../gcc/tree.h:3064 0x668f71 finish_decl(tree_node*, unsigned int, tree_node*, tree_node*, tree_node*) ../../gcc/c/c-decl.c:5063 0x6cf8b6 c_parser_declaration_or_fndef ../../gcc/c/c-parser.c:1971 0x6d87fb c_parser_external_declaration ../../gcc/c/c-parser.c:1468 0x6d9259 c_parser_translation_unit ../../gcc/c/c-parser.c:1348 0x6d9259 c_parse_file() ../../gcc/c/c-parser.c:18173 0x737b02 c_common_parse_file() ../../gcc/c-family/c-opts.c:1107
[Bug target/79729] New: ICE in ix86_print_operand, at config/i386/i386.c:18231
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79729 Bug ID: 79729 Summary: ICE in ix86_print_operand, at config/i386/i386.c:18231 Product: gcc Version: 7.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- Affects versions down to 4.9. Reduced from ./gcc.target/sh/pr21255-3.c : $ cat z1.c double f () { double r; asm ("mov %S1,%S0; mov %R1,%R0" : "=r" (r) : "i" (20)); return r; } $ gcc-7-20170226 -c z1.c z1.c: In function 'f': z1.c:7:1: internal compiler error: in ix86_print_operand, at config/i386/i386.c:18231 } ^ 0xf79218 ix86_print_operand(_IO_FILE*, rtx_def*, int) ../../gcc/config/i386/i386.c:18231 0x8e118c output_operand(rtx_def*, int) ../../gcc/final.c:3891 0x8e1c67 output_asm_insn(char const*, rtx_def**) ../../gcc/final.c:3788 0x8e3a2d final_scan_insn(rtx_insn*, _IO_FILE*, int, int, int*) ../../gcc/final.c:2667 0x8e40a2 final(rtx_insn*, _IO_FILE*, int) ../../gcc/final.c:2051 0x8e4859 rest_of_handle_final ../../gcc/final.c:4489 0x8e4859 execute ../../gcc/final.c:4562
[Bug c/79636] New: ICE in assign_by_spills, at lra-assigns.c:1457
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79636 Bug ID: 79636 Summary: ICE in assign_by_spills, at lra-assigns.c:1457 Product: gcc Version: 7.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- With -O0 for versions down to at least 4.8 (on x86_64 GNU/Linux) and file ./gcc/testsuite/gcc.target/i386/pr65693.c $ cat pr65693.c int a; void foo (int (*fn) (int, int, int), unsigned int b) { unsigned long *c = (unsigned long *) __builtin_alloca (b); a = *c; register int d asm ("edx") = fn (0, 0, d); } $ gcc-7-20170219 -O1 -c pr65693.c $ gcc-7-20170219 -O0 -c pr65693.c pr65693.c: In function 'foo': pr65693.c:9:1: error: unable to find a register to spill } ^ pr65693.c:9:1: error: this is the insn: (insn 11 35 12 2 (parallel [ (set (reg:DI 96) (udiv:DI (reg:DI 94) (reg:DI 106))) (set (reg:DI 107 [97]) (umod:DI (reg:DI 94) (reg:DI 106))) (clobber (reg:CC 17 flags)) ]) "pr65693.c":6 368 {*udivmoddi4} (expr_list:REG_UNUSED (reg:DI 107 [97]) (expr_list:REG_DEAD (reg:DI 106) (expr_list:REG_DEAD (reg:DI 94) (expr_list:REG_UNUSED (reg:CC 17 flags) (nil)) pr65693.c:9:1: internal compiler error: in assign_by_spills, at lra-assigns.c:1457 0xb8a8a8 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) ../../gcc/rtl-error.c:108 0xa79431 assign_by_spills ../../gcc/lra-assigns.c:1457 0xa79b4e lra_assign() ../../gcc/lra-assigns.c:1643 0xa751a6 lra(_IO_FILE*) ../../gcc/lra.c:2451 0xa2b339 do_reload ../../gcc/ira.c:5452 0xa2b339 execute ../../gcc/ira.c:5636
[Bug c/79634] New: ICE in expand_builtin_with_bounds, at builtins.c:7490
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79634 Bug ID: 79634 Summary: ICE in expand_builtin_with_bounds, at builtins.c:7490 Product: gcc Version: 7.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- Version 5/6/7 (on x86_64 GNU/Linux) and files ./gcc.dg/tree-ssa/ssa-pre-13.cat -O2|3 ./gcc.dg/torture/pr55890-1.c at -Os|1|2|3 $ cat pr55890-1.c extern void *memmove(void *, void *, __SIZE_TYPE__); typedef int (*_TEST_fun_) (); static _TEST_fun_ i = (_TEST_fun_) memmove; int main() { i(); } $ gcc-7-20170219 -O2 -mmpx -fcheck-pointer-bounds -c pr55890-1.c pr55890-1.c: In function 'main.chkp': pr55890-1.c:4:14: internal compiler error: in expand_builtin_with_bounds, at builtins.c:7490 int main() { i(); } ^~~ 0x78d6d8 expand_builtin_with_bounds(tree_node*, rtx_def*, rtx_def*, machine_mode, int) ../../gcc/builtins.c:7489 0x8c349b expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) ../../gcc/expr.c:10780 0x7b7e4a expand_expr ../../gcc/expr.h:276 0x7b7e4a expand_call_stmt ../../gcc/cfgexpand.c:2658 0x7b7e4a expand_gimple_stmt_1 ../../gcc/cfgexpand.c:3571 0x7b7e4a expand_gimple_stmt ../../gcc/cfgexpand.c:3737 0x7b94ee expand_gimple_basic_block ../../gcc/cfgexpand.c:5744 0x7bf5b6 execute ../../gcc/cfgexpand.c:6357
[Bug c/79633] New: ICE in gimple_call_arg, at gimple.h:3163
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79633 Bug ID: 79633 Summary: ICE in gimple_call_arg, at gimple.h:3163 Product: gcc Version: 7.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- Version 5/6/7 (on x86_64 GNU/Linux) at -Os|1|2|3 and files ./gcc.target/i386/addr-space-1.c ./gcc.target/i386/addr-space-5.c ./gcc.target/i386/pr65523.c ./gcc.dg/torture/pr55890-2.c ./gcc.dg/torture/pr55890-3.c $ cat pr55890-2.c extern void *memcpy(); int main() { memcpy(); } $ gcc-7-20170219 -O2 -mmpx -fcheck-pointer-bounds -c pr55890-2.c pr55890-2.c: In function 'main.chkp': pr55890-2.c:2:5: internal compiler error: in gimple_call_arg, at gimple.h:3163 int main() { memcpy(); } ^~~~ 0xcbfc98 gimple_call_arg ../../gcc/gimple.h:3163 0xcbfc98 gimple_call_arg ../../gcc/gimple.h:3171 0xcbfc98 chkp_optimize_string_function_calls ../../gcc/tree-chkp-opt.c:981 0xcbfc98 chkp_opt_execute ../../gcc/tree-chkp-opt.c:1282 0xcbfc98 execute ../../gcc/tree-chkp-opt.c:1344 (gcc-5 backtrace differs)
[Bug c/79631] New: ICE tree check: expected integer_cst, have negate_expr in decompose, at tree.h:5255
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79631 Bug ID: 79631 Summary: ICE tree check: expected integer_cst, have negate_expr in decompose, at tree.h:5255 Product: gcc Version: 7.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- Version 5/6/7 (on x86_64 GNU/Linux) at -Os|1|2|3 and file ./gcc.dg/torture/pr71901.c $ gcc-7-20170219 -O2 -mmpx -fcheck-pointer-bounds -c pr71901.c pr71901.c: In function 'fn1.chkp': pr71901.c:5:6: internal compiler error: tree check: expected integer_cst, have negate_expr in decompose, at tree.h:5255 void fn1() ^~~ 0xea199c tree_check_failed(tree_node const*, char const*, int, char const*, ...) ../../gcc/tree.c:9815 0x5e6764 tree_check(tree_node const*, char const*, int, char const*, tree_code) ../../gcc/tree.h:3320 0x5e6764 wi::int_traits::decompose(long*, unsigned int, tree_node const*) ../../gcc/tree.h:5255 0xea6fa4 wi::int_traits::decompose(long*, unsigned int, tree_node const*) ../../gcc/tree.h:3267 0xea6fa4 wide_int_ref_storage::wide_int_ref_storage(tree_node const* const&, unsigned int) ../../gcc/wide-int.h:976 0xea6fa4 generic_wide_int<wide_int_ref_storage >::generic_wide_int(tree_node const* const&, unsigned int) ../../gcc/wide-int.h:753 0xea6fa4 unsigned long wi::extract_uhwi(tree_node const* const&, unsigned int, unsigned int) ../../gcc/wide-int.h:3054 0xea6fa4 tree_int_cst_sign_bit(tree_node const*) ../../gcc/tree.c:7355 0xcbada2 chkp_is_constant_addr ../../gcc/tree-chkp-opt.c:244 0xcbd81a chkp_get_check_result ../../gcc/tree-chkp-opt.c:656 0xcbf4d5 chkp_remove_check_if_pass ../../gcc/tree-chkp-opt.c:699 0xcbf4d5 chkp_remove_constant_checks ../../gcc/tree-chkp-opt.c:829 0xcbf4d5 chkp_opt_execute ../../gcc/tree-chkp-opt.c:1288 0xcbf4d5 execute ../../gcc/tree-chkp-opt.c:1344
[Bug c/79630] New: ICE in make_decl_rtl, at varasm.c:1311
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79630 Bug ID: 79630 Summary: ICE in make_decl_rtl, at varasm.c:1311 Product: gcc Version: 7.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- Version 5/6/7 (on x86_64 GNU/Linux) and files ./gcc.dg/nested-func-9.c ./gcc.target/i386/pr66817.c ./gcc.dg/torture/pr8081.c Maybe related to pr77383 -- but here not depending on -On. $ gcc-7-20170219 -mmpx -fcheck-pointer-bounds -c pr8081.c pr8081.c: In function 'main.chkp': pr8081.c:19:4: internal compiler error: in make_decl_rtl, at varasm.c:1311 a=retframe_block (); ~^~ 0xefe11e make_decl_rtl(tree_node*) ../../gcc/varasm.c:1307 0x8c4f03 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) ../../gcc/expr.c:9765 0xf6c91d expand_normal ../../gcc/expr.h:282 0xf6c91d ix86_expand_builtin ../../gcc/config/i386/i386.c:36762 0x793166 expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode, int) ../../gcc/builtins.c:6362 0x8c3dd4 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) ../../gcc/expr.c:10782 0x7a0bcd initialize_argument_information ../../gcc/calls.c:1589 0x7a3658 expand_call(tree_node*, rtx_def*, int) ../../gcc/calls.c:3275 0x8c29ac expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) ../../gcc/expr.c:10785 0x8cffa6 store_expr_with_bounds(tree_node*, rtx_def*, int, bool, bool, tree_node*) ../../gcc/expr.c:5552 0x8d1b90 expand_assignment(tree_node*, tree_node*, bool) ../../gcc/expr.c:5321 0x7b785a expand_call_stmt ../../gcc/cfgexpand.c:2656 0x7b785a expand_gimple_stmt_1 ../../gcc/cfgexpand.c:3571 0x7b785a expand_gimple_stmt ../../gcc/cfgexpand.c:3737 0x7b94ee expand_gimple_basic_block ../../gcc/cfgexpand.c:5744 0x7bf5b6 execute ../../gcc/cfgexpand.c:6357
[Bug c/79559] New: ICE in ix86_print_operand, at config/i386/i386.c:18189
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79559 Bug ID: 79559 Summary: ICE in ix86_print_operand, at config/i386/i386.c:18189 Product: gcc Version: 7.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- For versions down to 4.9 (on x86_64 GNU/Linux) and test file ./gcc/testsuite/gcc.target/sh/pr21255-2-ml.c : $ cat pr21255-2-ml.c double d; double f (void) { double r; asm ("mov %S1,%S0; mov %R1,%R0" : "=" (r) : "m" (d)); return r; } $ gcc-7-20170212 -c pr21255-2-ml.c pr21255-2-ml.c: In function 'f': pr21255-2-ml.c:9:1: internal compiler error: in ix86_print_operand, at config/i386/i386.c:18189 } ^ 0xf754dd ix86_print_operand(_IO_FILE*, rtx_def*, int) ../../gcc/config/i386/i386.c:18189 0x8de62c output_operand(rtx_def*, int) ../../gcc/final.c:3877 0x8df107 output_asm_insn(char const*, rtx_def**) ../../gcc/final.c:3774 0x8e0e7d final_scan_insn(rtx_insn*, _IO_FILE*, int, int, int*) ../../gcc/final.c:2658 0x8e14d2 final(rtx_insn*, _IO_FILE*, int) ../../gcc/final.c:2046 0x8e1c89 rest_of_handle_final ../../gcc/final.c:4475 0x8e1c89 execute ../../gcc/final.c:4548
[Bug c/79558] New: ICE: Segfault in ubsan_type_descriptor, at ubsan.c:412
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79558 Bug ID: 79558 Summary: ICE: Segfault in ubsan_type_descriptor, at ubsan.c:412 Product: gcc Version: 7.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- Versions 5/6/7 together with option -fsanitize=undefined (or -fsanitize=bounds, or -fsanitize=bounds-strict) : $ cat z1.c void fn1 (int n) { int i, j; int x[2][0]; for (i = 0; i < n; i++) for (j = 0; j < n; j++) x[i][j] = 5; } $ gcc-7-20170212 -fsanitize=undefined -c z1.c z1.c: In function 'fn1': z1.c:1:6: internal compiler error: Segmentation fault void fn1 (int n) ^~~ 0xbf762f crash_signal ../../gcc/toplev.c:333 0xc1b474 ubsan_type_descriptor(tree_node*, ubsan_print_style) ../../gcc/ubsan.c:412 0xc1c671 ubsan_expand_bounds_ifn(gimple_stmt_iterator*) ../../gcc/ubsan.c:698 0xc226e9 execute ../../gcc/sanopt.c:922
[Bug c++/79557] New: ICE in ipa_modify_formal_parameters, at ipa-prop.c:3979
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79557 Bug ID: 79557 Summary: ICE in ipa_modify_formal_parameters, at ipa-prop.c:3979 Product: gcc Version: 7.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- Version 7 applied to ./gcc/testsuite/g++.dg/cpp1z/inh-ctor28.C (on x86_64 GNU/Linux) at -Os, -O2 or higher : $ cat inh-ctor28.C struct V { V(int); }; struct W : virtual V { using V::V; }; struct X : virtual W, virtual V { using W::W; }; X x(0); $ gcc-7-20170212 -O2 -c inh-ctor28.C inh-ctor28.C: In constructor 'W::W(int) [inherited from V]': inh-ctor28.C:4:7: internal compiler error: in ipa_modify_formal_parameters, at ipa-prop.c:3979 X x(0); ^ 0xc073ce ipa_modify_formal_parameters(tree_node*, vec<ipa_parm_adjustment, va_heap, vl_ptr>) ../../gcc/ipa-prop.c:3979 0xed1b69 modify_function ../../gcc/tree-sra.c:5179 0xedbe96 ipa_early_sra ../../gcc/tree-sra.c:5410 0xedbe96 execute ../../gcc/tree-sra.c:5457
[Bug c/79537] New: ICE in gimplify_expr, at gimplify.c:12009
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79537 Bug ID: 79537 Summary: ICE in gimplify_expr, at gimplify.c:12009 Product: gcc Version: 7.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- Affects versions down to at least 4.8 (on x86_64 GNU/Linux) : $ cat z1.c void fn1 () { L: *& } $ gcc-7-20170212 -c z1.c z1.c: In function 'fn1': z1.c:3:6: internal compiler error: in gimplify_expr, at gimplify.c:12009 L: *& ^ 0x983ca5 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc/gimplify.c:12009 0x9840c6 gimplify_stmt(tree_node**, gimple**) ../../gcc/gimplify.c:6478 0x97f483 gimplify_statement_list ../../gcc/gimplify.c:1716 0x97f483 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc/gimplify.c:11619 0x9840c6 gimplify_stmt(tree_node**, gimple**) ../../gcc/gimplify.c:6478 0x986a8d gimplify_bind_expr ../../gcc/gimplify.c:1290 0x98129a gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc/gimplify.c:11391 0x9840c6 gimplify_stmt(tree_node**, gimple**) ../../gcc/gimplify.c:6478 0x987789 gimplify_body(tree_node*, bool) ../../gcc/gimplify.c:12385 0x987e24 gimplify_function_tree(tree_node*) ../../gcc/gimplify.c:12543 0x7f1607 cgraph_node::analyze() ../../gcc/cgraphunit.c:657 0x7f4d73 analyze_functions ../../gcc/cgraphunit.c:1118 0x7f58ba symbol_table::finalize_compilation_unit() ../../gcc/cgraphunit.c:2599
[Bug c/79536] New: ICE in fold_binary_loc, at fold-const.c:9060
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79536 Bug ID: 79536 Summary: ICE in fold_binary_loc, at fold-const.c:9060 Product: gcc Version: 7.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- Affects versions down to at least 4.8 (on x86_64 GNU/Linux) : $ cat z1.c typedef int A; void fn1 (A x, A y) { if ( (x+(x-y)*1i) != -(-x+(y-x)*1i) ); } $ gcc-7-20170212 -c z1.c z1.c: In function 'fn1': z1.c:4:3: internal compiler error: in fold_binary_loc, at fold-const.c:9060 if ( (x+(x-y)*1i) != -(-x+(y-x)*1i) ); ^~ 0x8fc0af fold_binary_loc(unsigned int, tree_code, tree_node*, tree_node*, tree_node*) ../../gcc/fold-const.c:9057 0x904faa fold_build2_stat_loc(unsigned int, tree_code, tree_node*, tree_node*, tree_node*) ../../gcc/fold-const.c:12242 0x90ff0a fold_negate_expr ../../gcc/fold-const.c:583 0x910517 negate_expr ../../gcc/fold-const.c:735 0x8fa3de fold_binary_loc(unsigned int, tree_code, tree_node*, tree_node*, tree_node*) ../../gcc/fold-const.c:9522 0x904faa fold_build2_stat_loc(unsigned int, tree_code, tree_node*, tree_node*, tree_node*) ../../gcc/fold-const.c:12242 0x90fc4c fold_negate_expr ../../gcc/fold-const.c:625 0x906c95 fold_unary_loc(unsigned int, tree_code, tree_node*, tree_node*) ../../gcc/fold-const.c:7827 0x916f4c fold(tree_node*) ../../gcc/fold-const.c:11875 0x6e36ea c_fully_fold_internal ../../gcc/c/c-fold.c:412 0x6e492b c_fully_fold(tree_node*, bool, bool*) ../../gcc/c/c-fold.c:90 0x69c7fa build_binary_op(unsigned int, tree_code, tree_node*, tree_node*, int) ../../gcc/c/c-typeck.c:11752 0x69d836 parser_build_binary_op(unsigned int, tree_code, c_expr, c_expr) ../../gcc/c/c-typeck.c:3633 0x6bae1a c_parser_binary_expression ../../gcc/c/c-parser.c:6818 0x6bb2b5 c_parser_conditional_expression ../../gcc/c/c-parser.c:6458 0x6bba10 c_parser_expr_no_commas ../../gcc/c/c-parser.c:6375 0x6bbc92 c_parser_expression ../../gcc/c/c-parser.c:8597 0x6be519 c_parser_expression_conv ../../gcc/c/c-parser.c:8630 0x6be592 c_parser_condition ../../gcc/c/c-parser.c:5421 0x6be627 c_parser_paren_condition ../../gcc/c/c-parser.c:5440
[Bug c++/79535] New: ICE in verify_ctor_sanity, at cp/constexpr.c:2636
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79535 Bug ID: 79535 Summary: ICE in verify_ctor_sanity, at cp/constexpr.c:2636 Product: gcc Version: 7.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- Affects versions 6/7 (on x86_64 GNU/Linux) : $ cat z1.cc struct A { int b = 1; int c = 2; int x[] = { c, 3 }; }; A a = { 4, 5 }; $ gcc-7-20170212 -c z1.cc z1.cc:7:14: internal compiler error: in verify_ctor_sanity, at cp/constexpr.c:2636 A a = { 4, 5 }; ^ 0x8bb029 verify_ctor_sanity ../../gcc/cp/constexpr.c:2635 0x8c595e cxx_eval_bare_aggregate ../../gcc/cp/constexpr.c:2665 0x8bfd79 cxx_eval_constant_expression ../../gcc/cp/constexpr.c:4304 0x8c5ae6 cxx_eval_bare_aggregate ../../gcc/cp/constexpr.c:2681 0x8bfd79 cxx_eval_constant_expression ../../gcc/cp/constexpr.c:4304 0x8c67e1 cxx_eval_outermost_constant_expr ../../gcc/cp/constexpr.c:4603 0x8c9dc0 maybe_constant_init(tree_node*, tree_node*) ../../gcc/cp/constexpr.c:4926 0x73a7c2 store_init_value(tree_node*, tree_node*, vec<tree_node*, va_gc, vl_embed>**, int) ../../gcc/cp/typeck2.c:819 0x6966ca check_initializer ../../gcc/cp/decl.c:6359 0x6c2577 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int) ../../gcc/cp/decl.c:7025 0x7bdbf8 cp_parser_init_declarator ../../gcc/cp/parser.c:19397 0x7be5af cp_parser_simple_declaration ../../gcc/cp/parser.c:12792 0x7bf30a cp_parser_block_declaration ../../gcc/cp/parser.c:12618 0x7c722e cp_parser_declaration ../../gcc/cp/parser.c:12515 0x7c7686 cp_parser_declaration_seq_opt ../../gcc/cp/parser.c:12391 0x7c79b8 cp_parser_translation_unit ../../gcc/cp/parser.c:4366 0x7c79b8 c_parse_file() ../../gcc/cp/parser.c:38425 0x92a392 c_common_parse_file() ../../gcc/c-family/c-opts.c:1107
[Bug c/79516] New: ICE: unspellable token PRAGMA_EOL
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79516 Bug ID: 79516 Summary: ICE: unspellable token PRAGMA_EOL Product: gcc Version: 7.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- For versions down to at least 4.8 (on x86_64 GNU/Linux) with options "-E -traditional" or "-traditional-cpp" applied to file ./gcc/testsuite/gcc.dg/pragma-message.c or this reduced variant : $ cat z1.c #pragma message "Okay 1" #if 0 #pragma message ("Not printed") #endif $ gcc-7-20170212 -E -traditional -c z1.c # 1 "z1.c" # 1 "" # 1 "" # 31 "" # 1 "/usr/include/stdc-predef.h" 1 3 4 # 17 "/usr/include/stdc-predef.h" 3 4 .. # 32 "" 2 # 1 "z1.c" z1.c:2:0: internal compiler error: unspellable token PRAGMA_EOL #if 0 0x71734a c_cpp_error(cpp_reader*, int, int, rich_location*, char const*, __va_list_tag (*) [1]) ../../gcc/c-family/c-common.c:6191 0x13f7174 cpp_diagnostic_at ../../libcpp/errors.c:60 0x13f7356 cpp_error(cpp_reader*, int, char const*, ...) ../../libcpp/errors.c:104 0x140039d cpp_spell_token(cpp_reader*, cpp_token const*, unsigned char*, bool) ../../libcpp/lex.c:3248 0x1401d67 cpp_token_as_text(cpp_reader*, cpp_token const*) ../../libcpp/lex.c:3263 0x13fb10e _cpp_parse_expr ../../libcpp/expr.c:1334 0x13f3b63 do_if ../../libcpp/directives.c:2049 0x13f5306 _cpp_handle_directive ../../libcpp/directives.c:547 0x140ea75 _cpp_scan_out_logical_line ../../libcpp/traditional.c:772 0x140f2eb _cpp_read_logical_line_trad ../../libcpp/traditional.c:310 0x737cb7 scan_translation_unit_trad ../../gcc/c-family/c-ppoutput.c:320 0x737cb7 preprocess_file(cpp_reader*) ../../gcc/c-family/c-ppoutput.c:96 0x736520 c_common_init() ../../gcc/c-family/c-opts.c:1083 0x64be4e lang_dependent_init ../../gcc/toplev.c:1745 0x64be4e do_compile ../../gcc/toplev.c:1968
[Bug c/79515] New: ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in do_warn_double_promotion, at c-family/c-warn.c:1867
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79515 Bug ID: 79515 Summary: ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in do_warn_double_promotion, at c-family/c-warn.c:1867 Product: gcc Version: 7.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- A test run with -Wdouble-promotion (on x86_64 GNU/Linux) gives ICEs down to 4.9 (configured with --enable-checking=yes) for a few testsuite files : ./gcc.dg/dfp/floatn.c ./gcc.dg/dfp/usual-arith-conv-bad-2.c ./gcc.dg/dfp/usual-arith-conv-bad.c $ cat usual-arith-conv-bad-2.c extern _Decimal64 x; extern int i; void foo (void) { if (x <= 2.0) i++; } $ gcc-7-20170212 -Wdouble-promotion -c usual-arith-conv-bad-2.c usual-arith-conv-bad-2.c: In function 'foo': usual-arith-conv-bad-2.c:6:3: error: can't mix operands of decimal float and other float types if (x <= 2.0) ^~ usual-arith-conv-bad-2.c:6:3: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in do_warn_double_promotion, at c-family/c-warn.c:1867 0xe9f207 tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*) ../../gcc/tree.c:9866 0x764c29 tree_class_check(tree_node*, tree_code_class, char const*, int, char const*) ../../gcc/tree.h:3187 0x764c29 do_warn_double_promotion(tree_node*, tree_node*, tree_node*, char const*, unsigned int) ../../gcc/c-family/c-warn.c:1867 0x699dbb build_binary_op(unsigned int, tree_code, tree_node*, tree_node*, int) ../../gcc/c/c-typeck.c:11568 0x69d836 parser_build_binary_op(unsigned int, tree_code, c_expr, c_expr) ../../gcc/c/c-typeck.c:3633 0x6bae1a c_parser_binary_expression ../../gcc/c/c-parser.c:6818 0x6bb2b5 c_parser_conditional_expression ../../gcc/c/c-parser.c:6458 0x6bba10 c_parser_expr_no_commas ../../gcc/c/c-parser.c:6375 0x6bbc92 c_parser_expression ../../gcc/c/c-parser.c:8597 0x6be519 c_parser_expression_conv ../../gcc/c/c-parser.c:8630 0x6be592 c_parser_condition ../../gcc/c/c-parser.c:5421 0x6be627 c_parser_paren_condition ../../gcc/c/c-parser.c:5440 0x6d2a89 c_parser_if_statement ../../gcc/c/c-parser.c:5602 0x6d2a89 c_parser_statement_after_labels ../../gcc/c/c-parser.c:5222 0x6d3f47 c_parser_compound_statement_nostart ../../gcc/c/c-parser.c:4907 0x6d469e c_parser_compound_statement ../../gcc/c/c-parser.c:4740 0x6cfadc c_parser_declaration_or_fndef ../../gcc/c/c-parser.c:2112 0x6d7aeb c_parser_external_declaration ../../gcc/c/c-parser.c:1468 0x6d8549 c_parser_translation_unit ../../gcc/c/c-parser.c:1348 0x6d8549 c_parse_file() ../../gcc/c/c-parser.c:18190
[Bug c/79514] New: ICE in curr_insn_transform, at lra-constraints.c:3773
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79514 Bug ID: 79514 Summary: ICE in curr_insn_transform, at lra-constraints.c:3773 Product: gcc Version: 7.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- A test run with -m96bit-long-double (on x86_64 GNU/Linux) gives ICEs down to 4.9 for several testsuite files. An incomplete list : ./gcc.c-torture/execute/20020413-1.c ./gcc.c-torture/compile/20031208-1.c ./gcc.c-torture/execute/20080502-1.c ./gcc.c-torture/compile/20080628-1.c ./gcc.c-torture/execute/va-arg-6.c ./gcc.dg/torture/float128-extend-inf.c ./gcc.dg/torture/float128-extend-nan.c ./gcc.dg/torture/float128-extendxf-underflow.c ./gcc.dg/torture/pr50092.c ./gcc.dg/tree-ssa/backprop-6.c ./gcc.dg/dfp/wtr-conversion-1.c ./gcc.dg/wtr-conversion-1.c ./gcc.dg/builtins-7.c ./gcc.dg/builtins-21.c ./gcc.dg/builtins-36.c ./gcc.dg/builtins-65.c ./gcc.dg/pr43305.c ./gcc.dg/pr46251.c ./gcc.dg/pr50132.c ./gcc.dg/pr52592.c ./gcc.dg/pr56424.c ./gcc.dg/pr68474.c For example : $ cat pr46251.c void foo (long double *x) { __builtin_sincosl (*x, x, x); } $ gcc-7-20170212 -m96bit-long-double -c pr46251.c pr46251.c: In function 'foo': pr46251.c:4:1: error: unable to generate reloads for: } ^ (insn 10 9 11 2 (set (mem:XF (pre_modify:DI (reg/f:DI 7 sp) (plus:DI (reg/f:DI 7 sp) (const_int -16 [0xfff0]))) [2 S12 A32]) (reg:XF 87 [ _1 ])) "pr46251.c":3 118 {*pushxf} (expr_list:REG_DEAD (reg:XF 87 [ _1 ]) (expr_list:REG_ARGS_SIZE (const_int 16 [0x10]) (nil pr46251.c:4:1: internal compiler error: in curr_insn_transform, at lra-constraints.c:3773 0xb894d8 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) ../../gcc/rtl-error.c:108 0xa87e17 curr_insn_transform ../../gcc/lra-constraints.c:3773 0xa89ce6 lra_constraints(bool) ../../gcc/lra-constraints.c:4732 0xa73ee6 lra(_IO_FILE*) ../../gcc/lra.c:2378 0xa2a389 do_reload ../../gcc/ira.c:5400 0xa2a389 execute ../../gcc/ira.c:5584
[Bug c++/79512] New: ICE: Segfault in gimple_build_call_1, at gimple.c:218
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79512 Bug ID: 79512 Summary: ICE: Segfault in gimple_build_call_1, at gimple.c:218 Product: gcc Version: 7.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- Version 6/7 (on x86_64 GNU/Linux) with option -fopenmp-simd ICEs for testsuite files ./g++.dg/gomp/target-teams-1.C and ./g++.dg/gomp/teams-1.C. Last one reduced : $ cat z1.cc void bar () { #pragma omp target #pragma omp teams { int i; goto ok1; for (i = 0; i < 10; ++i) { ok1: break; } } } $ gcc-7-20170212 -fopenmp -c z1.cc $ gcc-7-20170212 -fopenmp-simd -c z1.cc z1.cc: In function 'void bar()': z1.cc:4:11: internal compiler error: Segmentation fault #pragma omp target ^~~ 0xde341f crash_signal ../../gcc/toplev.c:333 0xb3456d gimple_build_call_1 ../../gcc/gimple.c:218 0xb3456d gimple_build_call_vec(tree_node*, vec<tree_node*, va_heap, vl_ptr>) ../../gcc/gimple.c:235 0xcb6f33 expand_omp_target ../../gcc/omp-expand.c:7535 0xcc1ebc expand_omp ../../gcc/omp-expand.c:7938 0xcc42bd execute_expand_omp ../../gcc/omp-expand.c:8118
[Bug target/79499] ICE in rtl_verify_bb_insns, at cfgrtl.c:2661
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79499 --- Comment #1 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- Original files from ./gcc/testsuite/gcc.dg/torture. Oh, and gcc-5 (configured with --enable-checking=yes) also gives that ICE for pr57478.c (but not for pr78542.c). Whereas with release versions 5/6/7 (--enable-checking=release) : $ cat z1.c # slightly reduced/modified pr57478.c typedef struct Node Node; struct Node { Node *Suc, *SubBestSuc; }; void foo (Node *N) { do { N->SubBestSuc = N->Suc; } while (N = N->Suc); } $ gcc-7-20170212-rel -O2 -fsplit-stack -fno-omit-frame-pointer -c z1.c z1.c: In function 'foo': z1.c:14:1: internal compiler error: in maybe_add_or_update_dep_1, at sched-deps.c:924 } ^ 0x10cab94 maybe_add_or_update_dep_1 ../../gcc/sched-deps.c:924 0x10cacf9 haifa_note_dep ../../gcc/sched-deps.c:1866 0x10c2fc2 note_dep ../../gcc/sched-deps.c:1901 0x10c2fc2 add_dependence_1 ../../gcc/sched-deps.c:4285 0x10c5163 add_dependence(rtx_insn*, rtx_insn*, reg_note) ../../gcc/sched-deps.c:1553 0xa35b9e add_branch_dependences ../../gcc/sched-rgn.c:2507 0xa35b9e compute_block_dependences ../../gcc/sched-rgn.c:2725 0xa35b9e sched_rgn_compute_dependencies(int) ../../gcc/sched-rgn.c:3347 0xa37a7b schedule_region ../../gcc/sched-rgn.c:3103 0xa37a7b schedule_insns() ../../gcc/sched-rgn.c:3506 0xa3807d schedule_insns() ../../gcc/sched-rgn.c:3491 0xa3807d rest_of_handle_sched2 ../../gcc/sched-rgn.c:3730 0xa3807d execute ../../gcc/sched-rgn.c:3866 $ gcc-7-20170212-rel -Os -fsplit-stack -fno-omit-frame-pointer -c z1.c z1.c: In function 'foo': z1.c:14:1: internal compiler error: in schedule_block, at haifa-sched.c:6681 } ^ 0x105edd1 schedule_block(basic_block_def**, void*) ../../gcc/haifa-sched.c:6681 0xa37d3a schedule_region ../../gcc/sched-rgn.c:3169 0xa37d3a schedule_insns() ../../gcc/sched-rgn.c:3506 0xa3807d schedule_insns() ../../gcc/sched-rgn.c:3491 0xa3807d rest_of_handle_sched2 ../../gcc/sched-rgn.c:3730 0xa3807d execute ../../gcc/sched-rgn.c:3866
[Bug c/79499] New: ICE in rtl_verify_bb_insns, at cfgrtl.c:2661
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79499 Bug ID: 79499 Summary: ICE in rtl_verify_bb_insns, at cfgrtl.c:2661 Product: gcc Version: 7.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- Version 6/7 with a involved -fno-omit-frame-pointer (at -Os|2|3) ICEs for at least two testsuite files pr57478.c, pr78542.c : $ cat pr57478.c typedef struct Node Node; struct Node { Node *Pred, *Suc; Node *SubBestPred; Node *SubBestSuc; }; void foo (Node *N) { do { N->SubBestPred = N->Pred; N->SubBestSuc = N->Suc; } while (N = N->Suc); } $ gcc-7-20170212 -O2 -fsplit-stack -c pr57478.c $ gcc-7-20170212 -O2 -fsplit-stack -fno-omit-frame-pointer -c pr57478.c pr57478.c: In function 'foo': pr57478.c:17:1: error: in basic block 2: } ^ pr57478.c:17:1: error: flow control insn inside a basic block (jump_insn 22 21 23 2 (set (pc) (if_then_else (geu (reg:CC 17 flags) (const_int 0 [0])) (label_ref 27) (pc))) "pr57478.c":10 -1 (int_list:REG_BR_PROB 9900 (nil)) -> 27) pr57478.c:17:1: internal compiler error: in rtl_verify_bb_insns, at cfgrtl.c:2661 0xb894d8 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) ../../gcc/rtl-error.c:108 0x7d2d63 rtl_verify_bb_insns ../../gcc/cfgrtl.c:2661 0x7d2d63 rtl_verify_flow_info_1 ../../gcc/cfgrtl.c:2747 0x7d2dc5 rtl_verify_flow_info ../../gcc/cfgrtl.c:2989 0x7c20d5 verify_flow_info() ../../gcc/cfghooks.c:258 0xb17981 execute_function_todo ../../gcc/passes.c:1978 0xb18395 execute_todo ../../gcc/passes.c:2016
[Bug c/79498] ICE in df_insn_delete, at df-scan.c:948
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79498 --- Comment #1 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- No ICE seen with gcc version 6.3.1 20170131. On my environment, gcc-5.4.1 gives : $ gcc-5-20170110 -mcmodel=large -O2 -c pr78526.c pr78526.c: In function 'bar': pr78526.c:11:1: warning: AVX512F vector return without AVX512F enabled changes the ABI [-Wpsabi] { ^ pr78526.c: In function 'foo': pr78526.c:18:1: note: The ABI for passing parameters with 64-byte alignment has changed in GCC 4.6 foo (U u) ^ pr78526.c: In function 'bar': pr78526.c:13:16: internal compiler error: in tree_to_shwi, at tree.c:7151 v[x[0]] <<= u[-63]; ^ 0xd99522 tree_to_shwi(tree_node const*) ../../gcc/tree.c:7151 0x8629c4 fold_indirect_ref_1(unsigned int, tree_node*, tree_node*) ../../gcc/fold-const.c:15945 0x88da53 fold_indirect_ref_loc(unsigned int, tree_node*) ../../gcc/fold-const.c:16024 0x92d4a8 gimplify_expr(tree_node**, gimple_statement_base**, gimple_statement_base**, bool (*)(tree_node*), int) ../../gcc/gimplify.c:8241 0x92d1a8 gimplify_expr(tree_node**, gimple_statement_base**, gimple_statement_base**, bool (*)(tree_node*), int) ../../gcc/gimplify.c:8833 0x93a4a8 gimplify_modify_expr ../../gcc/gimplify.c:4647 0x92d9a6 gimplify_expr(tree_node**, gimple_statement_base**, gimple_statement_base**, bool (*)(tree_node*), int) ../../gcc/gimplify.c:8129 0x931a76 gimplify_stmt(tree_node**, gimple_statement_base**) ../../gcc/gimplify.c:5548 0x92ee8b gimplify_statement_list ../../gcc/gimplify.c:1487 0x92ee8b gimplify_expr(tree_node**, gimple_statement_base**, gimple_statement_base**, bool (*)(tree_node*), int) ../../gcc/gimplify.c:8544 0x931a76 gimplify_stmt(tree_node**, gimple_statement_base**) ../../gcc/gimplify.c:5548 0x93297d gimplify_bind_expr ../../gcc/gimplify.c:1136 0x92dd73 gimplify_expr(tree_node**, gimple_statement_base**, gimple_statement_base**, bool (*)(tree_node*), int) ../../gcc/gimplify.c:8326 0x931a76 gimplify_stmt(tree_node**, gimple_statement_base**) ../../gcc/gimplify.c:5548 0x9334f0 gimplify_body(tree_node*, bool) ../../gcc/gimplify.c:9263 0x933af6 gimplify_function_tree(tree_node*) ../../gcc/gimplify.c:9417 0x7781b7 cgraph_node::analyze() ../../gcc/cgraphunit.c:634 0x77b3c3 analyze_functions ../../gcc/cgraphunit.c:1024 0x77bba5 symbol_table::finalize_compilation_unit() ../../gcc/cgraphunit.c:2453 0x62257a c_write_global_declarations() ../../gcc/c/c-decl.c:10857
[Bug c/79498] New: ICE in df_insn_delete, at df-scan.c:948
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79498 Bug ID: 79498 Summary: ICE in df_insn_delete, at df-scan.c:948 Product: gcc Version: 7.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- Version 7 gives an ICE for testsuite file pr78526.c in combination with -mcmodel=large and -Os, -O2 or higher : $ gcc-7-20170212 -O2 -mcmodel=large -c pr78526.c pr78526.c: In function 'bar': pr78526.c:11:1: warning: AVX512F vector return without AVX512F enabled changes the ABI [-Wpsabi] { ^ pr78526.c: In function 'foo': pr78526.c:18:1: note: The ABI for passing parameters with 64-byte alignment has changed in GCC 4.6 foo (U u) ^~~ pr78526.c:18:1: warning: AVX512F vector argument without AVX512F enabled changes the ABI [-Wpsabi] pr78526.c:21:1: internal compiler error: in df_insn_delete, at df-scan.c:948 } ^ 0x82e90c df_insn_delete(rtx_insn*) ../../gcc/df-scan.c:948 0x7d5a87 delete_insn(rtx_insn*) ../../gcc/cfgrtl.c:169 0x7d5bb6 delete_insn_and_edges(rtx_insn*) ../../gcc/cfgrtl.c:231 0x12af85d delete_trivially_dead_insns(rtx_insn*, int) ../../gcc/cse.c:7146 0x12c962b fwprop_done ../../gcc/fwprop.c:1451 0x12cc31f fwprop_addr ../../gcc/fwprop.c:1552 0x12cc31f execute ../../gcc/fwprop.c:1580
[Bug c/79497] New: ICE in extract_insn, at recog.c:2311
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79497 Bug ID: 79497 Summary: ICE in extract_insn, at recog.c:2311 Product: gcc Version: 7.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- A test run with option -mcmodel=large hits an ICE for testsuite file run-gd.c and run-ld.c, down to at least gcc 4.8. $ gcc-7-20170212 -mcmodel=large -c run-gd.c run-gd.c: In function 'get_gd': run-gd.c:12:1: error: unrecognizable insn: } ^ (call_insn/u 5 2 6 2 (parallel [ (set (reg:DI 0 ax) (call:DI (mem:QI (symbol_ref:DI ("__tls_get_addr")) [0 S1 A8]) (const_int 0 [0]))) (unspec:DI [ (symbol_ref:DI ("tls_gd") [flags 0x12] ) (reg/f:DI 7 sp) ] UNSPEC_TLS_GD) ]) "run-gd.c":11 -1 (expr_list:REG_EH_REGION (const_int -2147483648 [0x8000]) (nil)) (nil)) run-gd.c:12:1: internal compiler error: in extract_insn, at recog.c:2311 0xb894d8 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) ../../gcc/rtl-error.c:108 0xb89509 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*) ../../gcc/rtl-error.c:116 0xb56b71 extract_insn(rtx_insn*) ../../gcc/recog.c:2311 0x921e7f instantiate_virtual_regs_in_insn ../../gcc/function.c:1637 0x921e7f instantiate_virtual_regs ../../gcc/function.c:1957 0x921e7f execute ../../gcc/function.c:2006
[Bug c/79495] New: ICE in extract_constrain_insn, at recog.c:2213
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79495 Bug ID: 79495 Summary: ICE in extract_constrain_insn, at recog.c:2213 Product: gcc Version: 7.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- A test run with option -msoft-float hits an ICE for testsuite file .../ieee/fp-cmp-3.c, version 6/7 at -Os, -O1 or higher. Reduced : $ cat z1.c long double dnan = 1.0l/0.0l - 1.0l/0.0l; long double x = 1.0l; void fn1 (void) { if (dnan != x) x = 1.0; } $ gcc-7-20170212 -O2 -msoft-float -c z1.c z1.c: In function 'fn1': z1.c:7:1: error: insn does not satisfy its constraints: } ^ (insn 29 16 30 3 (set (mem/c:DI (symbol_ref:DI ("x") [flags 0x2] ) [1 x+0 S8 A128]) (const_int -9223372036854775808 [0x8000])) "z1.c":6 81 {*movdi_internal} (nil)) z1.c:7:1: internal compiler error: in extract_constrain_insn, at recog.c:2213 0xb894d8 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) ../../gcc/rtl-error.c:108 0xb894ff _fatal_insn_not_found(rtx_def const*, char const*, int, char const*) ../../gcc/rtl-error.c:119 0xb57bfd extract_constrain_insn(rtx_insn*) ../../gcc/recog.c:2213 0xb609ef copyprop_hardreg_forward_1 ../../gcc/regcprop.c:794 0xb61724 execute ../../gcc/regcprop.c:1301
[Bug c/79494] New: ICE in maybe_record_trace_start, at dwarf2cfi.c:2330
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79494 Bug ID: 79494 Summary: ICE in maybe_record_trace_start, at dwarf2cfi.c:2330 Product: gcc Version: 7.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- Option -fsplit-stack gives this ICE for roughly two dozen files from gcc/testsuite, for example (down to 4.9) : $ cat pr49994-1.c void x (int a) { __label__ xlab; void y (int b) { switch (b) { case 1: goto xlab; case 2: goto xlab; } } y (a); xlab:; } $ gcc-7-20170212 -fsplit-stack -c pr49994-1.c pr49994-1.c: In function 'x': pr49994-1.c:16:1: internal compiler error: in maybe_record_trace_start, at dwarf2cfi.c:2330 } ^ 0x83e7eb maybe_record_trace_start ../../gcc/dwarf2cfi.c:2330 0x83eaf7 create_trace_edges ../../gcc/dwarf2cfi.c:2440 0x840cca scan_trace ../../gcc/dwarf2cfi.c:2640 0x84185a create_cfi_notes ../../gcc/dwarf2cfi.c:2666 0x84185a execute_dwarf2_frame ../../gcc/dwarf2cfi.c:3024 0x84185a execute ../../gcc/dwarf2cfi.c:3504
[Bug c/79432] New: ICE: verify_ssa failed
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79432 Bug ID: 79432 Summary: ICE: verify_ssa failed Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- Seen with version 7 only, on x86_64 GNU/Linux. (not depending on any options) $ cat z1.c int fn1 (void); int vfork (void); void fn2 () { int a; a = fn1() + vfork(); } $ gcc-6 -c z1.c $ gcc-7-20170205 -c z1.c z1.c: In function 'fn2': z1.c:7:1: error: definition in block 3 does not dominate use in block 6 } ^ for SSA_NAME: _1 in statement: a_10 = _1 + _2; z1.c:7:1: internal compiler error: verify_ssa failed 0xe10883 verify_ssa(bool, bool) ../../gcc/tree-ssa.c:1184 0xb167fd execute_function_todo ../../gcc/passes.c:1973 0xb170e5 execute_todo ../../gcc/passes.c:2016
[Bug c/79431] New: ICE in get, at cgraph.h:397
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79431 Bug ID: 79431 Summary: ICE in get, at cgraph.h:397 Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- Affects versions 6 and 7 (configured with --enable-checking=yes) : (compiles with "static int a") $ cat z1.c void fn1 () { int a; #pragma omp declare target (a) } $ gcc-6 -fopenmp -c z1.c # official release 6.3.1 20170131 $ $ gcc-7-20170205 -fopenmp -c z1.c z1.c: In function 'fn1': z1.c:4:11: internal compiler error: in get, at cgraph.h:397 #pragma omp declare target (a) ^~~ 0x6d14d9 symtab_node::get(tree_node const*) ../../gcc/cgraph.h:394 0x6d14d9 c_parser_omp_declare_target ../../gcc/c/c-parser.c:16850 0x6d14d9 c_parser_omp_declare ../../gcc/c/c-parser.c:17290 0x6b406b c_parser_pragma ../../gcc/c/c-parser.c:10313 0x6d3f0e c_parser_compound_statement_nostart ../../gcc/c/c-parser.c:4875 0x6d44ce c_parser_compound_statement ../../gcc/c/c-parser.c:4740 0x6cf90c c_parser_declaration_or_fndef ../../gcc/c/c-parser.c:2112 0x6d791b c_parser_external_declaration ../../gcc/c/c-parser.c:1468 0x6d8379 c_parser_translation_unit ../../gcc/c/c-parser.c:1348 0x6d8379 c_parse_file() ../../gcc/c/c-parser.c:18185 0x736892 c_common_parse_file() ../../gcc/c-family/c-opts.c:1107
[Bug c++/79429] New: ICE in add_stmt, at cp/semantics.c:385
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79429 Bug ID: 79429 Summary: ICE in add_stmt, at cp/semantics.c:385 Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- Affects versions 6 and 7 (configured with --enable-checking=yes). Issue similar to that from pr79428. $ cat z1.cc #pragma omp target $ cat z2.cc #pragma omp ordered $ g++-5 -fopenmp -c z1.cc z1.cc:1:19: error: expected declaration specifiers before end of line $ $ $ g++-7-20170205 -fopenmp -c z1.cc z1.cc:1:19: error: expected declaration specifiers before end of line #pragma omp target ^ z1.cc:1:19: internal compiler error: in add_stmt, at cp/semantics.c:385 0x8213ab add_stmt(tree_node*) ../../gcc/cp/semantics.c:385 0x834fdb pop_omp_privatization_clauses(tree_node*) ../../gcc/cp/semantics.c:7424 0x79a9ac cp_parser_pragma ../../gcc/cp/parser.c:38256 0x7c6b9b cp_parser_declaration_seq_opt ../../gcc/cp/parser.c:12362 0x7c6e58 cp_parser_translation_unit ../../gcc/cp/parser.c:4366 0x7c6e58 c_parse_file() ../../gcc/cp/parser.c:38382 0x9292b2 c_common_parse_file() ../../gcc/c-family/c-opts.c:1107
[Bug c/79428] New: ICE in c_parser_consume_token, at c/c-parser.c:770
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79428 Bug ID: 79428 Summary: ICE in c_parser_consume_token, at c/c-parser.c:770 Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- Affects versions 6 and 7 (configured with --enable-checking=yes) : $ cat z1.c #pragma omp ordered $ gcc-5 -fopenmp -c z1.c z1.c:1:9: error: expected declaration specifiers before '#pragma' #pragma omp ordered ^ $ $ gcc-7-20170205 -fopenmp -c z1.c z1.c:1:20: error: expected declaration specifiers before end of line #pragma omp ordered ^ z1.c:1:20: internal compiler error: in c_parser_consume_token, at c/c-parser.c:770 0x6ac0d8 c_parser_consume_token(c_parser*) ../../gcc/c/c-parser.c:770 0x6ad0ea c_parser_require(c_parser*, cpp_ttype, char const*) ../../gcc/c/c-parser.c:908 0x6ad20e c_parser_skip_until_found(c_parser*, cpp_ttype, char const*) ../../gcc/c/c-parser.c:951 0x6b47e1 c_parser_omp_ordered ../../gcc/c/c-parser.c:15463 0x6b47e1 c_parser_pragma ../../gcc/c/c-parser.c:10317 0x6d78cd c_parser_external_declaration ../../gcc/c/c-parser.c:1448 0x6d8379 c_parser_translation_unit ../../gcc/c/c-parser.c:1348 0x6d8379 c_parse_file() ../../gcc/c/c-parser.c:18185 0x736892 c_common_parse_file() ../../gcc/c-family/c-opts.c:1107
[Bug middle-end/60085] ICE in get_frame_type on weird code
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60085 --- Comment #4 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- Another variant (invalid) : $ cat z1.c void fn1 () { void fnx () int n; int a[n]; } $ gcc-7-20170205 -c z1.c z1.c: In function 'fnx': z1.c:6:1: error: expected declaration specifiers before '}' token } ^ z1.c:5:7: error: declaration for parameter 'a' but no such parameter int a[n]; ^ z1.c:4:7: error: declaration for parameter 'n' but no such parameter int n; ^ z1.c:6:1: error: expected '{' at end of input } ^ z1.c: In function 'fn1': z1.c:6:1: error: expected declaration or statement at end of input z1.c:1:6: internal compiler error: Segmentation fault void fn1 () ^~~ 0xbf633f crash_signal ../../gcc/toplev.c:333 0xc9053a get_frame_type ../../gcc/tree-nested.c:211 0xc9053a get_chain_decl ../../gcc/tree-nested.c:317 0xc93d89 get_chain_decl ../../gcc/tree-nested.c:909 0xc93d89 get_nonlocal_debug_decl ../../gcc/tree-nested.c:913 0xc94138 convert_nonlocal_reference_op ../../gcc/tree-nested.c:992 0xec walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*), void*, hash_set<tree_node*, default_hash_traits<tree_node*> >*, tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*, hash_set<tree_node*, default_hash_traits<tree_node*> >*)) ../../gcc/tree.c:11796 0x9649e0 walk_gimple_op(gimple*, tree_node* (*)(tree_node**, int*, void*), walk_stmt_info*) ../../gcc/gimple-walk.c:203 0x964f5c walk_gimple_stmt(gimple_stmt_iterator*, tree_node* (*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*), walk_stmt_info*) ../../gcc/gimple-walk.c:586 0x965148 walk_gimple_seq_mod(gimple**, tree_node* (*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*), walk_stmt_info*) ../../gcc/gimple-walk.c:51 0x965002 walk_gimple_stmt(gimple_stmt_iterator*, tree_node* (*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*), walk_stmt_info*) ../../gcc/gimple-walk.c:596 0x965148 walk_gimple_seq_mod(gimple**, tree_node* (*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*), walk_stmt_info*) ../../gcc/gimple-walk.c:51 0xc8ff41 walk_body ../../gcc/tree-nested.c:656 0xc8ff98 walk_function ../../gcc/tree-nested.c:667 0xc8ff98 walk_all_functions ../../gcc/tree-nested.c:732 0xc98c32 lower_nested_functions(tree_node*) ../../gcc/tree-nested.c:3345 0x7f1670 cgraph_node::analyze() ../../gcc/cgraphunit.c:661 0x7f4ce3 analyze_functions ../../gcc/cgraphunit.c:1116 0x7f5a3a symbol_table::finalize_compilation_unit() ../../gcc/cgraphunit.c:2597
[Bug middle-end/60085] ICE in get_frame_type on weird code
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60085 Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> changed: What|Removed |Added CC||gerhard.steinmetz.fortran@t ||-online.de --- Comment #3 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- Update : $ gcc-7-20170205 -c pr60085.c pr60085.c: In function 'foo': pr60085.c:3:6: internal compiler error: Segmentation fault void foo (void) ^~~ 0xbf633f crash_signal ../../gcc/toplev.c:333 0xc9053a get_frame_type ../../gcc/tree-nested.c:211 0xc9053a get_chain_decl ../../gcc/tree-nested.c:317 0xc93d89 get_chain_decl ../../gcc/tree-nested.c:909 0xc93d89 get_nonlocal_debug_decl ../../gcc/tree-nested.c:913 0xc94138 convert_nonlocal_reference_op ../../gcc/tree-nested.c:992 0xec walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*), void*, hash_set<tree_node*, default_hash_traits<tree_node*> >*, tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*, hash_set<tree_node*, default_hash_traits<tree_node*> >*)) ../../gcc/tree.c:11796 0x964b0c walk_gimple_op(gimple*, tree_node* (*)(tree_node**, int*, void*), walk_stmt_info*) ../../gcc/gimple-walk.c:221 0x964f5c walk_gimple_stmt(gimple_stmt_iterator*, tree_node* (*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*), walk_stmt_info*) ../../gcc/gimple-walk.c:586 0x965148 walk_gimple_seq_mod(gimple**, tree_node* (*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*), walk_stmt_info*) ../../gcc/gimple-walk.c:51 0x965002 walk_gimple_stmt(gimple_stmt_iterator*, tree_node* (*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*), walk_stmt_info*) ../../gcc/gimple-walk.c:596 0x965148 walk_gimple_seq_mod(gimple**, tree_node* (*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*), walk_stmt_info*) ../../gcc/gimple-walk.c:51 0x965002 walk_gimple_stmt(gimple_stmt_iterator*, tree_node* (*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*), walk_stmt_info*) ../../gcc/gimple-walk.c:596 0x965148 walk_gimple_seq_mod(gimple**, tree_node* (*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*), walk_stmt_info*) ../../gcc/gimple-walk.c:51 0xc8ff41 walk_body ../../gcc/tree-nested.c:656 0xc8ff98 walk_function ../../gcc/tree-nested.c:667 0xc8ff98 walk_all_functions ../../gcc/tree-nested.c:732 0xc98c32 lower_nested_functions(tree_node*) ../../gcc/tree-nested.c:3345 0x7f1670 cgraph_node::analyze() ../../gcc/cgraphunit.c:661 0x7f4ce3 analyze_functions ../../gcc/cgraphunit.c:1116
[Bug c/79413] New: ICE in make_ssa_name_fn, at tree-ssanames.c:265
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79413 Bug ID: 79413 Summary: ICE in make_ssa_name_fn, at tree-ssanames.c:265 Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- Seen with test-version 7 at -Os, -O2 or higher : $ cat z1.c void fn1 () { typeof (int [1/0]) a; } void fn2 () { fn1(); } $ gcc-6 -O2 -c z1.c $ gcc-7-20170205 -O1 -c z1.c $ gcc-7-20170205 -O2 -c z1.c z1.c: In function 'fn2': z1.c:7:3: internal compiler error: Segmentation fault fn1(); ^ 0xbf633f crash_signal ../../gcc/toplev.c:333 0xe150aa make_ssa_name_fn(function*, tree_node*, gimple*, unsigned int) ../../gcc/tree-ssanames.c:265 0xc704d6 make_ssa_name ../../gcc/tree-ssanames.h:113 0xc704d6 remap_ssa_name ../../gcc/tree-inline.c:238 0xc76d1c copy_tree_body_r(tree_node**, int*, void*) ../../gcc/tree-inline.c:1081 0xec walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*), void*, hash_set<tree_node*, default_hash_traits<tree_node*> >*, tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*, hash_set<tree_node*, default_hash_traits<tree_node*> >*)) ../../gcc/tree.c:11796 0xec2676 walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*), void*, hash_set<tree_node*, default_hash_traits<tree_node*> >*, tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*, hash_set<tree_node*, default_hash_traits<tree_node*> >*)) ../../gcc/tree.c:12113 0xc6eba0 remap_type_1 ../../gcc/tree-inline.c:565 0xc6fac1 remap_type(tree_node*, copy_body_data*) ../../gcc/tree-inline.c:593 0xc6e456 remap_decl(tree_node*, copy_body_data*) ../../gcc/tree-inline.c:370 0xc6fbfd remap_decls ../../gcc/tree-inline.c:642 0xc70e60 remap_block ../../gcc/tree-inline.c:700 0xc70fa1 remap_blocks ../../gcc/tree-inline.c:721 0xc79823 expand_call_inline ../../gcc/tree-inline.c:4617 0xc7b834 gimple_expand_calls_inline ../../gcc/tree-inline.c:4868 0xc7b834 optimize_inline_calls(tree_node*) ../../gcc/tree-inline.c:5008 0x1323321 early_inliner(function*) ../../gcc/ipa-inline.c:2721
[Bug c/79412] New: ICE in fold_convert_loc, at fold-const.c:2239
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79412 Bug ID: 79412 Summary: ICE in fold_convert_loc, at fold-const.c:2239 Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- With invalid code down to at least gcc 4.8 (configured with --enable-checking=yes) on x86_64 GNU/Linux. (official releases: confused by earlier errors, bailing out) $ cat z1.c int a; void fn1 () { a++; } int a[] = {2}; $ gcc-7-20170205 -c z1.c z1.c:6:5: error: conflicting types for 'a' int a[] = {2}; ^ z1.c:1:5: note: previous declaration of 'a' was here int a; ^ z1.c: In function 'fn1': z1.c:4:4: internal compiler error: in fold_convert_loc, at fold-const.c:2239 a++; ~^~ 0x90910f fold_convert_loc(unsigned int, tree_node*, tree_node*) ../../gcc/fold-const.c:2238 0x97abe8 gimplify_self_mod_expr(tree_node**, gimple**, gimple**, bool, tree_node*) ../../gcc/gimplify.c:2966 0x973f70 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc/gimplify.c:11135 0x9773e6 gimplify_stmt(tree_node**, gimple**) ../../gcc/gimplify.c:6478 0x9786cd gimplify_bind_expr ../../gcc/gimplify.c:1290 0x9745ba gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc/gimplify.c:11402 0x9773e6 gimplify_stmt(tree_node**, gimple**) ../../gcc/gimplify.c:6478 0x9793b9 gimplify_body(tree_node*, bool) ../../gcc/gimplify.c:12396 0x979a54 gimplify_function_tree(tree_node*) ../../gcc/gimplify.c:12554 0x7f17c7 cgraph_node::analyze() ../../gcc/cgraphunit.c:655 0x7f4ce3 analyze_functions ../../gcc/cgraphunit.c:1116 0x7f5a3a symbol_table::finalize_compilation_unit() ../../gcc/cgraphunit.c:2597
[Bug c/79411] New: ICE: SSA corruption (fail_abnormal_edge_coalesce)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79411 Bug ID: 79411 Summary: ICE: SSA corruption (fail_abnormal_edge_coalesce) Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- With a modified test pr57026.c at -Os, -O1 or above, down to gcc 4.9 : $ cat z1.c typedef struct __jmp_buf_tag { char buf[1024]; } jmp_buf[1]; extern int setjmp (jmp_buf); extern int bar (unsigned int *); extern jmp_buf *baz (void); struct C { int c1; unsigned int c2, c3, c4; }; void foo (struct C *x, const int *y, unsigned int *z, unsigned int e, unsigned int g) { unsigned int d = 0; unsigned long f; setjmp (*baz ()); f = 1 + d; if ((x->c1 || x->c2) && g && (!e || d >= 8)) d = 16; else d = 8; if ((!x->c3 && !x->c4 || *y == 0) && !e && bar (z)) *z = 1 + f; } $ gcc-7-20170205 -O2 -c z1.c Unable to coalesce ssa_names 12 and 13 which are marked as MUST COALESCE. d_12(ab) and d_13(ab) z1.c: In function 'foo': z1.c:7:1: internal compiler error: SSA corruption foo (struct C *x, const int *y, unsigned int *z, unsigned int e, unsigned int g) ^~~ 0xd152af fail_abnormal_edge_coalesce ../../gcc/tree-ssa-coalesce.c:1010 0xd152af coalesce_partitions ../../gcc/tree-ssa-coalesce.c:1399 0xd152af coalesce_ssa_name() ../../gcc/tree-ssa-coalesce.c:1889 0xca3d03 remove_ssa_form ../../gcc/tree-outof-ssa.c:948 0xca3d03 rewrite_out_of_ssa(ssaexpand*) ../../gcc/tree-outof-ssa.c:1172 0x7bdf30 execute ../../gcc/cfgexpand.c:6164
[Bug c/61342] Segfault when using default clause and VLA in OpenMP task
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61342 Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> changed: What|Removed |Added CC||gerhard.steinmetz.fortran@t ||-online.de --- Comment #1 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- Update : $ gcc-7-20170205 -fopenmp -c pr61342.c ' In function 'main': Segmentation fault (*f)[i][j] = 1; ~~~^~~ 0xbf633f crash_signal ../../gcc/toplev.c:333 0x6aa870 c_tree_printer ../../gcc/c/c-objc-common.c:169 0x13df6cf pp_format(pretty_printer*, text_info*) ../../gcc/pretty-print.c:679 0x13d2aa8 diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*) ../../gcc/diagnostic.c:961 0x13d2e03 diagnostic_impl ../../gcc/diagnostic.c:1084 0x13d36d4 error(char const*, ...) ../../gcc/diagnostic.c:1310 0x96e275 omp_default_clause ../../gcc/gimplify.c:6825 0x96e275 omp_notice_variable ../../gcc/gimplify.c:7118 0x96ee85 gimplify_var_or_parm_decl ../../gcc/gimplify.c:2587 0x97387b gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc/gimplify.c:11646 0x972426 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc/gimplify.c:11931 0x97b74c gimplify_compound_lval ../../gcc/gimplify.c:2826 0x972653 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc/gimplify.c:11155 0x985e45 gimplify_modify_expr ../../gcc/gimplify.c:5473 0x9743ca gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc/gimplify.c:11203 0x9773e6 gimplify_stmt(tree_node**, gimple**) ../../gcc/gimplify.c:6478 0x9786cd gimplify_bind_expr ../../gcc/gimplify.c:1290 0x9745ba gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc/gimplify.c:11402 0x9773e6 gimplify_stmt(tree_node**, gimple**) ../../gcc/gimplify.c:6478 0x975b71 gimplify_and_add(tree_node*, gimple**) ../../gcc/gimplify.c:435
[Bug c/43374] ICE with __builtin_isinf() and _Decimal argument
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43374 Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> changed: What|Removed |Added CC||gerhard.steinmetz.fortran@t ||-online.de --- Comment #5 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- Update : $ gcc-7-20170205 -c pr43374.c pr43374.c: In function 'func': pr43374.c:4:10: internal compiler error: in decimal_to_decnumber, at dfp.c:134 return __builtin_isinf(v); ^~ 0x12b9f38 decimal_to_decnumber ../../gcc/dfp.c:134 0x12ba0bf encode_decimal32(real_format const*, long*, real_value const*) ../../gcc/dfp.c:161 0xb51d15 real_to_target(long*, real_value const*, format_helper) ../../gcc/real.c:2835 0xbc73bc simplify_immed_subreg ../../gcc/simplify-rtx.c:5824 0xbd3578 simplify_gen_subreg(machine_mode, rtx_def*, machine_mode, unsigned int) ../../gcc/simplify-rtx.c:6260 0x8ba3b5 emit_move_via_integer ../../gcc/expr.c:3301 0x8c7198 emit_move_insn_1(rtx_def*, rtx_def*) ../../gcc/expr.c:3652 0x8c7494 emit_move_insn(rtx_def*, rtx_def*) ../../gcc/expr.c:3738 0x7a1434 emit_library_call_value_1 ../../gcc/calls.c:4895 0x7a82af emit_library_call_value(rtx_def*, rtx_def*, libcall_type, machine_mode, int, ...) ../../gcc/calls.c:5159 0xaf5ab6 prepare_float_lib_cmp ../../gcc/optabs.c:4172 0xaf5ab6 prepare_cmp_insn ../../gcc/optabs.c:3945 0xaf5bf5 emit_cmp_and_jump_insns(rtx_def*, rtx_def*, rtx_code, rtx_def*, machine_mode, int, rtx_def*, int) ../../gcc/optabs.c:4051 0x8314cc do_compare_rtx_and_jump(rtx_def*, rtx_def*, rtx_code, int, machine_mode, rtx_def*, rtx_code_label*, rtx_code_label*, int) ../../gcc/dojump.c:1145 0x8319e7 do_compare_rtx_and_jump(rtx_def*, rtx_def*, rtx_code, int, machine_mode, rtx_def*, rtx_code_label*, rtx_code_label*, int) ../../gcc/dojump.c:1140 0x8b6314 emit_store_flag_force(rtx_def*, rtx_code, rtx_def*, rtx_def*, machine_mode, int, int) ../../gcc/expmed.c:5936 0x8d7cde do_store_flag ../../gcc/expr.c:11453 0x8d7cde expand_expr_real_2(separate_ops*, rtx_def*, machine_mode, expand_modifier) ../../gcc/expr.c:9203 0x7b6382 expand_gimple_stmt_1 ../../gcc/cfgexpand.c:3676 0x7b6382 expand_gimple_stmt ../../gcc/cfgexpand.c:3737
[Bug c/30552] gcc crashed when compiling an example
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30552 --- Comment #2 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- Other test cases : $ cat z1.c void f() { void g() void a[( {void b} )]; } $ cat z2.c int f() { int g() int a[( {int b} )]; }
[Bug c/30552] gcc crashed when compiling an example
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30552 Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> changed: What|Removed |Added CC||gerhard.steinmetz.fortran@t ||-online.de --- Comment #1 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- Update : $ gcc-7-20170205 -c pr30552.c pr30552.c: In function 'fun': pr30552.c:6:5: internal compiler error: Segmentation fault int a[({void h(){}2;})]; ^~~ 0xbf633f crash_signal ../../gcc/toplev.c:333 0x670701 c_push_function_context() ../../gcc/c/c-decl.c:9504 0x6cf8a2 c_parser_declaration_or_fndef ../../gcc/c/c-parser.c:2038 0x6d3ea2 c_parser_compound_statement_nostart ../../gcc/c/c-parser.c:4831 0x6af37a c_parser_postfix_expression ../../gcc/c/c-parser.c:7665 0x6b939a c_parser_unary_expression ../../gcc/c/c-parser.c:7052 0x6ba1a7 c_parser_cast_expression ../../gcc/c/c-parser.c:6881 0x6ba3c2 c_parser_binary_expression ../../gcc/c/c-parser.c:6690 0x6bb0a5 c_parser_conditional_expression ../../gcc/c/c-parser.c:6458 0x6bb800 c_parser_expr_no_commas ../../gcc/c/c-parser.c:6375 0x6ccebe c_parser_direct_declarator_inner ../../gcc/c/c-parser.c:3591 0x6cea04 c_parser_declaration_or_fndef ../../gcc/c/c-parser.c:1797 0x6cf7ce c_parser_declaration_or_fndef ../../gcc/c/c-parser.c:2073 0x6d3ea2 c_parser_compound_statement_nostart ../../gcc/c/c-parser.c:4831 0x6d44ce c_parser_compound_statement ../../gcc/c/c-parser.c:4740 0x6cf90c c_parser_declaration_or_fndef ../../gcc/c/c-parser.c:2112 0x6d791b c_parser_external_declaration ../../gcc/c/c-parser.c:1468 0x6d8379 c_parser_translation_unit ../../gcc/c/c-parser.c:1348 0x6d8379 c_parse_file() ../../gcc/c/c-parser.c:18185 0x736892 c_common_parse_file() ../../gcc/c-family/c-opts.c:1107
[Bug fortran/78866] ICE in gimplify_adjust_omp_clauses_1, at gimplify.c:8721
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78866 --- Comment #1 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- Older versions down to at least 5.4.1 give : $ gfortran-7-20161023 -fopenmp -c z1.f90 z1.f90:4:0: !$omp target internal compiler error: Segmentation fault 0xc32b7f crash_signal ../../gcc/toplev.c:338 0x957a20 contains_struct_check(tree_node*, tree_node_structure_enum, char const*, int, char const*) ../../gcc/tree.h:3154 0x957a20 fold_convert_loc(unsigned int, tree_node*, tree_node*) ../../gcc/fold-const.c:2213 0xb2c8e7 lower_omp_target ../../gcc/omp-low.c:16209 0xb2c8e7 lower_omp_1 ../../gcc/omp-low.c:17084 0xb2c8e7 lower_omp ../../gcc/omp-low.c:17177 0xb2abec lower_omp_1 ../../gcc/omp-low.c:17025 0xb2abec lower_omp ../../gcc/omp-low.c:17177 0xb38f8a lower_omp_taskreg ../../gcc/omp-low.c:15659 0xb2aee6 lower_omp_1 ../../gcc/omp-low.c:17033 0xb2aee6 lower_omp ../../gcc/omp-low.c:17177 0xb2abec lower_omp_1 ../../gcc/omp-low.c:17025 0xb2abec lower_omp ../../gcc/omp-low.c:17177 0xb31dcf execute_lower_omp ../../gcc/omp-low.c:17912 0xb31dcf execute ../../gcc/omp-low.c:17949
[Bug fortran/78866] New: ICE in gimplify_adjust_omp_clauses_1, at gimplify.c:8721
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78866 Bug ID: 78866 Summary: ICE in gimplify_adjust_omp_clauses_1, at gimplify.c:8721 Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- Follow-up of pr77973 : $ cat z1.f90 subroutine s(x) integer :: x(*) !$omp parallel !$omp target x(1) = 1 !$omp end target !$omp end parallel end $ gfortran-7-20161218 -fopenmp -c z1.f90 z1.f90:4:0: !$omp target internal compiler error: Segmentation fault 0xc513cf crash_signal ../../gcc/toplev.c:333 0x9e6ab1 gimplify_adjust_omp_clauses_1 ../../gcc/gimplify.c:8721 0x148d28e splay_tree_foreach_helper ../../libiberty/splay-tree.c:242 0x148d28e splay_tree_foreach ../../libiberty/splay-tree.c:566 0x9d4e07 gimplify_adjust_omp_clauses ../../gcc/gimplify.c:9130 0x9f3909 gimplify_omp_workshare ../../gcc/gimplify.c:10528 0x9d85ba gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc/gimplify.c:11682 0x9dcef6 gimplify_stmt(tree_node**, gimple**) ../../gcc/gimplify.c:6460 0x9de1dd gimplify_bind_expr ../../gcc/gimplify.c:1277 0x9d98ed gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc/gimplify.c:11384 0x9dcef6 gimplify_stmt(tree_node**, gimple**) ../../gcc/gimplify.c:6460 0x9de1dd gimplify_bind_expr ../../gcc/gimplify.c:1277 0x9d98ed gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc/gimplify.c:11384 0x9dcef6 gimplify_stmt(tree_node**, gimple**) ../../gcc/gimplify.c:6460 0x9db735 gimplify_and_add(tree_node*, gimple**) ../../gcc/gimplify.c:435 0x9db735 gimplify_and_return_first ../../gcc/gimplify.c:447 0x9db735 gimplify_omp_parallel ../../gcc/gimplify.c:9287 0x9db735 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc/gimplify.c:11644 0x9dcef6 gimplify_stmt(tree_node**, gimple**) ../../gcc/gimplify.c:6460 0x9de1dd gimplify_bind_expr ../../gcc/gimplify.c:1277
[Bug fortran/78865] New: ICE in create_tmp_var, at gimple-expr.c:473
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78865 Bug ID: 78865 Summary: ICE in create_tmp_var, at gimple-expr.c:473 Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- Affects version 7 down to at least 4.8, at -Os, -O2 or higher : $ cat z1.f90 program p call sub (3) end subroutine sub (x) integer :: x, i, n do i = 1, x if ( n /= 0 ) stop call sub2 end do print *, x, n end subroutine sub2 call sub (*99) 99 stop end $ gfortran-7-20161218 -O2 z1.f90 z1.f90:3:0: end internal compiler error: in create_tmp_var, at gimple-expr.c:473 0x9acb93 create_tmp_var(tree_node*, char const*) ../../gcc/gimple-expr.c:473 0x9acbb8 create_tmp_reg(tree_node*, char const*) ../../gcc/gimple-expr.c:489 0x1369556 split_function ../../gcc/ipa-split.c:1664 0x1369556 execute_split_functions ../../gcc/ipa-split.c:1865
[Bug fortran/78864] ICE in dtio_procs_present, at fortran/resolve.c:13819
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78864 --- Comment #1 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- Older versions give : $ gfortran-7-20160828 z1.f90 z1.f90:5:16: namelist /nml/ x 1 Error: NAMELIST object 'x' in namelist 'nml' at (1) is polymorphic and requires a defined input/output procedure z1.f90:4:16: class(t) :: x 1 Error: CLASS variable 'x' at (1) must be dummy, allocatable or pointer
[Bug fortran/78864] New: ICE in dtio_procs_present, at fortran/resolve.c:13819
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78864 Bug ID: 78864 Summary: ICE in dtio_procs_present, at fortran/resolve.c:13819 Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- Invalid code affects version 7 since about 20160904 : $ cat z1.f90 program p type t end type class(t) :: x namelist /nml/ x end $ gfortran-7-20161218 z1.f90 f951: internal compiler error: Segmentation fault 0xc513cf crash_signal ../../gcc/toplev.c:333 0x5e256d dtio_procs_present ../../gcc/fortran/resolve.c:13819 0x70083b resolve_fl_namelist ../../gcc/fortran/resolve.c:13869 0x70083b resolve_symbol ../../gcc/fortran/resolve.c:14703 0x71a01b do_traverse_symtree ../../gcc/fortran/symbol.c:3986 0x70307a resolve_types ../../gcc/fortran/resolve.c:15976 0x6febdc gfc_resolve(gfc_namespace*) ../../gcc/fortran/resolve.c:16089 0x6e8eca resolve_all_program_units ../../gcc/fortran/parse.c:5947 0x6e8eca gfc_parse_file() ../../gcc/fortran/parse.c:6194 0x72ced2 gfc_be_parse_file ../../gcc/fortran/f95-lang.c:202
[Bug fortran/78815] ICE: segfault with -fopenmp -fsanitize=address
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78815 --- Comment #1 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- This concerns several files from testsuite/gfortran.dg : goacc/default_none.f95 goacc/kernels-alias-4.f95 goacc/kernels-loop-2.f95 goacc/kernels-loop-data-2.f95 goacc/kernels-loop-data-enter-exit-2.f95 goacc/kernels-loop-data-enter-exit.f95 goacc/kernels-loop-data.f95 goacc/kernels-loop-data-update.f95 goacc/kernels-loop.f95 goacc/kernels-loop-n.f95 gomp/gridify-1.f90 gomp/pr69281.f90 gomp/pr71758.f90 gomp/pr77973.f90 gomp/target1.f90
[Bug fortran/78815] New: ICE: segfault with -fopenmp -fsanitize=address
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78815 Bug ID: 78815 Summary: ICE: segfault with -fopenmp -fsanitize=address Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- Follow-up of pr77973, since about 20161113. An example with an automatic explicit-shape array : $ cat z1.f90 subroutine s(n) integer :: i, n, z(n) !$omp target !$omp parallel do do i = 1, n z(i) = 1 end do !$omp end target end $ gfortran-7-20161211 -fsanitize=address -fopenmp -c z1.f90 f951: internal compiler error: Segmentation fault 0xc4e79f crash_signal ../../gcc/toplev.c:333 0x9f8a7e hash_table<default_hash_traits<tree_node*>, xcallocator>::find_slot_with_hash(tree_node* const&, unsigned int, insert_option) ../../gcc/hash-table.h:859 0x9e7d98 hash_set<tree_node*, default_hash_traits<tree_node*> >::add(tree_node* const&) ../../gcc/hash-set.h:47 0x9e7d98 gimplify_decl_expr ../../gcc/gimplify.c:1630 0x9d87da gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc/gimplify.c:11379 0x9db806 gimplify_stmt(tree_node**, gimple**) ../../gcc/gimplify.c:6459 0x9db852 gimplify_and_add(tree_node*, gimple**) ../../gcc/gimplify.c:434 0x9f935a force_gimple_operand_1(tree_node*, gimple**, bool (*)(tree_node*), tree_node*) ../../gcc/gimplify-me.c:73 0xb485ff lower_omp_target ../../gcc/omp-low.c:16846 0xb485ff lower_omp_1 ../../gcc/omp-low.c:17521 0xb485ff lower_omp ../../gcc/omp-low.c:17614 0xb4333c lower_omp_1 ../../gcc/omp-low.c:17453 0xb4333c lower_omp ../../gcc/omp-low.c:17614 0xb43cec lower_omp_1 ../../gcc/omp-low.c:17462 0xb43cec lower_omp ../../gcc/omp-low.c:17614 0xb4af5f execute_lower_omp ../../gcc/omp-low.c:18983 0xb4af5f execute ../../gcc/omp-low.c:19020
[Bug fortran/78814] New: ICE in symbol_rank, at fortran/interface.c:1265
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78814 Bug ID: 78814 Summary: ICE in symbol_rank, at fortran/interface.c:1265 Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- With invalid code, down to at least 4.8 : (bailed out with official releases 5, 6) $ cat z1.f90 program p class(*) :: x print *, f(x) end $ cat z2.f90 program p class(*) :: x x = f(x) end $ gfortran-7-20161211 -c z1.f90 z1.f90:2:16: class(*) :: x 1 Error: CLASS variable 'x' at (1) must be dummy, allocatable or pointer f951: internal compiler error: Segmentation fault 0xc4e79f crash_signal ../../gcc/toplev.c:333 0x6a07d3 symbol_rank ../../gcc/fortran/interface.c:1265 0x6a07d3 gfc_procedure_use(gfc_symbol*, gfc_actual_arglist**, locus*) ../../gcc/fortran/interface.c:3642 0x6f4764 resolve_unknown_f ../../gcc/fortran/resolve.c:2740 0x6f4764 resolve_function ../../gcc/fortran/resolve.c:3024 0x6f4dda gfc_resolve_expr(gfc_expr*) ../../gcc/fortran/resolve.c:6471 0x6fb3f2 gfc_resolve_code(gfc_code*, gfc_namespace*) ../../gcc/fortran/resolve.c:10807 0x6fb0c7 gfc_resolve_blocks(gfc_code*, gfc_namespace*) ../../gcc/fortran/resolve.c:9854 0x6fb4fb gfc_resolve_code(gfc_code*, gfc_namespace*) ../../gcc/fortran/resolve.c:10797 0x6fdee2 resolve_codes ../../gcc/fortran/resolve.c:16056 0x6fdfde gfc_resolve(gfc_namespace*) ../../gcc/fortran/resolve.c:16091 0x6e82ba resolve_all_program_units ../../gcc/fortran/parse.c:5947 0x6e82ba gfc_parse_file() ../../gcc/fortran/parse.c:6194 0x72c312 gfc_be_parse_file ../../gcc/fortran/f95-lang.c:202
[Bug fortran/78801] ICE in estimate_move_cost, at tree-inline.c:3845
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78801 --- Comment #1 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- With option -O0 : $ gfortran-7-20161211 -O0 -c z1.f90 z1.f90:2:0: character(8) :: g internal compiler error: in convert_move, at expr.c:228 0x92d1ec convert_move(rtx_def*, rtx_def*, int) ../../gcc/expr.c:228 0x92d28a convert_modes(machine_mode, machine_mode, rtx_def*, int) ../../gcc/expr.c:684 0x985967 assign_parm_setup_stack ../../gcc/function.c:3430 0x98bc78 assign_parms ../../gcc/function.c:3785 0x98e74b expand_function_start(tree_node*) ../../gcc/function.c:5220 0x824765 execute ../../gcc/cfgexpand.c:6248
[Bug fortran/78801] New: ICE in estimate_move_cost, at tree-inline.c:3845
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78801 Bug ID: 78801 Summary: ICE in estimate_move_cost, at tree-inline.c:3845 Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- With invalid code, down to at least 4.8 : $ cat z1.f90 function f() character(8) :: g entry g() result(z) end $ gfortran-7-20161211 -O2 -c z1.f90 z1.f90:4:0: end internal compiler error: in estimate_move_cost, at tree-inline.c:3845 0xcc3ea3 estimate_move_cost(tree_node*, bool) ../../gcc/tree-inline.c:3845 0xa727ad ipa_populate_param_decls ../../gcc/ipa-prop.c:142 0xa8057a ipa_initialize_node_params(cgraph_node*) ../../gcc/ipa-prop.c:202 0xa696cd estimate_function_body_sizes ../../gcc/ipa-inline-analysis.c:2554 0xa6c196 compute_inline_parameters(cgraph_node*, bool) ../../gcc/ipa-inline-analysis.c:3027 0xa6c568 compute_inline_parameters_for_current ../../gcc/ipa-inline-analysis.c:3055 0xa6c568 execute ../../gcc/ipa-inline-analysis.c:3085
[Bug fortran/78800] New: ICE in compare_parameter, at fortran/interface.c:2246
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78800 Bug ID: 78800 Summary: ICE in compare_parameter, at fortran/interface.c:2246 Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- With invalid code, down to at least 4.8 : (bailed out with official releases 5, 6) $ cat z1.f90 program p type t end type class(*) :: z call s(z) contains subroutine s(x) type(t) :: x end end $ gfortran-7-20161211 z1.f90 z1.f90:4:16: class(*) :: z 1 Error: CLASS variable 'z' at (1) must be dummy, allocatable or pointer f951: internal compiler error: Segmentation fault 0xc4e79f crash_signal ../../gcc/toplev.c:333 0x69dc54 compare_parameter ../../gcc/fortran/interface.c:2246 0x69e57b compare_actual_formal ../../gcc/fortran/interface.c:2916 0x6a068d gfc_procedure_use(gfc_symbol*, gfc_actual_arglist**, locus*) ../../gcc/fortran/interface.c:3655 0x6fe985 resolve_specific_s0 ../../gcc/fortran/resolve.c:3298 0x6fe985 resolve_specific_s ../../gcc/fortran/resolve.c:3318 0x6fe985 resolve_call ../../gcc/fortran/resolve.c:3472 0x6fb8c9 gfc_resolve_code(gfc_code*, gfc_namespace*) ../../gcc/fortran/resolve.c:11010 0x6fdee2 resolve_codes ../../gcc/fortran/resolve.c:16056 0x6fdfde gfc_resolve(gfc_namespace*) ../../gcc/fortran/resolve.c:16091 0x6e82ba resolve_all_program_units ../../gcc/fortran/parse.c:5947 0x6e82ba gfc_parse_file() ../../gcc/fortran/parse.c:6194 0x72c312 gfc_be_parse_file ../../gcc/fortran/f95-lang.c:202
[Bug fortran/78781] New: ICE in gfc_deallocate_scalar_with_status, at fortran/trans.c:1588
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78781 Bug ID: 78781 Summary: ICE in gfc_deallocate_scalar_with_status, at fortran/trans.c:1588 Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- Since recently : $ cat z1.f90 module m type t class(t), pointer :: z end type contains function f(x) class(t) :: x[*] if ( associated(x%z) ) deallocate(x%z) end end $ gfortran-7-20161211 -fcoarray=lib -c z1.f90 z1.f90:8:0: if ( associated(x%z) ) deallocate(x%z) internal compiler error: in gfc_deallocate_scalar_with_status, at fortran/trans.c:1588 0x734160 gfc_deallocate_scalar_with_status(tree_node*, tree_node*, tree_node*, bool, gfc_expr*, gfc_typespec, bool) ../../gcc/fortran/trans.c:1588 0x7bf82c gfc_trans_deallocate(gfc_code*) ../../gcc/fortran/trans-stmt.c:6558 0x72f587 trans_code ../../gcc/fortran/trans.c:1970 0x7b1dc3 gfc_trans_if_1 ../../gcc/fortran/trans-stmt.c:1303 0x7b977a gfc_trans_if(gfc_code*) ../../gcc/fortran/trans-stmt.c:1334 0x72f677 trans_code ../../gcc/fortran/trans.c:1906 0x760568 gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6307 0x7344d9 gfc_generate_module_code(gfc_namespace*) ../../gcc/fortran/trans.c:2192 0x6e83bd translate_all_program_units ../../gcc/fortran/parse.c:5995 0x6e83bd gfc_parse_file() ../../gcc/fortran/parse.c:6208 0x72c312 gfc_be_parse_file ../../gcc/fortran/f95-lang.c:202
[Bug fortran/78780] New: ICE in conv_caf_send, at fortran/trans-intrinsic.c:1936
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78780 Bug ID: 78780 Summary: ICE in conv_caf_send, at fortran/trans-intrinsic.c:1936 Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- Since recently, with a case from testsuite/gfortran.dg : $ gfortran-7-20161211 -fcoarray=lib coarray_allocate_1.f90 coarray_allocate_1.f90:64:0: D%endsi(nxims) = D%n internal compiler error: in conv_caf_send, at fortran/trans-intrinsic.c:1936 0x78ba7a conv_caf_send ../../gcc/fortran/trans-intrinsic.c:1936 0x793493 gfc_conv_intrinsic_subroutine(gfc_code*) ../../gcc/fortran/trans-intrinsic.c:10586 0x77a5f4 gfc_trans_assignment_1 ../../gcc/fortran/trans-expr.c:9972 0x72f817 trans_code ../../gcc/fortran/trans.c:1818 0x760568 gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6307 0x6e8490 translate_all_program_units ../../gcc/fortran/parse.c:6008 0x6e8490 gfc_parse_file() ../../gcc/fortran/parse.c:6208 0x72c312 gfc_be_parse_file ../../gcc/fortran/f95-lang.c:202 Reduced : program Jac type Domain integer :: n=64 integer,allocatable :: endsi(:) end type type(Domain),allocatable :: D[:,:,:] allocate(D[2,2,*]) allocate(D%endsi(2)) D%endsi(2) = D%n end program
[Bug fortran/68568] ICE with automatic character object and save, in combination with some options
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68568 --- Comment #7 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- Update for both backtraces : $ gfortran-7-20161211 -finit-local-zero -c z1a.f90 z1a.f90:1:0: subroutine s(n) internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.c:1739 0x75c147 gfc_get_symbol_decl(gfc_symbol*) ../../gcc/fortran/trans-decl.c:1739 0x75f427 generate_local_decl ../../gcc/fortran/trans-decl.c:5363 0x71942b do_traverse_symtree ../../gcc/fortran/symbol.c:3986 0x760272 generate_local_vars ../../gcc/fortran/trans-decl.c:5563 0x760272 gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6242 0x6e8490 translate_all_program_units ../../gcc/fortran/parse.c:6008 0x6e8490 gfc_parse_file() ../../gcc/fortran/parse.c:6208 0x72c312 gfc_be_parse_file ../../gcc/fortran/f95-lang.c:202 $ gfortran-7-20161211 -Wall -finit-local-zero -c z1a.f90 f951: internal compiler error: Segmentation fault 0xc4e79f crash_signal ../../gcc/toplev.c:333 0x6ec456 gfc_variable_attr(gfc_expr*, gfc_typespec*) ../../gcc/fortran/primary.c:2273 0x6ec7df gfc_expr_attr(gfc_expr*) ../../gcc/fortran/primary.c:2409 0x695e43 gfc_check_assign(gfc_expr*, gfc_expr*, int, bool) ../../gcc/fortran/expr.c:3237 0x698c89 gfc_check_assign_symbol(gfc_symbol*, gfc_component*, gfc_expr*) ../../gcc/fortran/expr.c:3876 0x71942b do_traverse_symtree ../../gcc/fortran/symbol.c:3986 0x7025d9 resolve_types ../../gcc/fortran/resolve.c:15994 0x6fdfcc gfc_resolve(gfc_namespace*) ../../gcc/fortran/resolve.c:16089 0x6e82ba resolve_all_program_units ../../gcc/fortran/parse.c:5947 0x6e82ba gfc_parse_file() ../../gcc/fortran/parse.c:6194 0x72c312 gfc_be_parse_file ../../gcc/fortran/f95-lang.c:202
[Bug fortran/66544] [F03] ICE on function with procedure-pointer result in combination with implicit none
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66544 --- Comment #9 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- Frankly speaking, it's difficile. Smells more invalid than valid. As a side note, I do not have any production code using a contruct similar to that in comment 0 or in recursive_interface_*. Still affects some examples from testsuite/gfortran.dg : - data_value_1.f90 - recursive_interface_1.f90 - recursive_interface_2.f90 $ gfortran-7-20161204 -c recursive_interface_1.f90 $ gfortran-7-20161204 -fimplicit-none -c recursive_interface_1.f90 recursive_interface_1.f90:16:0: function baz() result(r3) internal compiler error: in gfc_typenode_for_spec, at fortran/trans-types.c:1064 0x7c7b83 gfc_typenode_for_spec(gfc_typespec*, bool) ../../gcc/fortran/trans-types.c:1064 0x7c5c03 gfc_sym_type(gfc_symbol*) ../../gcc/fortran/trans-types.c:2167 0x7c670b gfc_get_function_type(gfc_symbol*) ../../gcc/fortran/trans-types.c:3030 0x7c68bc gfc_get_function_type(gfc_symbol*) ../../gcc/fortran/trans-types.c:3023 0x75130f build_function_decl ../../gcc/fortran/trans-decl.c:2157 0x75674b gfc_create_function_decl(gfc_namespace*, bool) ../../gcc/fortran/trans-decl.c:2833 0x733137 gfc_generate_module_code(gfc_namespace*) ../../gcc/fortran/trans.c:2149 0x6e72fd translate_all_program_units ../../gcc/fortran/parse.c:6025 0x6e72fd gfc_parse_file() ../../gcc/fortran/parse.c:6238 0x72b182 gfc_be_parse_file ../../gcc/fortran/f95-lang.c:202
[Bug fortran/78741] New: ICE in gfc_get_symbol_decl, at fortran/trans-decl.c:1534
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78741 Bug ID: 78741 Summary: ICE in gfc_get_symbol_decl, at fortran/trans-decl.c:1534 Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- With invalid code (symbol "g" name clash), down to at least 4.8. $ cat z1.f90 subroutine s(n, x) integer :: n character(n) :: x character, pointer :: z(:) x = 'a' return entry g(n, x) x = 'b' contains subroutine g z(1) = x(1:1) end end $ gfortran-7-20161204 -c z1.f90 z1.f90:11:0: z(1) = x(1:1) internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.c:1534 0x75b49a gfc_get_symbol_decl(gfc_symbol*) ../../gcc/fortran/trans-decl.c:1533 0x7731af gfc_conv_variable ../../gcc/fortran/trans-expr.c:2494 0x76ee42 gfc_conv_expr(gfc_se*, gfc_expr*) ../../gcc/fortran/trans-expr.c:7771 0x7789e2 gfc_trans_assignment_1 ../../gcc/fortran/trans-expr.c:9821 0x72e687 trans_code ../../gcc/fortran/trans.c:1790 0x75f708 gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6271 0x75f557 gfc_generate_contained_functions ../../gcc/fortran/trans-decl.c:5251 0x75f557 gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6200 0x6e73d0 translate_all_program_units ../../gcc/fortran/parse.c:6038 0x6e73d0 gfc_parse_file() ../../gcc/fortran/parse.c:6238 0x72b182 gfc_be_parse_file ../../gcc/fortran/f95-lang.c:202
[Bug fortran/78739] New: ICE in gfc_get_symbol_decl, at fortran/trans-decl.c:1477
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78739 Bug ID: 78739 Summary: ICE in gfc_get_symbol_decl, at fortran/trans-decl.c:1477 Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- A tiny snippet of _invalid_ code, ICEs down to at least 4.8. Backtrace similar to that of pr68846 comment 4 and pr70864 comment 3. $ cat z1.f90 function f(n) f() = n end $ gfortran-7-20161204 -c z1.f90 z1.f90:1:0: function f(n) internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.c:1477 0x75a352 gfc_get_symbol_decl(gfc_symbol*) ../../gcc/fortran/trans-decl.c:1477 0x75e5b7 generate_local_decl ../../gcc/fortran/trans-decl.c:5327 0x71825b do_traverse_symtree ../../gcc/fortran/symbol.c:3994 0x75f412 generate_local_vars ../../gcc/fortran/trans-decl.c:5527 0x75f412 gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6206 0x6e73d0 translate_all_program_units ../../gcc/fortran/parse.c:6038 0x6e73d0 gfc_parse_file() ../../gcc/fortran/parse.c:6238 0x72b182 gfc_be_parse_file ../../gcc/fortran/f95-lang.c:202
[Bug fortran/68225] ICE with -Wrealloc-lhs-all on structure constructor with allocatable scalar component(s)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68225 --- Comment #8 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- Addendum : $ cat zzp.f90 program p type t integer :: a character(:), allocatable :: c end type type(t) :: x x = t(a=1) ; print *, x%a, x%c x = t(a=2, c=null()) ; print *, x%a, x%c x = t(c=null(), a=3) ; print *, x%a, x%c x = t(a=4, c='c4') ; print *, x%a, x%c x = t(a=5) ; print *, x%a, x%c x = t(6, 'c6') ; print *, x%a, x%c x = t(c='c7', a=7) ; print *, x%a, x%c x = t(c=null(), a=8) ; print *, x%a, x%c x = t(9, c='c9') ; print *, x%a, x%c x = t(10, null()); print *, x%a, x%c x = t(11, 'c11') ; print *, x%a, x%c x = t(12); print *, x%a, x%c end $ gfortran-7-20161204 -O2 zzp.f90 $ a.out 1 2 3 4 c4 5 6 c6 7 c7 8 9 c9 10 11 c11 12 Compiling with -O0 or -Og : $ gfortran-7-20161204 -g -O0 -Wall -fcheck=all zzp.f90 $ a.out 1 2 Program received signal SIGSEGV: Segmentation fault - invalid memory reference. Backtrace for this error: #0 0x2ad486c4711f in ??? #1 0x2ad486ca38ee in ??? #2 0x410f1a in list_formatted_write_scalar at ../../../libgfortran/io/write.c:1887 #3 0x4023d7 in p at .../zzp.f90:9 #4 0x402e53 in main at .../zzp.f90:19 Segmentation fault
[Bug fortran/68241] [meta-bug] [F03] Deferred-length character
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68241 Bug 68241 depends on bug 68439, which changed state. Bug 68439 Summary: ICE in alloc_scalar_allocatable_for_subcomponent_assignment, at fortran/trans-expr.c:6711 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68439 What|Removed |Added Status|NEW |RESOLVED Resolution|--- |DUPLICATE
[Bug fortran/68225] ICE with -Wrealloc-lhs-all on structure constructor with allocatable scalar component(s)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68225 --- Comment #7 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- *** Bug 68439 has been marked as a duplicate of this bug. ***
[Bug fortran/68439] ICE in alloc_scalar_allocatable_for_subcomponent_assignment, at fortran/trans-expr.c:6711
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68439 Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |DUPLICATE --- Comment #4 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- Should compile with no error, it's legal F2008 : If an allocatable component has no corresponding component-data-source, then that component has an allocation status of unallocated. Because this ICE is gone and runtime behaviour is similar to that described in pr68225, it can now be regarded as a subcase/duplicate. *** This bug has been marked as a duplicate of bug 68225 ***
[Bug fortran/69860] ICE on missing end apostrophe with character(kind=4)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69860 --- Comment #15 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- Confirmed, this ICE is now completely gone on my environment.
[Bug fortran/78719] ICE in gfc_get_symbol_decl, at fortran/trans-decl.c:1438
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78719 --- Comment #2 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- Interestingly, following invalid variant with "type(t)" is silently accepted and gives same results as z0.f90 in comment 1. $ cat z2.f90 program p type t integer :: n end type type(t) :: g !! abstract interface subroutine h end end interface procedure(h), pointer :: s s => f call s s => g call s contains subroutine f print *, 'inside f' end subroutine g print *, 'inside g' end end $ gfortran-7-20161204 z2.f90 $ a.out inside f inside g
[Bug fortran/78719] ICE in gfc_get_symbol_decl, at fortran/trans-decl.c:1438
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78719 --- Comment #1 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- Detected with type "real" instead of "class(t)" : $ cat z3.f90 program p type t integer :: n end type real :: g !! abstract interface subroutine h end end interface procedure(h), pointer :: s s => f call s s => g call s contains subroutine f print *, 'inside f' end subroutine g print *, 'inside g' end end $ gfortran-7-20161204 z3.f90 z3.f90:19:15: z3.f90:5:12: real :: g !! 2 z3.f90:19:15: subroutine g 1 Error: Procedure 'g' at (1) has an explicit interface and must not have attributes declared at (2) --- Deleting that extra line gives a valid and correct program : $ cat z0.f90 program p type t integer :: n end type abstract interface subroutine h end end interface procedure(h), pointer :: s s => f call s s => g call s contains subroutine f print *, 'inside f' end subroutine g print *, 'inside g' end end $ gfortran-7-20161204 z0.f90 $ a.out inside f inside g
[Bug fortran/68569] ICE with automatic character object and DATA
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68569 --- Comment #2 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- Update, backtrace : $ gfortran-7-20161204 -c z2a.f90 z2a.f90:4:12: data x /'a'/ 1 Warning: Initialization string at (1) was truncated to fit the variable (0/1) z2a.f90:1:0: subroutine s(n) internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.c:1705 0x75b6f5 gfc_get_symbol_decl(gfc_symbol*) ../../gcc/fortran/trans-decl.c:1705 0x75e5b7 generate_local_decl ../../gcc/fortran/trans-decl.c:5327 0x71825b do_traverse_symtree ../../gcc/fortran/symbol.c:3994 0x75f412 generate_local_vars ../../gcc/fortran/trans-decl.c:5527 0x75f412 gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6206 0x6e73d0 translate_all_program_units ../../gcc/fortran/parse.c:6038 0x6e73d0 gfc_parse_file() ../../gcc/fortran/parse.c:6238 0x72b182 gfc_be_parse_file ../../gcc/fortran/f95-lang.c:202
[Bug fortran/78719] New: ICE in gfc_get_symbol_decl, at fortran/trans-decl.c:1438
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78719 Bug ID: 78719 Summary: ICE in gfc_get_symbol_decl, at fortran/trans-decl.c:1438 Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- With invalid code (due to an extra declaration flagged with "!!"), down to at least 4.8 : $ cat z1.f90 program p type t integer :: n end type class(t) :: g !! abstract interface subroutine h end end interface procedure(h), pointer :: s s => f call s s => g call s contains subroutine f print *, 'inside f' end subroutine g print *, 'inside g' end end $ gfortran-7-20161204 z1.f90 z1.f90:13:0: s => g internal compiler error: Segmentation fault 0xc4940f crash_signal ../../gcc/toplev.c:333 0x75a0e9 gfc_get_symbol_decl(gfc_symbol*) ../../gcc/fortran/trans-decl.c:1438 0x7731af gfc_conv_variable ../../gcc/fortran/trans-expr.c:2494 0x76ee42 gfc_conv_expr(gfc_se*, gfc_expr*) ../../gcc/fortran/trans-expr.c:7771 0x77bc97 gfc_trans_pointer_assignment(gfc_expr*, gfc_expr*) ../../gcc/fortran/trans-expr.c:8169 0x72e667 trans_code ../../gcc/fortran/trans.c:1798 0x75f708 gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6271 0x6e73d0 translate_all_program_units ../../gcc/fortran/parse.c:6038 0x6e73d0 gfc_parse_file() ../../gcc/fortran/parse.c:6238 0x72b182 gfc_be_parse_file ../../gcc/fortran/f95-lang.c:202
[Bug fortran/78718] New: ICE in gfc_get_symbol_decl, at fortran/trans-decl.c:1427
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78718 Bug ID: 78718 Summary: ICE in gfc_get_symbol_decl, at fortran/trans-decl.c:1427 Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- Affects versions down to at least 4.8 : $ cat z1.f90 program p integer :: n, z n = 1 contains function f() result(z) call s(n, z) end end $ gfortran-7-20161204 z1.f90 z1.f90:6:0: call s(n, z) internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.c:1427 0x75a05e gfc_get_symbol_decl(gfc_symbol*) ../../gcc/fortran/trans-decl.c:1421 0x7731af gfc_conv_variable ../../gcc/fortran/trans-expr.c:2494 0x76ee42 gfc_conv_expr(gfc_se*, gfc_expr*) ../../gcc/fortran/trans-expr.c:7771 0x776f56 gfc_conv_expr_reference(gfc_se*, gfc_expr*) ../../gcc/fortran/trans-expr.c:7871 0x76a420 gfc_conv_procedure_call(gfc_se*, gfc_symbol*, gfc_actual_arglist*, gfc_expr*, vec<tree_node*, va_gc, vl_embed>*) ../../gcc/fortran/trans-expr.c:5169 0x7b4704 gfc_trans_call(gfc_code*, bool, tree_node*, tree_node*, bool) ../../gcc/fortran/trans-stmt.c:407 0x72e6ca trans_code ../../gcc/fortran/trans.c:1858 0x75f708 gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6271 0x75f557 gfc_generate_contained_functions ../../gcc/fortran/trans-decl.c:5251 0x75f557 gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6200 0x6e73d0 translate_all_program_units ../../gcc/fortran/parse.c:6038 0x6e73d0 gfc_parse_file() ../../gcc/fortran/parse.c:6238 0x72b182 gfc_be_parse_file ../../gcc/fortran/f95-lang.c:202
[Bug fortran/70149] [F08] Character pointer initialization causes ICE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70149 Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> changed: What|Removed |Added CC||gerhard.steinmetz.fortran@t ||-online.de --- Comment #5 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- This variant gives the same backtrace as in pr68569 comment 2 : $ cat z2.f90 program p character(16), target :: char_data = 'forty two' character(:), pointer :: x => char_data print *, len(x), x end $ gfortran-7-20161204 z2.f90 z2.f90:1:0: program p internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.c:1705 0x75b6f5 gfc_get_symbol_decl(gfc_symbol*) ../../gcc/fortran/trans-decl.c:1705 0x75e5b7 generate_local_decl ../../gcc/fortran/trans-decl.c:5327 0x71825b do_traverse_symtree ../../gcc/fortran/symbol.c:3994 0x75f412 generate_local_vars ../../gcc/fortran/trans-decl.c:5527 0x75f412 gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6206 0x6e73d0 translate_all_program_units ../../gcc/fortran/parse.c:6038 0x6e73d0 gfc_parse_file() ../../gcc/fortran/parse.c:6238 0x72b182 gfc_be_parse_file ../../gcc/fortran/f95-lang.c:202
[Bug fortran/70864] internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.c:1403
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70864 --- Comment #4 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- Related to pr68846 (technically slightly different). Backtrace identical to that of pr68846 comment 3 etc.
[Bug fortran/68846] Pointer function as LValue doesn't work when the assignment regards a dummy argument.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68846 --- Comment #5 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- Related to pr70864 (technically slightly different). Backtrace identical to that of pr70864 comment 3.
[Bug fortran/68846] Pointer function as LValue doesn't work when the assignment regards a dummy argument.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68846 --- Comment #4 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- Further modified and reduced to a skeleton, i.e. : $ cat z3.f90 module m68846 type t contains procedure, nopass :: f => f1 end type contains function f1() result(p) real, pointer :: p end subroutine s3(z, value) type(t) :: z real, intent(in) :: value z%f() = value end end module $ cat z4.f90 module m68846 type t contains procedure, nopass :: f => f1 end type contains function f1() result(p) real, pointer :: p end subroutine s3(z, value) type(t) :: z real, intent(inout) :: value z%f() = value !! end end module $ gfortran-7-20161204 -c z3.f90 z3.f90:13:19: z%f() = value 1 Error: Dummy argument '_F.DA0' with INTENT(IN) in pointer association context (pointer assignment) at (1) $ gfortran-7-20161204 -c z4.f90 z4.f90:7:0: function f1() result(p) internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.c:1477 0x75a352 gfc_get_symbol_decl(gfc_symbol*) ../../gcc/fortran/trans-decl.c:1477 0x75e5b7 generate_local_decl ../../gcc/fortran/trans-decl.c:5327 0x71825b do_traverse_symtree ../../gcc/fortran/symbol.c:3994 0x75f412 generate_local_vars ../../gcc/fortran/trans-decl.c:5527 0x75f412 gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6206 0x7331f9 gfc_generate_module_code(gfc_namespace*) ../../gcc/fortran/trans.c:2164 0x6e72fd translate_all_program_units ../../gcc/fortran/parse.c:6025 0x6e72fd gfc_parse_file() ../../gcc/fortran/parse.c:6238 0x72b182 gfc_be_parse_file ../../gcc/fortran/f95-lang.c:202
[Bug fortran/68846] Pointer function as LValue doesn't work when the assignment regards a dummy argument.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68846 --- Comment #3 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- Both variants reduced and simplified a bit : $ cat z1.f90 module m68846 type grid_t real, pointer :: p(:) => null() end type type subgrid_t class(grid_t), pointer :: grd => null() contains procedure, pass :: jmp => lvalue_jmp end type contains function lvalue_jmp(hobj, i) result(p) class(subgrid_t), intent(inout) :: hobj integer, intent(in) :: i real, pointer :: p p => hobj%grd%p(i) end subroutine fillgeom_03(subgrid, value) type(subgrid_t), intent(inout) :: subgrid real, intent(in) :: value subgrid%jmp(1) = value end end module $ cat z2.f90 module m68846 type grid_t real, pointer :: p(:) => null() end type type subgrid_t class(grid_t), pointer :: grd => null() contains procedure, pass :: jmp => lvalue_jmp end type contains function lvalue_jmp(hobj, i) result(p) class(subgrid_t), intent(inout) :: hobj integer, intent(in) :: i real, pointer :: p p => hobj%grd%p(i) end subroutine fillgeom_03(subgrid, value) type(subgrid_t), intent(inout) :: subgrid real, intent(inout) :: value !! subgrid%jmp(1) = value end end module $ gfortran-7-20161204 -c z1.f90 z1.f90:20:26: subgrid%jmp(1) = value 1 Error: Dummy argument '_F.DA0' with INTENT(IN) in pointer association context (pointer assignment) at (1) $ gfortran-7-20161204 -c z2.f90 z2.f90:22:0: end module internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.c:1477 0x75a352 gfc_get_symbol_decl(gfc_symbol*) ../../gcc/fortran/trans-decl.c:1477 0x75e5b7 generate_local_decl ../../gcc/fortran/trans-decl.c:5327 0x71825b do_traverse_symtree ../../gcc/fortran/symbol.c:3994 0x75f412 generate_local_vars ../../gcc/fortran/trans-decl.c:5527 0x75f412 gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6206 0x7331f9 gfc_generate_module_code(gfc_namespace*) ../../gcc/fortran/trans.c:2164 0x6e72fd translate_all_program_units ../../gcc/fortran/parse.c:6025 0x6e72fd gfc_parse_file() ../../gcc/fortran/parse.c:6238 0x72b182 gfc_be_parse_file ../../gcc/fortran/f95-lang.c:202
[Bug fortran/68846] Pointer function as LValue doesn't work when the assignment regards a dummy argument.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68846 Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> changed: What|Removed |Added CC||gerhard.steinmetz.fortran@t ||-online.de --- Comment #2 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- Update, new backtrace : $ gfortran-7-20161204 -c pr68846_in.f90 pr68846_in.f90:61:32: subgrid%jmp(i,j) = value 1 Error: Dummy argument '_F.DA0' with INTENT(IN) in pointer association context (pointer assignment) at (1) $ gfortran-7-20161204 -c pr68846_inout.f90 pr68846_inout.f90:53:0: SUBROUTINE fillgeom_03( subgrid, value ) internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.c:1477 0x75a352 gfc_get_symbol_decl(gfc_symbol*) ../../gcc/fortran/trans-decl.c:1477 0x75e5b7 generate_local_decl ../../gcc/fortran/trans-decl.c:5327 0x71825b do_traverse_symtree ../../gcc/fortran/symbol.c:3994 0x75f412 generate_local_vars ../../gcc/fortran/trans-decl.c:5527 0x75f412 gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6206 0x7331f9 gfc_generate_module_code(gfc_namespace*) ../../gcc/fortran/trans.c:2164 0x6e72fd translate_all_program_units ../../gcc/fortran/parse.c:6025 0x6e72fd gfc_parse_file() ../../gcc/fortran/parse.c:6238 0x72b182 gfc_be_parse_file ../../gcc/fortran/f95-lang.c:202
[Bug fortran/72755] Internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.c:1369
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72755 --- Comment #10 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- Reduced source is nearly identical, backtrace completely identical to that of pr70864 comment 3.
[Bug fortran/70864] internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.c:1403
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70864 Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> changed: What|Removed |Added CC||gerhard.steinmetz.fortran@t ||-online.de --- Comment #3 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- Reduced and simplified a bit. $ cat pr70864_cm.f90 module m70864 type BoxArray contains procedure :: boxarray_assign generic :: assignment(=) => boxarray_assign end type type MultiFab type(BoxArray) :: ba end type contains subroutine boxarray_assign (dst, src) class(BoxArray), intent(inout) :: dst type (BoxArray), intent(in ) :: src end subroutine multifab_copy (mf1, mf2) type(MultiFab), intent(inout) :: mf1, mf2 mf2 = mf1 !! end end module $ gfortran-7-20161204 -c pr70864_cm.f90 pr70864_cm.f90:19:0: end module internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.c:1477 0x75a352 gfc_get_symbol_decl(gfc_symbol*) ../../gcc/fortran/trans-decl.c:1477 0x75e5b7 generate_local_decl ../../gcc/fortran/trans-decl.c:5327 0x71825b do_traverse_symtree ../../gcc/fortran/symbol.c:3994 0x75f412 generate_local_vars ../../gcc/fortran/trans-decl.c:5527 0x75f412 gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6206 0x7331f9 gfc_generate_module_code(gfc_namespace*) ../../gcc/fortran/trans.c:2164 0x6e72fd translate_all_program_units ../../gcc/fortran/parse.c:6025 0x6e72fd gfc_parse_file() ../../gcc/fortran/parse.c:6238 0x72b182 gfc_be_parse_file ../../gcc/fortran/f95-lang.c:202
[Bug fortran/72755] Internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.c:1369
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72755 Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> changed: What|Removed |Added CC||gerhard.steinmetz.fortran@t ||-online.de --- Comment #9 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- Reduced and simplified a bit more. Element "buffer" in "t_string" is not needed to produce the ICE, thus commented out. $ cat pr72755_c9.f90 module m72755 type t_string ! character(len=:), allocatable :: buffer contains procedure :: string_assign_from_string generic :: assignment(=) => string_assign_from_string end type type t_msg type(t_string) :: text end type contains subroutine string_assign_from_string( left, right ) class(t_string), intent(inout) :: left type(t_string), intent(in) :: right end subroutine subroutine messages_push_back( array, msg ) type(t_msg), allocatable, intent(inout) :: array(:) type(t_msg), intent(in) :: msg array(1) = msg !! end subroutine end module $ gfortran-7-20161204 -c pr72755_c9.f90 pr72755_c9.f90:21:0: end module internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.c:1477 0x75a352 gfc_get_symbol_decl(gfc_symbol*) ../../gcc/fortran/trans-decl.c:1477 0x75e5b7 generate_local_decl ../../gcc/fortran/trans-decl.c:5327 0x71825b do_traverse_symtree ../../gcc/fortran/symbol.c:3994 0x75f412 generate_local_vars ../../gcc/fortran/trans-decl.c:5527 0x75f412 gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6206 0x7331f9 gfc_generate_module_code(gfc_namespace*) ../../gcc/fortran/trans.c:2164 0x6e72fd translate_all_program_units ../../gcc/fortran/parse.c:6025 0x6e72fd gfc_parse_file() ../../gcc/fortran/parse.c:6238 0x72b182 gfc_be_parse_file ../../gcc/fortran/f95-lang.c:202
[Bug fortran/78686] ICE in gfc_apply_init, at fortran/expr.c:4124
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78686 --- Comment #1 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- Whereas, for example with "real" : $ cat z2.f90 program p type t real :: c(1) = [t()] end type end $ gfortran-7-20161204 z2.f90 z2.f90:3:20: real :: c(1) = [t()] 1 Error: Can't convert TYPE(t) to REAL(4) at (1)
[Bug fortran/68155] ICE on initializing character array in type (len_lhs <> len_rhs)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68155 --- Comment #7 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- Sequence changed, still ok : $ cat zz3.f90 program p character(3) :: c1(2) = ['b', 'c'] // '' character(3) :: c2(2) = ['b', 'c'] // 'a' character(3) :: c3(2) = ['b', 'c'] // 'ax' character(3) :: c4(2) = ['b', 'c'] // 'axy' print *, size(c1), len(c1), c1 print *, size(c2), len(c2), c2 print *, size(c3), len(c3), c3 print *, size(c4), len(c4), c4 end $ gfortran-7-20161204 zz3.f90 $ a.out 2 3 b c 2 3 ba ca 2 3 baxcax 2 3 baxcax --- Similar, embedded : $ cat zz4.f90 program p type t character(3) :: c1(2) = ['b', 'c'] // '' character(3) :: c2(2) = ['b', 'c'] // 'a' character(3) :: c3(2) = ['b', 'c'] // 'ax' character(3) :: c4(2) = ['b', 'c'] // 'axy' end type type(t) :: z print *, size(z%c1), len(z%c1), z%c1 print *, size(z%c2), len(z%c2), z%c2 print *, size(z%c3), len(z%c3), z%c3 print *, size(z%c4), len(z%c4), z%c4 end $ gfortran-7-20161204 zz4.f90 zz4.f90:13:0: end internal compiler error: in output_constructor_regular_field, at varasm.c:5017 0xf3fcc4 output_constructor_regular_field ../../gcc/varasm.c:5017 0xf3fcc4 output_constructor ../../gcc/varasm.c:5325 0xf3e7c1 output_constant ../../gcc/varasm.c:4702 0xf3e7c1 output_constructor_regular_field ../../gcc/varasm.c:5055 0xf3e7c1 output_constructor ../../gcc/varasm.c:5325 0xf40064 output_constant ../../gcc/varasm.c:4702 0xf40064 assemble_variable_contents ../../gcc/varasm.c:2083 0xf479c9 assemble_variable(tree_node*, int, int, int) ../../gcc/varasm.c:2259 0xf4d1e8 varpool_node::assemble_decl() ../../gcc/varpool.c:588 0xf4de75 varpool_node::assemble_decl() ../../gcc/cgraph.h:2631 0xf4de75 symbol_table::output_variables() ../../gcc/varpool.c:754 0x855a77 symbol_table::compile() ../../gcc/cgraphunit.c:2495 0x857ea2 symbol_table::compile() ../../gcc/cgraphunit.c:2558 0x857ea2 symbol_table::finalize_compilation_unit() ../../gcc/cgraphunit.c:2584
[Bug fortran/78686] New: ICE in gfc_apply_init, at fortran/expr.c:4124
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78686 Bug ID: 78686 Summary: ICE in gfc_apply_init, at fortran/expr.c:4124 Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- With invalid code, down to at least 4.8 : $ cat z1.f90 program p type t character :: c(1) = [t()] end type end $ gfortran-7-20161204 z1.f90 f951: internal compiler error: in gfc_apply_init, at fortran/expr.c:4124 0x6911be gfc_apply_init(gfc_typespec*, symbol_attribute*, gfc_expr*) ../../gcc/fortran/expr.c:4124 0x684d98 build_struct ../../gcc/fortran/decl.c:1942 0x684d98 variable_decl ../../gcc/fortran/decl.c:2437 0x684d98 gfc_match_data_decl() ../../gcc/fortran/decl.c:4892 0x6dca79 match_word_omp_simd ../../gcc/fortran/parse.c:93 0x6e002e match_word ../../gcc/fortran/parse.c:377 0x6e002e decode_statement ../../gcc/fortran/parse.c:377 0x6e1e34 next_free ../../gcc/fortran/parse.c:1180 0x6e1e34 next_statement ../../gcc/fortran/parse.c:1413 0x6e337a parse_derived ../../gcc/fortran/parse.c:3233 0x6e337a parse_spec ../../gcc/fortran/parse.c:3773 0x6e5bb3 parse_progunit ../../gcc/fortran/parse.c:5615 0x6e71a4 gfc_parse_file() ../../gcc/fortran/parse.c:6124 0x72b182 gfc_be_parse_file ../../gcc/fortran/f95-lang.c:202
[Bug fortran/65173] ICE while compiling wrong code
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65173 --- Comment #9 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- Another example, together with LANG=de_DE.UTF-8 : $ cat zz1.f90 program p type t character, allocatable :: z1(:), z1(:) end type end $ gfortran-7-20161204 -m32 zz1.f90 zz1.f90:3:37-44: character, allocatable :: z1(:), z1(:) 2 1 Error: Component »z1« at (1) already declared at (2) f951: internal compiler error: Speicherzugriffsfehler 0xc4940f crash_signal ../../gcc/toplev.c:333 0x6f3aea gfc_resolve_expr(gfc_expr*) ../../gcc/fortran/resolve.c:6465 0x6f3e45 resolve_operator ../../gcc/fortran/resolve.c:3639 0x6f3e45 gfc_resolve_expr(gfc_expr*) ../../gcc/fortran/resolve.c:6475 0x6f6f08 resolve_index_expr ../../gcc/fortran/resolve.c:11379 0x6f6f74 resolve_charlen ../../gcc/fortran/resolve.c:11424 0x702da8 resolve_charlen ../../gcc/fortran/resolve.c:13580 0x702da8 resolve_component ../../gcc/fortran/resolve.c:13506 0x702f0a resolve_fl_derived0 ../../gcc/fortran/resolve.c:13738 0x7032d7 resolve_fl_derived0 ../../gcc/fortran/resolve.c:13122 0x7032d7 resolve_fl_derived ../../gcc/fortran/resolve.c:13815 0x6fe0a7 resolve_symbol ../../gcc/fortran/resolve.c:14146 0x71825b do_traverse_symtree ../../gcc/fortran/symbol.c:3994 0x70125a resolve_types ../../gcc/fortran/resolve.c:15948 0x6fcdac gfc_resolve(gfc_namespace*) ../../gcc/fortran/resolve.c:16061 0x6e71fa resolve_all_program_units ../../gcc/fortran/parse.c:5977 0x6e71fa gfc_parse_file() ../../gcc/fortran/parse.c:6224 0x72b182 gfc_be_parse_file ../../gcc/fortran/f95-lang.c:202
[Bug fortran/68155] ICE on initializing character array in type (len_lhs <> len_rhs)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68155 Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> changed: What|Removed |Added Version|5.2.1 |7.0 --- Comment #6 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- Valid code : $ cat zz1.f90 program p character(3) :: c1(2) = '' // ['b', 'c'] character(3) :: c2(2) = 'a' // ['b', 'c'] character(3) :: c3(2) = 'ax' // ['b', 'c'] character(3) :: c4(2) = 'axy' // ['b', 'c'] print *, size(c1), len(c1), c1 print *, size(c2), len(c2), c2 print *, size(c3), len(c3), c3 print *, size(c4), len(c4), c4 end $ gfortran-7-20161204 zz1.f90 $ a.out 2 3 b c 2 3 ab ac 2 3 axbaxc 2 3 axyaxy --- Similar, embedded in a type : $ cat zz2.f90 program p type t character(3) :: c1(2) = '' // ['b', 'c'] character(3) :: c2(2) = 'a' // ['b', 'c'] character(3) :: c3(2) = 'ax' // ['b', 'c'] character(3) :: c4(2) = 'axy' // ['b', 'c'] end type type(t) :: z print *, size(z%c1), len(z%c1), z%c1 print *, size(z%c2), len(z%c2), z%c2 print *, size(z%c3), len(z%c3), z%c3 print *, size(z%c4), len(z%c4), z%c4 end $ gfortran-7-20161204 zz2.f90 zz2.f90:13:0: end internal compiler error: in output_constructor_regular_field, at varasm.c:5017 0xf3fcc4 output_constructor_regular_field ../../gcc/varasm.c:5017 0xf3fcc4 output_constructor ../../gcc/varasm.c:5325 0xf3e7c1 output_constant ../../gcc/varasm.c:4702 0xf3e7c1 output_constructor_regular_field ../../gcc/varasm.c:5055 0xf3e7c1 output_constructor ../../gcc/varasm.c:5325 0xf40064 output_constant ../../gcc/varasm.c:4702 0xf40064 assemble_variable_contents ../../gcc/varasm.c:2083 0xf479c9 assemble_variable(tree_node*, int, int, int) ../../gcc/varasm.c:2259 0xf4d1e8 varpool_node::assemble_decl() ../../gcc/varpool.c:588 0x85501b output_in_order ../../gcc/cgraphunit.c:2248 0x8553ed symbol_table::compile() ../../gcc/cgraphunit.c:2488 0x857ea2 symbol_table::compile() ../../gcc/cgraphunit.c:2558 0x857ea2 symbol_table::finalize_compilation_unit() ../../gcc/cgraphunit.c:2584
[Bug fortran/78570] ICE in free_expr0, at fortran/expr.c:494
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78570 Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |DUPLICATE --- Comment #3 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- > The code is supposed to be valid, I guess? It's valid, and effectively covered via pr68155. *** This bug has been marked as a duplicate of bug 68155 ***
[Bug fortran/68155] ICE on initializing character array in type (len_lhs <> len_rhs)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68155 --- Comment #5 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- *** Bug 78570 has been marked as a duplicate of this bug. ***
[Bug fortran/68155] ICE on initializing character array in type (len_lhs <> len_rhs)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68155 --- Comment #4 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- Update, new backtrace : $ gfortran-7-20161127 z1t.f90 z1t.f90:3:28: character(2) :: z(1) = '' // ['y'] 1 Warning: CHARACTER expression at (1) is being truncated (2/1) [-Wcharacter-truncation] f951: internal compiler error: free_expr0(): Bad expr type 0x68ea6f gfc_internal_error(char const*, ...) ../../gcc/fortran/error.c:1327 0x68f7cb free_expr0 ../../gcc/fortran/expr.c:494 0x68f81d gfc_free_expr(gfc_expr*) ../../gcc/fortran/expr.c:513 0x71b273 gfc_free_charlen(gfc_charlen*, gfc_charlen*) ../../gcc/fortran/symbol.c:3840 0x71b349 gfc_free_namespace(gfc_namespace*) ../../gcc/fortran/symbol.c:3890 0x71b89c gfc_symbol_done_2() ../../gcc/fortran/symbol.c:3926 0x6c33d8 gfc_done_2() ../../gcc/fortran/misc.c:264 0x6e61f6 translate_all_program_units ../../gcc/fortran/parse.c:6057 0x6e61f6 gfc_parse_file() ../../gcc/fortran/parse.c:6238 0x729ee2 gfc_be_parse_file ../../gcc/fortran/f95-lang.c:202 --- Different ICEs using LANG=de_DE.UTF-8, for example : $ gfortran-7-20161204 -O2 -fcheck=all z1t.f90 f951: internal compiler error: Speicherzugriffsfehler 0xc4940f crash_signal ../../gcc/toplev.c:333 0x856200 process_function_and_variable_attributes ../../gcc/cgraphunit.c:726 0x856200 analyze_functions ../../gcc/cgraphunit.c:1029 0x857e28 symbol_table::finalize_compilation_unit() ../../gcc/cgraphunit.c:2562
[Bug fortran/78619] New: ICE in copy_reference_ops_from_ref, at tree-ssa-sccvn.c:889
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78619 Bug ID: 78619 Summary: ICE in copy_reference_ops_from_ref, at tree-ssa-sccvn.c:889 Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- Invalid code affects versions 5, 6 and 7, at -Og, -Os, -O1 or higher. $ cat z1.f90 function f(x) result(z) real :: x, z z = sign(1.0, f) end $ cat z2.f90 real function f(x) result(z) real :: x z = sign(1.0, f) end $ gfortran-7-20161127 -O2 z1.f90 z1.f90:3:17: z = sign(1.0, f) 1 Warning: Non-RECURSIVE procedure 'f' at (1) is possibly calling itself recursively. Declare it RECURSIVE or use '-frecursive' z1.f90:4:0: end internal compiler error: in copy_reference_ops_from_ref, at tree-ssa-sccvn.c:889 0xe00f3b copy_reference_ops_from_ref ../../gcc/tree-ssa-sccvn.c:889 0xe02335 valueize_shared_reference_ops_from_ref ../../gcc/tree-ssa-sccvn.c:1528 0xe03aaa vn_reference_lookup(tree_node*, tree_node*, vn_lookup_kind, vn_reference_s**, bool) ../../gcc/tree-ssa-sccvn.c:2427 0xe068ad visit_reference_op_load ../../gcc/tree-ssa-sccvn.c:3557 0xe068ad visit_use ../../gcc/tree-ssa-sccvn.c:3897 0xe08e4b process_scc ../../gcc/tree-ssa-sccvn.c:4128 0xe08e4b extract_and_process_scc_for_name ../../gcc/tree-ssa-sccvn.c:4215 0xe08e4b DFS ../../gcc/tree-ssa-sccvn.c:4267 0xe096bd sccvn_dom_walker::before_dom_children(basic_block_def*) ../../gcc/tree-ssa-sccvn.c:4733 0x12f3162 dom_walker::walk(basic_block_def*) ../../gcc/domwalk.c:265 0xe0a4d2 run_scc_vn(vn_lookup_kind) ../../gcc/tree-ssa-sccvn.c:4844 0xdd9064 execute ../../gcc/tree-ssa-pre.c:5151
[Bug fortran/78618] ICE in gfc_check_rank, at fortran/check.c:3670
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78618 --- Comment #1 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> --- Working variants : $ cat z2.f90 program p character :: c = char(256,4) print *, rank(c) end $ gfortran-7-20161127 z2.f90 z2.f90:2:19: character :: c = char(256,4) 1 Error: Character '\u0100' in string at (1) cannot be converted into character kind 1 $ cat z3.f90 program p character, parameter :: c = char(255,4) print *, rank(c) end $ gfortran-7-20161127 z3.f90 $ a.out 0
[Bug fortran/78618] New: ICE in gfc_check_rank, at fortran/check.c:3670
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78618 Bug ID: 78618 Summary: ICE in gfc_check_rank, at fortran/check.c:3670 Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- With invalid code, down to at least 4.8 : $ cat z1.f90 program p character, parameter :: c = char(256,4) print *, rank(c) end $ gfortran-7-20161127 z1.f90 f951: internal compiler error: Segmentation fault 0xc4532f crash_signal ../../gcc/toplev.c:333 0x66bb6b gfc_check_rank(gfc_expr*) ../../gcc/fortran/check.c:3670 0x6a0f34 check_specific ../../gcc/fortran/intrinsic.c:4506 0x6aad94 gfc_intrinsic_func_interface(gfc_expr*, int) ../../gcc/fortran/intrinsic.c:4721 0x6f2814 resolve_unknown_f ../../gcc/fortran/resolve.c:2733 0x6f2814 resolve_function ../../gcc/fortran/resolve.c:3035 0x6f291a gfc_resolve_expr(gfc_expr*) ../../gcc/fortran/resolve.c:6482 0x6f8f32 gfc_resolve_code(gfc_code*, gfc_namespace*) ../../gcc/fortran/resolve.c:10818 0x6f8c07 gfc_resolve_blocks(gfc_code*, gfc_namespace*) ../../gcc/fortran/resolve.c:9865 0x6f903b gfc_resolve_code(gfc_code*, gfc_namespace*) ../../gcc/fortran/resolve.c:10808 0x6fba22 resolve_codes ../../gcc/fortran/resolve.c:16025 0x6fbb1e gfc_resolve(gfc_namespace*) ../../gcc/fortran/resolve.c:16060 0x6e609a resolve_all_program_units ../../gcc/fortran/parse.c:5977 0x6e609a gfc_parse_file() ../../gcc/fortran/parse.c:6224 0x729ee2 gfc_be_parse_file ../../gcc/fortran/f95-lang.c:202