Bug 1265791 - optimiser bug with -O3 on Alpha + other arches
Summary: optimiser bug with -O3 on Alpha + other arches
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: cross-gcc
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: David Howells
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-23 18:44 UTC by David Binderman
Modified: 2015-12-22 07:23 UTC (History)
7 users (show)

Fixed In Version: cross-gcc-5.2.1-4.fc23 cross-gcc-5.2.1-4.fc22
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-19 18:26:20 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
C source code (703.62 KB, text/x-csrc)
2015-09-23 18:44 UTC, David Binderman
no flags Details
Reduced test case (556 bytes, text/plain)
2015-11-20 13:26 UTC, David Howells
no flags Details


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 68459 0 None None None Never

Description David Binderman 2015-09-23 18:44:50 UTC
Created attachment 1076284 [details]
C source code

Description of problem:

$ alpha-linux-gnu-gcc -c -O3 bug231.c
In file included from include/linux/thread_info.h:54:0,
                 from include/asm-generic/preempt.h:4,
                 from arch/alpha/include/generated/asm/preempt.h:1,
                 from include/linux/preempt.h:64,
                 from include/linux/spinlock.h:50,
                 from kernel/rcu/update.c:36:
./arch/alpha/include/asm/thread_info.h:45:30: warning: call-clobbered register used for global register variable
kernel/rcu/update.c: In function ‘synchronize_rcu_tasks’:
kernel/rcu/update.c:589:6: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla/> for instructions.
Preprocessed source stored into /tmp/ccA4zHPI.out file, please attach this to your bugreport.
[dcb@dhcppc0 foundBugs]$ alpha-linux-gnu-gcc -c -O2 bug231.c
In file included from include/linux/thread_info.h:54:0,
                 from include/asm-generic/preempt.h:4,
                 from arch/alpha/include/generated/asm/preempt.h:1,
                 from include/linux/preempt.h:64,
                 from include/linux/spinlock.h:50,
                 from kernel/rcu/update.c:36:
./arch/alpha/include/asm/thread_info.h:45:30: warning: call-clobbered register used for global register variable
[dcb@dhcppc0 foundBugs]$ 



Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 David Binderman 2015-09-24 12:32:08 UTC
gdb stack backtrace gives us

(gdb) bt
#0  0x0000000000965a6f in ?? ()
#1  0x00000000009cc699 in substitute_and_fold_dom_walker::before_dom_children(basic_block_def*) ()
#2  0x0000000000b4b4d2 in dom_walker::walk(basic_block_def*) ()
#3  0x00000000009cc0ba in substitute_and_fold(tree_node* (*)(tree_node*), bool (*)(gimple_stmt_iterator*), bool) ()
#4  0x000000000095cb99 in ?? ()
#5  0x000000000080a0fa in execute_one_pass(opt_pass*) ()
#6  0x000000000080a516 in ?? ()
#7  0x000000000080a528 in ?? ()
#8  0x000000000080a569 in execute_pass_list(function*, opt_pass*) ()
#9  0x00000000005cf7c8 in cgraph_node::expand() ()
#10 0x00000000005d0b14 in ?? ()
#11 0x00000000005d1fd0 in symbol_table::finalize_compilation_unit() ()
#12 0x00000000004e892b in c_write_global_declarations() ()
#13 0x00000000008a7606 in ?? ()
#14 0x00000000004d272b in toplev::main(int, char**) ()
#15 0x00000000004d341a in main ()

Comment 2 David Howells 2015-11-20 13:26:12 UTC
Created attachment 1097192 [details]
Reduced test case

Highly reduced test case.  Compile with:

    alpha-linux-gnu-gcc -c -O3 /tmp/bz1265791-testcase.c

Produces:

/tmp/bz1265791-testcase.c: In function ‘synchronize_rcu_tasks’:
/tmp/bz1265791-testcase.c:8:6: internal compiler error: Segmentation fault
 void synchronize_rcu_tasks(void)
      ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla/> for instructions.
Preprocessed source stored into /tmp/ccBZfX0I.out file, please attach this to your bugreport.

Comment 3 Fedora Update System 2015-12-10 14:29:24 UTC
cross-gcc-5.2.1-4.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-baa411f109

Comment 4 Fedora Update System 2015-12-10 14:29:24 UTC
cross-gcc-5.2.1-4.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-800f81b3f6

Comment 5 Fedora Update System 2015-12-11 06:01:01 UTC
cross-gcc-5.2.1-4.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update cross-gcc'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-800f81b3f6

Comment 6 Fedora Update System 2015-12-11 19:57:33 UTC
cross-gcc-5.2.1-4.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update cross-gcc'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-baa411f109

Comment 7 Fedora Update System 2015-12-19 18:26:08 UTC
cross-gcc-5.2.1-4.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2015-12-22 07:23:32 UTC
cross-gcc-5.2.1-4.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.