[Bug tree-optimization/84634] New: [8 Regression] gcc/tree-vect-stmts.c:6786:19: runtime error: member access within null pointer of type 'struct _loop_vec_info
marxin at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Mar 1 07:49:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84634
Bug ID: 84634
Summary: [8 Regression] gcc/tree-vect-stmts.c:6786:19: runtime
error: member access within null pointer of type
'struct _loop_vec_info
Product: gcc
Version: unknown
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: marxin at gcc dot gnu.org
CC: richard.sandiford at linaro dot org
Target Milestone: ---
Started probable since Richard's r256625:
$ UBSAN_OPTIONS="print_stacktrace=1" ./xgcc -B.
/home/marxin/Programming/gcc/gcc/testsuite/gcc.c-torture/execute/20020129-1.c
-O3
../../gcc/tree-vect-stmts.c:6786:19: runtime error: member access within null
pointer of type 'struct _loop_vec_info'
#0 0x2b6462b in vectorizable_store ../../gcc/tree-vect-stmts.c:6786
#1 0x2ba7d19 in vect_transform_stmt(gimple*, gimple_stmt_iterator*, bool*,
_slp_tree*, _slp_instance*) ../../gcc/tree-vect-stmts.c:9482
#2 0x2c91d42 in vect_schedule_slp_instance ../../gcc/tree-vect-slp.c:4187
#3 0x2c98669 in vect_schedule_slp(vec_info*) ../../gcc/tree-vect-slp.c:4256
#4 0x2cabcad in vect_slp_bb(basic_block_def*)
../../gcc/tree-vect-slp.c:3250
#5 0x2cba557 in execute ../../gcc/tree-vectorizer.c:978
#6 0x1b8f0ac in execute_one_pass(opt_pass*) ../../gcc/passes.c:2497
#7 0x1b92bc7 in execute_pass_list_1 ../../gcc/passes.c:2586
#8 0x1b92c0e in execute_pass_list_1 ../../gcc/passes.c:2587
#9 0x1b92c0e in execute_pass_list_1 ../../gcc/passes.c:2587
#10 0x1b92ce8 in execute_pass_list(function*, opt_pass*)
../../gcc/passes.c:2597
#11 0xce8eba in cgraph_node::expand() ../../gcc/cgraphunit.c:2139
#12 0xcee454 in expand_all_functions ../../gcc/cgraphunit.c:2275
#13 0xcee454 in symbol_table::compile() ../../gcc/cgraphunit.c:2624
#14 0xcf89c6 in symbol_table::finalize_compilation_unit()
../../gcc/cgraphunit.c:2717
#15 0x208763c in compile_file ../../gcc/toplev.c:480
#16 0x74ee29 in do_compile ../../gcc/toplev.c:2132
#17 0x74ee29 in toplev::main(int, char**) ../../gcc/toplev.c:2267
#18 0x751cba in main ../../gcc/main.c:39
#19 0x7fa721d2b6e4 in __libc_start_main (/lib64/libc.so.6+0x206e4)
#20 0x751de8 in _start
(/home/marxin/Programming/gcc/objdir/gcc/cc1+0x751de8)
Can be easily triggered with:
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index a98e0e5e259..db14c8063c4 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -6783,6 +6783,7 @@ vectorizable_store (gimple *stmt, gimple_stmt_iterator
*gsi, gimple **vec_stmt,
prev_stmt_info = NULL;
tree vec_mask = NULL_TREE;
+ gcc_assert (loop_vinfo);
vec_loop_masks *masks = &LOOP_VINFO_MASKS (loop_vinfo);
for (j = 0; j < ncopies; j++)
{
More information about the Gcc-bugs
mailing list