[Bug c/85427] New: internal compiler error: in constant_lower_bound, at poly-int.h:1527
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85427 Bug ID: 85427 Summary: internal compiler error: in constant_lower_bound, at poly-int.h:1527 Product: gcc Version: 8.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: shlei930 at gmail dot com Target Milestone: --- $ gcc-trunk -v Using built-in specs. COLLECT_GCC=gcc-trunk Target: x86_64-pc-linux-gnu Configured with: ../gcc/configure --prefix=/home/suhua/compilers/trunk/root-gcc --enable-languages=c,c++ --disable-werror --enable-multilib Thread model: posix gcc version 8.0.1 20180416 (experimental) [trunk revision 259396] (GCC) $ gcc-trunk abc.c during RTL pass: expand abc.c: In function ‘fn1’: abc.c:3:13: internal compiler error: in constant_lower_bound, at poly-int.h:1527 int fn1() { fn1(a, b, c, d, e, f, g, h, i, j, k); } ^~~~ 0x5ff4f0 long constant_lower_bound<1u, long>(poly_int_pod<1u, long> const&) ../../gcc/gcc/poly-int.h:1527 0x5ff4f0 expand_call(tree_node*, rtx_def*, int) ../../gcc/gcc/calls.c:3763 0x9b26ab expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) ../../gcc/gcc/expr.c:11007 0x8ad45e expand_expr ../../gcc/gcc/expr.h:280 0x8ad45e expand_call_stmt ../../gcc/gcc/cfgexpand.c:2690 0x8ad45e expand_gimple_stmt_1 ../../gcc/gcc/cfgexpand.c:3624 0x8ad45e expand_gimple_stmt ../../gcc/gcc/cfgexpand.c:3790 0x8ae4df expand_gimple_basic_block ../../gcc/gcc/cfgexpand.c:5819 0x8b30b7 execute ../../gcc/gcc/cfgexpand.c:6425 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. $ cat abc.c typedef struct { char type[90]; } t; t a, b, c, d, e, f, g, h, i, j, k; int fn1() { fn1(a, b, c, d, e, f, g, h, i, j, k); }
[Bug tree-optimization/85331] during GIMPLE pass, internal compiler error: Segmentation fault (-O1 and above)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85331 --- Comment #1 from Suhua Lei --- Reproduce with this test case: typedef long int64_t; typedef double vecf __attribute__((vector_size(2 * sizeof(double; void fn1() { vecf *r; vecf y = {}; __attribute__((__vector_size__(2 * sizeof(int64_t int64_t m = {100}; *r = __builtin_shuffle(y, m); }
[Bug tree-optimization/85331] New: during GIMPLE pass, internal compiler error: Segmentation fault (-O1 and above)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85331 Bug ID: 85331 Summary: during GIMPLE pass, internal compiler error: Segmentation fault (-O1 and above) Product: gcc Version: 8.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: shlei930 at gmail dot com Target Milestone: --- $ gcc-trunk -v Using built-in specs. COLLECT_GCC=gcc-trunk COLLECT_LTO_WRAPPER=/home/suhua/compilers/trunk/root-gcc/libexec/gcc/x86_64-pc-linux-gnu/8.0.1/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc/configure --prefix=/home/suhua/compilers/trunk/root-gcc --enable-languages=c,c++ --disable-werror --enable-multilib Thread model: posix gcc version 8.0.1 20180410 (experimental) [trunk revision 259265] (GCC) $ gcc-trunk -O1 abc.c during GIMPLE pass: ccp abc.c: In function ‘fn1’: abc.c:9:1: internal compiler error: Segmentation fault } ^ 0xcbd6af crash_signal ../../gcc/gcc/toplev.c:325 0x9f6cae fold_vec_perm ../../gcc/gcc/fold-const.c:8951 0x9e4fee fold_ternary_loc(unsigned int, tree_code, tree_node*, tree_node*, tree_node*, tree_node*) ../../gcc/gcc/fold-const.c:11747 0x102fac2 gimple_resimplify3(gimple**, code_helper*, tree_node*, tree_node**, tree_node* (*)(tree_node*)) ../../gcc/gcc/gimple-match-head.c:194 0x110fc27 gimple_simplify(gimple*, code_helper*, tree_node**, gimple**, tree_node* (*)(tree_node*), tree_node* (*)(tree_node*)) ../../gcc/gcc/gimple-match-head.c:693 0xa3847a gimple_fold_stmt_to_constant_1(gimple*, tree_node* (*)(tree_node*), tree_node* (*)(tree_node*)) ../../gcc/gcc/gimple-fold.c:6099 0xdc5441 ccp_fold ../../gcc/gcc/tree-ssa-ccp.c:1258 0xdc5441 evaluate_stmt ../../gcc/gcc/tree-ssa-ccp.c:1786 0xdc7515 visit_assignment ../../gcc/gcc/tree-ssa-ccp.c:2355 0xdc75d2 ccp_propagate::visit_stmt(gimple*, edge_def**, tree_node**) ../../gcc/gcc/tree-ssa-ccp.c:2433 0xe4a103 ssa_propagation_engine::simulate_stmt(gimple*) ../../gcc/gcc/tree-ssa-propagate.c:237 0xe4a48a ssa_propagation_engine::simulate_block(basic_block_def*) ../../gcc/gcc/tree-ssa-propagate.c:371 0xe4b696 ssa_propagation_engine::ssa_propagate() ../../gcc/gcc/tree-ssa-propagate.c:800 0xdc0373 do_ssa_ccp ../../gcc/gcc/tree-ssa-ccp.c:2474 0xdc0373 execute ../../gcc/gcc/tree-ssa-ccp.c:2518 Please submit a full bug report, with preprocessed source if appropriate. $ cat abc.c #include typedef double vecf __attribute__((vector_size(2 * sizeof(double; typedef int64_t veci __attribute__((vector_size(2 * sizeof(int64_t; void fn1() { vecf *r; vecf y = {}; veci m = {100}; *r = __builtin_shuffle(y, m); }
[Bug tree-optimization/84417] New: internal compiler error: verify_gimple failed
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84417 Bug ID: 84417 Summary: internal compiler error: verify_gimple failed Product: gcc Version: 8.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: shlei930 at gmail dot com Target Milestone: --- $gcc-trunk -v gcc version 8.0.1 20180208 (experimental) [trunk revision 257504] (GCC) Target: x86_64-pc-linux-gnu Thread model: posix $gcc-trunk -O3 -c abc.c abc.c:1:1: warning: return type defaults to ‘int’ [-Wimplicit-int] fn1() { ^~~ abc.c: In function ‘fn1’: abc.c:3:15: warning: initialization of ‘double *’ from incompatible pointer type ‘__vector(1) double *’ [-Wincompatible-pointer-types] double *a = ^ abc.c:5:1: error: invalid position or size operand to BIT_FIELD_REF } ^ BIT_FIELD_REF <x_7(D), 64, 0x54e373edd85c0> abc.c:4:8: note: in statement *a + *(a + 8446744073709551615); ^~ _3 = BIT_FIELD_REF <x_7(D), 64, 0x54e373edd85c0>; during GIMPLE pass: ccp abc.c:5:1: internal compiler error: verify_gimple failed } ^ 0xcf97e3 verify_gimple_in_cfg(function*, bool) ../../gcc/gcc/tree-cfg.c:5575 0xbd8d5f execute_function_todo ../../gcc/gcc/passes.c:1994 0xbd9cae execute_todo ../../gcc/gcc/passes.c:2048 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. $cat abc.c fn1() { __attribute__((__vector_size__(sizeof(double double x; double *a = *a + *(a + 8446744073709551615); }
[Bug tree-optimization/84416] New: internal compiler error: in int_cst_value, at tree.c:11089
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84416 Bug ID: 84416 Summary: internal compiler error: in int_cst_value, at tree.c:11089 Product: gcc Version: 8.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: shlei930 at gmail dot com Target Milestone: --- It seems gcc version 5.4.1, version 6.3.0, version 7.2.0 also have similar problems when complied with -O3. gcc version 4.8.5 is able to compile. $gcc-trunk -v gcc version 8.0.1 20180208 (experimental) [trunk revision 257504] (GCC) Target: x86_64-pc-linux-gnu Thread model: posix $gcc-trunk -O3 -c abc.c abc.c:1:8: warning: type defaults to ‘int’ in declaration of ‘a’ [-Wimplicit-int] static a[]; ^ abc.c:2:1: warning: data definition has no type or storage class b; ^ abc.c:2:1: warning: type defaults to ‘int’ in declaration of ‘b’ [-Wimplicit-int] abc.c:3:1: warning: return type defaults to ‘int’ [-Wimplicit-int] fn1() { ^~~ abc.c: In function ‘fn1’: abc.c:5:18: warning: integer constant is so large that it is unsigned a[b] = a[b - 18446744073709551607]; ^~~~ during GIMPLE pass: pcom abc.c:3:1: internal compiler error: in int_cst_value, at tree.c:11089 fn1() { ^~~ 0x6f687c int_cst_value(tree_node const*) ../../gcc/gcc/tree.c:11089 0x14fddab analyze_subscript_affine_affine ../../gcc/gcc/tree-data-ref.c:3609 0x1502ed4 analyze_siv_subscript ../../gcc/gcc/tree-data-ref.c:3926 0x1502ed4 analyze_overlapping_iterations ../../gcc/gcc/tree-data-ref.c:4156 0x1502ed4 subscript_dependence_tester_1 ../../gcc/gcc/tree-data-ref.c:4697 0x1503427 subscript_dependence_tester_1 ../../gcc/gcc/tree-data-ref.c:4693 0x1503427 subscript_dependence_tester ../../gcc/gcc/tree-data-ref.c:4747 0x1503427 compute_affine_dependence(data_dependence_relation*, loop*) ../../gcc/gcc/tree-data-ref.c:4806 0x1504fec compute_all_dependences(vec<data_reference*, va_heap, vl_ptr>, vec<data_dependence_relation*, va_heap, vl_ptr>*, vec<loop*, va_heap, vl_ptr>, bool) ../../gcc/gcc/tree-data-ref.c:4873 0x15057da compute_data_dependences_for_loop(loop*, bool, vec<loop*, va_heap, vl_ptr>*, vec<data_reference*, va_heap, vl_ptr>*, vec<data_dependence_relation*, va_heap, vl_ptr>*) ../../gcc/gcc/tree-data-ref.c:5272 0xd76d09 tree_predictive_commoning_loop ../../gcc/gcc/tree-predcom.c:3190 0xd79d5d tree_predictive_commoning() ../../gcc/gcc/tree-predcom.c:3312 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. $cat abc.c static a[]; b; fn1() { for (;; b++) a[b] = a[b - 18446744073709551607]; }