internal compiler error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I am encountering an internal compiler error when compiling with -O2

internal compiler error: in get_constraint_for_ptr_offset, at
tree-ssa-structalias.c:3155

I see this error when using the MinGW-w64 version of gcc, both version
7.2.0 on Fedora 27 and version 6.4.0 on Fedora 25.  I do not see the error
with MinGW version 4.9.2 on Fedora 21.  I do not see this error when
compiling natively for Linux on Centos 6 (4.4.7), Centos 7 (4.8.5), Fedora
21 (4.9.2), Fedora 25 (6.4.1), or Fedora 27 (7.2.1).

A backtrace:

#0  0x00007ffff649db90 in exit () from /lib64/libc.so.6
#1  0x0000000000f615a7 in
diagnostic_action_after_output(diagnostic_context*, diagnostic_t) ()
#2  0x0000000000f61cdd in diagnostic_report_diagnostic(diagnostic_context*,
diagnostic_info*) ()
#3  0x0000000000f6219f in diagnostic_impl(rich_location*, int, char const*,
__va_list_tag (*) [1], diagnostic_t) ()
#4  0x0000000000f62dc5 in internal_error(char const*, ...) ()
#5  0x0000000000f614f4 in fancy_abort(char const*, int, char const*) ()
#6  0x00000000009f0703 in get_constraint_for_ptr_offset(tree_node*,
tree_node*, vec<constraint_expr, va_heap, vl_ptr>*) ()
#7  0x00000000009f2162 in find_func_aliases(function*, gimple*) ()
#8  0x00000000009f79ef in compute_may_aliases() ()
#9  0x00000000007c6782 in execute_function_todo(function*, void*) ()
#10 0x00000000007c7853 in execute_todo(unsigned int) ()
#11 0x00000000007c95ee in execute_one_pass(opt_pass*) ()
#12 0x00000000007c9c71 in execute_pass_list_1(opt_pass*) ()
#13 0x00000000007c9c83 in execute_pass_list_1(opt_pass*) ()
#14 0x00000000007c9cc5 in execute_pass_list(function*, opt_pass*) ()
#15 0x000000000054f2c5 in cgraph_node::expand() ()
#16 0x00000000005505e1 in symbol_table::compile() [clone .part.51] ()
#17 0x0000000000552257 in symbol_table::finalize_compilation_unit() ()
#18 0x0000000000880d2a in compile_file() ()
#19 0x00000000004294d5 in toplev::main(int, char**) ()
#20 0x000000000042b83b in main ()

The problem does not occur with -O.  I attempted to narrow down the error
to a particular optimization flag by adding the additional optimization
flags enabled by -O2, as documented in the man page.  However, this
approach produced slightly different behavior:

internal compiler error: Segmentation fault

I found two flags, either of which added to -O triggers a
segfault: -ftree-pre and -fcode-hoisting.

A backtrace from running with "-O -ftree-pre"

#0  0x00000000009b2c1f in find_or_generate_expression(basic_block_def*,
tree_node*, gimple**) ()
#1  0x00000000009b234e in create_expression_by_pieces(basic_block_def*,
pre_expr_d*, gimple**, tree_node*) ()
#2  0x00000000009b43d2 in insert_into_preds_of_block(basic_block_def*,
unsigned int, vec<pre_expr_d*, va_heap, vl_ptr>) ()
#3  0x00000000009b666b in insert_aux(basic_block_def*, bool, bool) ()
#4  0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#5  0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#6  0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#7  0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#8  0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#9  0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#10 0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#11 0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#12 0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#13 0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#14 0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#15 0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#16 0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#17 0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#18 0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#19 0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#20 0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#21 0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#22 0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#23 0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#24 0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#25 0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#26 0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#27 0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#28 0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#29 0x00000000009b7c19 in (anonymous
namespace)::pass_pre::execute(function*) ()
#30 0x00000000007c94a9 in execute_one_pass(opt_pass*) ()
#31 0x00000000007c9c71 in execute_pass_list_1(opt_pass*) ()
#32 0x00000000007c9c83 in execute_pass_list_1(opt_pass*) ()
#33 0x00000000007c9cc5 in execute_pass_list(function*, opt_pass*) ()
#34 0x000000000054f2c5 in cgraph_node::expand() ()
#35 0x00000000005505e1 in symbol_table::compile() [clone .part.51] ()
#36 0x0000000000552257 in symbol_table::finalize_compilation_unit() ()
#37 0x0000000000880d2a in compile_file() ()
#38 0x00000000004294d5 in toplev::main(int, char**) ()
#39 0x000000000042b83b in main ()

And a backtrace with "-O -fcode-hoisting"

#0  0x00000000009b2c1f in find_or_generate_expression(basic_block_def*,
tree_node*, gimple**) ()
#1  0x00000000009b234e in create_expression_by_pieces(basic_block_def*,
pre_expr_d*, gimple**, tree_node*) ()
#2  0x00000000009b64f8 in insert_aux(basic_block_def*, bool, bool) ()
#3  0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#4  0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#5  0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#6  0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#7  0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#8  0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#9  0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#10 0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#11 0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#12 0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#13 0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#14 0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#15 0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#16 0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#17 0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#18 0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#19 0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#20 0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#21 0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#22 0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#23 0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#24 0x00000000009b59a8 in insert_aux(basic_block_def*, bool, bool) ()
#25 0x00000000009b7c19 in (anonymous
namespace)::pass_pre::execute(function*) ()
#26 0x00000000007c94a9 in execute_one_pass(opt_pass*) ()
#27 0x00000000007c9c71 in execute_pass_list_1(opt_pass*) ()
#28 0x00000000007c9c83 in execute_pass_list_1(opt_pass*) ()
#29 0x00000000007c9cc5 in execute_pass_list(function*, opt_pass*) ()
#30 0x000000000054f2c5 in cgraph_node::expand() ()
#31 0x00000000005505e1 in symbol_table::compile() [clone .part.51] ()
#32 0x0000000000552257 in symbol_table::finalize_compilation_unit() ()
#33 0x0000000000880d2a in compile_file() ()
#34 0x00000000004294d5 in toplev::main(int, char**) ()
#35 0x000000000042b83b in main ()

Passing "-O2 -fno-tree-pre -fno-code-hoisting" to gcc still triggers the
segfault.

At this point, I do not have a small piece of code that I can share that
triggers the problem, though I will try to do so.

Can someone offer some suggestions on how to avoid the problem without
turning off all of -O2?  Or how I can provide more information to track
down the underlying problem?

Thank you,
Matt



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux