https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64029
Bug ID: 64029 Summary: const int (&in)[]{1,2,3,4,5}; results in internal compiler error: Segmentation fault Product: gcc Version: 4.9.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: narayan_behera at hotmail dot com Here is a single line program that recreates the bug: int main() { const int (&in)[]{1,2,3,4,5}; return 0; } -------------- g++ diagnostics follows ---------------------------- g++ -std=c++11 -Wall -Wextra -c usearr1.cpp usearr1.cpp: In function ‘int main()’: usearr1.cpp:4:15: warning: unused variable ‘in’ [-Wunused-variable] const int (&in)[]{1,2,3,4,5}; ^ usearr1.cpp:4:30: internal compiler error: Segmentation fault const int (&in)[]{1,2,3,4,5}; ^ 0x855784a crash_signal .././gcc-4.9.1/gcc/toplev.c:337 0x83e6aca gimplify_decl_expr .././gcc-4.9.1/gcc/gimplify.c:1359 0x83e6aca gimplify_expr(tree_node**, gimple_statement_base**, gimple_statement_base**, bool (*)(tree_node*), int) .././gcc-4.9.1/gcc/gimplify.c:7820 0x83e9c17 gimplify_stmt(tree_node**, gimple_statement_base**) .././gcc-4.9.1/gcc/gimplify.c:5373 0x83e7904 gimplify_cleanup_point_expr .././gcc-4.9.1/gcc/gimplify.c:5149 0x83e7904 gimplify_expr(tree_node**, gimple_statement_base**, gimple_statement_base**, bool (*)(tree_node*), int) .././gcc-4.9.1/gcc/gimplify.c:7990 0x83e9c17 gimplify_stmt(tree_node**, gimple_statement_base**) .././gcc-4.9.1/gcc/gimplify.c:5373 0x83e81fc gimplify_statement_list .././gcc-4.9.1/gcc/gimplify.c:1432 0x83e81fc gimplify_expr(tree_node**, gimple_statement_base**, gimple_statement_base**, bool (*)(tree_node*), int) .././gcc-4.9.1/gcc/gimplify.c:8042 0x83e9c17 gimplify_stmt(tree_node**, gimple_statement_base**) .././gcc-4.9.1/gcc/gimplify.c:5373 0x83ea4a8 gimplify_bind_expr .././gcc-4.9.1/gcc/gimplify.c:1099 0x83e784e gimplify_expr(tree_node**, gimple_statement_base**, gimple_statement_base**, bool (*)(tree_node*), int) .././gcc-4.9.1/gcc/gimplify.c:7824 0x83e9c17 gimplify_stmt(tree_node**, gimple_statement_base**) .././gcc-4.9.1/gcc/gimplify.c:5373 0x83e81fc gimplify_statement_list .././gcc-4.9.1/gcc/gimplify.c:1432 0x83e81fc gimplify_expr(tree_node**, gimple_statement_base**, gimple_statement_base**, bool (*)(tree_node*), int) .././gcc-4.9.1/gcc/gimplify.c:8042 0x83e9c17 gimplify_stmt(tree_node**, gimple_statement_base**) .././gcc-4.9.1/gcc/gimplify.c:5373 0x83eaaba gimplify_body(tree_node*, bool) .././gcc-4.9.1/gcc/gimplify.c:8734 0x83eada0 gimplify_function_tree(tree_node*) .././gcc-4.9.1/gcc/gimplify.c:8887 0x82e3cf8 analyze_function .././gcc-4.9.1/gcc/cgraphunit.c:649 0x82e4c86 analyze_functions .././gcc-4.9.1/gcc/cgraphunit.c:1017 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions.