Summary: | [4.4 Regression] ICE when compile libgomp/task.c | ||
---|---|---|---|
Product: | gcc | Reporter: | macius bat <linuxl4> |
Component: | middle-end | Assignee: | Jakub Jelinek <jakub> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | gcc-bugs, pinskia |
Priority: | P1 | Keywords: | wrong-code |
Version: | 4.4.0 | ||
Target Milestone: | 4.4.0 | ||
URL: | http://gcc.gnu.org/ml/gcc-patches/2008-09/msg00592.html | ||
Host: | Target: | i686-pc-linux-gnu | |
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2008-09-08 12:03:24 | |
Attachments: | the preprocessed source |
Description
macius bat
2008-08-29 07:49:36 UTC
Created attachment 16160 [details]
the preprocessed source
Can you say what the ICE is? [~/tmp]$gcc --version |head -1 gcc (GCC) 4.4.0 20080902 (experimental) [~/tmp]$gcc -g -O2 -march=i686 -fstack-protector -c task.c -o task.o /trunk/libgomp/task.c: In function 'GOMP_task': /trunk/libgomp/task.c:186: internal compiler error: in mem_loc_descriptor, at dwarf2out.c:10098 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. What happens here is that there is a variable (task) initialized from a value within thread local aggregate (gomp_tls_data.task) and it is never modified, and as i386 has very few registers and register preassure is high, its pseudo is replaced by equiv mem, which happens to be: (mem/s/f/c:SI (plus:SI (plus:SI (unspec:SI [ (const_int 0 [0x0]) ] 18) (reg:SI 3 bx [168])) (const_int 36 [0x24])) [16 gomp_tls_data.task+0 S4 A32]) (the unspec there is thread pointer). This is then what dwarf2out sees and fails on gcc_unreachable, because it doesn't handle that UNSPEC. Subject: Bug 37275 Author: jakub Date: Fri Sep 26 20:59:03 2008 New Revision: 140712 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=140712 Log: PR middle-end/37275 * dwarf2out.c (tls_mem_loc_descriptor): New function. (mem_loc_descriptor): Use it for MEM. For PLUS fail if second mem_loc_descriptor failed. Accept UNSPEC. (loc_descriptor): Use tls_mem_loc_descriptor for MEM. For PARALLEL fail if one of the loc_descriptor calls for pieces failed. (loc_descriptor_from_tree_1): Handle even DECL_EXTERNAL __thread vars, as long as they bind locally. For COMPONENT_REF, ARRAY_REF etc. fail if loc_descriptor_from_tree_1 on offset failed. * gcc.target/i386/pr37275.c: New test. Added: trunk/gcc/testsuite/gcc.target/i386/pr37275.c Modified: trunk/gcc/ChangeLog trunk/gcc/dwarf2out.c trunk/gcc/testsuite/ChangeLog Fixed. |