From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 116403 invoked by alias); 25 Sep 2015 02:54:07 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 116150 invoked by uid 48); 25 Sep 2015 02:54:01 -0000 From: "trippels at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/67659] [5 regression] ICE: segfault: Linux kernel/rcu/tree.c:3261:6 Date: Fri, 25 Sep 2015 02:54:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 5.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: trippels at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cc component cf_known_to_work short_desc cf_known_to_fail Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-09/txt/msg01990.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67659 Markus Trippelsdorf changed: What |Removed |Added ---------------------------------------------------------------------------- Status|WAITING |NEW CC| |trippels at gcc dot gnu.org Component|other |tree-optimization Known to work| |4.9.3, 6.0 Summary|ICE: Linux |[5 regression] ICE: |kernel/rcu/tree.c:3261:6 |segfault: Linux | |kernel/rcu/tree.c:3261:6 Known to fail| |5.2.1 --- Comment #2 from Markus Trippelsdorf --- markus@x4 tmp % cat tree.i struct list_head { struct list_head *next, *prev; } typedef call_rcu_func_t; struct __wait_queue_head { int lock; struct list_head task_list; }; struct completion { int done; struct __wait_queue_head wait; }; int call_rcu_sched; void fn1(unsigned long p1) { __asm__("" : : : "memory"); if (~0UL / 2 >= p1) { call_rcu_func_t __crcu_array[] = {call_rcu_sched}; int __n = sizeof({}); struct completion __rs_array[__n]; fn2(0, 1, __crcu_array, __rs_array); } } void fn3(unsigned long p1) { __asm__("" : : : "memory"); if (~0UL / 2 >= p1) { call_rcu_func_t __crcu_array[] = {call_rcu_sched}; int __n = sizeof({}); struct completion __rs_array[__n]; fn2(0, 1, __crcu_array, __rs_array); } } markus@x4 tmp % gdb --args gcc -O3 -c -w tree.i Reading symbols from gcc...done. (gdb) run Starting program: /usr/bin/gcc -O3 -c -w tree.i process 16753 is executing new program: /usr/x86_64-pc-linux-gnu/gcc-bin/5.2.1/gcc [New process 16757] process 16757 is executing new program: /usr/libexec/gcc/x86_64-pc-linux-gnu/5.2.1/cc1 Program received signal SIGSEGV, Segmentation fault. [Switching to process 16757] 0x00000000007fce50 in ccp_fold_stmt(gimple_stmt_iterator*) [clone .cold.97] () (gdb) bt #0 0x00000000007fce50 in ccp_fold_stmt(gimple_stmt_iterator*) [clone .cold.97] () #1 0x0000000000f509c1 in substitute_and_fold_dom_walker::before_dom_children(basic_block_def*) () #2 0x000000000107f821 in dom_walker::walk(basic_block_def*) () #3 0x0000000000f505e1 in substitute_and_fold(tree_node* (*)(tree_node*), bool (*)(gimple_stmt_iterator*), bool) () #4 0x0000000000ee9b2a in (anonymous namespace)::pass_ccp::execute(function*) () #5 0x0000000000721a13 in execute_one_pass(opt_pass*) () #6 0x0000000000722fb2 in execute_pass_list_1(opt_pass*) () #7 0x0000000000722fe3 in execute_pass_list_1(opt_pass*) () #8 0x0000000000e34619 in execute_pass_list(function*, opt_pass*) () #9 0x0000000001104e27 in symbol_table::compile() () #10 0x00000000011045fe in symbol_table::finalize_compilation_unit() () #11 0x0000000000c2b473 in c_write_global_declarations() () #12 0x0000000001148411 in compile_file() () #13 0x0000000000c20831 in toplev::main(int, char**) () #14 0x0000000000c20c8e in main () -fno-ipa-icf "fixes" the issue.