[Bug rtl-optimization/44169] Wrong code while generating TLS offsets
--- Comment #16 from amodra at gcc dot gnu dot org 2010-06-03 02:47 --- Subject: Bug 44169 Author: amodra Date: Thu Jun 3 02:47:11 2010 New Revision: 160206 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=160206 Log: PR target/44169 * config/rs6000/rs6000.md (load_toc_v4_PIC_1b): Add label operand. * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Pass label rtx to gen_load_toc_v4_PIC_1b. Tidy. (rs6000_emit_load_toc_table): Likewise. Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/rs6000.c trunk/gcc/config/rs6000/rs6000.md -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44169
[Bug rtl-optimization/44169] Wrong code while generating TLS offsets
--- Comment #17 from amodra at gcc dot gnu dot org 2010-06-03 02:57 --- Subject: Bug 44169 Author: amodra Date: Thu Jun 3 02:57:19 2010 New Revision: 160207 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=160207 Log: PR target/44169 * config/rs6000/rs6000.md (load_toc_v4_PIC_1b): Add label operand. * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Pass label rtx to gen_load_toc_v4_PIC_1b. Tidy. (rs6000_emit_load_toc_table): Likewise. Modified: branches/gcc-4_5-branch/gcc/ChangeLog branches/gcc-4_5-branch/gcc/config/rs6000/rs6000.c branches/gcc-4_5-branch/gcc/config/rs6000/rs6000.md -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44169
[Bug rtl-optimization/44169] Wrong code while generating TLS offsets
--- Comment #18 from amodra at gcc dot gnu dot org 2010-06-03 03:09 --- Subject: Bug 44169 Author: amodra Date: Thu Jun 3 03:08:32 2010 New Revision: 160208 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=160208 Log: PR target/44169 * config/rs6000/rs6000.md (load_toc_v4_PIC_1b): Add label operand. * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Pass label rtx to gen_load_toc_v4_PIC_1b. Tidy. (rs6000_emit_load_toc_table): Likewise. Modified: branches/gcc-4_4-branch/gcc/ChangeLog branches/gcc-4_4-branch/gcc/config/rs6000/rs6000.c branches/gcc-4_4-branch/gcc/config/rs6000/rs6000.md -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44169
[Bug rtl-optimization/44169] Wrong code while generating TLS offsets
--- Comment #19 from amodra at gmail dot com 2010-06-03 03:26 --- Fixed all active branches -- amodra at gmail dot com changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44169
[Bug rtl-optimization/44169] Wrong code while generating TLS offsets
-- amodra at gmail dot com changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |amodra at gmail dot com |dot org | Status|NEW |ASSIGNED Last reconfirmed|2010-05-18 08:26:21 |2010-05-28 07:30:15 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44169
[Bug rtl-optimization/44169] Wrong code while generating TLS offsets
--- Comment #15 from amodra at gmail dot com 2010-05-28 13:16 --- Created an attachment (id=20768) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20768action=view) gcc-4.4 patch The underlying problem is that the load_toc_v4_PIC_1b rtl doesn't properly describe that its output depends both on the value of a symbol, _GLOBAL_OFFSET_TABLE_, and on its location. This could be fixed by using an unspec_volatile rather than unspec. I chose instead to add a label to the rtl. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44169
[Bug rtl-optimization/44169] Wrong code while generating TLS offsets
--- Comment #12 from amodra at gmail dot com 2010-05-28 02:28 --- This problem can be seen on powerpc-linux-gcc with the options -O1 -fPIC -ftls-model=initial-exec -misel. The error occurs between 172r.ira and 174r.postreload, not at 186r.dce as previously reported. -- amodra at gmail dot com changed: What|Removed |Added GCC target triplet|powerpc-linux-gnuspe|powerpc-* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44169
[Bug rtl-optimization/44169] Wrong code while generating TLS offsets
--- Comment #13 from amodra at gmail dot com 2010-05-28 02:31 --- Created an attachment (id=20765) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20765action=view) ok at this point -- amodra at gmail dot com changed: What|Removed |Added Attachment #20684|0 |1 is obsolete|| Attachment #20685|0 |1 is obsolete|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44169
[Bug rtl-optimization/44169] Wrong code while generating TLS offsets
--- Comment #14 from amodra at gmail dot com 2010-05-28 02:32 --- Created an attachment (id=20766) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20766action=view) broken here, see insn 27 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44169
[Bug rtl-optimization/44169] Wrong code while generating TLS offsets
--- Comment #11 from gcc at breakpoint dot cc 2010-05-21 15:21 --- Reverting the change in PR39254 makes the issue go away. Any ideas? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44169
[Bug rtl-optimization/44169] Wrong code while generating TLS offsets
--- Comment #6 from segher at gcc dot gnu dot org 2010-05-20 12:10 --- I don't see the problem with 4.3 . Kyle, are you sure it doesn't happen for you with 4.4? I use powerpc-linux-gnuspe-gcc -Wall -W -O1 -pthread -ftls-model=initial-exec -mcpu=8540 -fPIC -S t.c -fverbose-asm paste your output of that? -- segher at gcc dot gnu dot org changed: What|Removed |Added Known to work||4.3.5 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44169
[Bug rtl-optimization/44169] Wrong code while generating TLS offsets
--- Comment #7 from Kyle dot D dot Moffett at boeing dot com 2010-05-20 12:17 --- Created an attachment (id=20707) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20707action=view) Assembled tc.c output from Debian-built powerpc-linux-gnuspe-gcc 4.3.4 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44169
[Bug rtl-optimization/44169] Wrong code while generating TLS offsets
--- Comment #8 from Kyle dot D dot Moffett at boeing dot com 2010-05-20 12:19 --- Created an attachment (id=20708) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20708action=view) Assembled tc.c output from Debian-built powerpc-linux-gnuspe-gcc 4.4.4 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44169
[Bug rtl-optimization/44169] Wrong code while generating TLS offsets
--- Comment #9 from Kyle dot D dot Moffett at boeing dot com 2010-05-20 12:29 --- Created an attachment (id=20710) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20710action=view) Assembled tc.c output from Debian-built powerpc-linux-gnuspe-gcc 4.4.2 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44169
[Bug rtl-optimization/44169] Wrong code while generating TLS offsets
--- Comment #10 from Kyle dot D dot Moffett at boeing dot com 2010-05-20 12:37 --- Ok, it looks like the bug was introduced in the 4.4 branch between 4.4.2 and 4.4.4, because my old GCC 4.4.2 compiler works, but the 4.4.4 I built yesterday after I noticed this report does not. If needed I can spend some time to track down exactly which optimization flag(s) cause the problem, but hopefully we've narrowed down the versions closely enough for it to be easy to find. :-D Cheers, Kyle Moffett -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44169
[Bug rtl-optimization/44169] Wrong code while generating TLS offsets
--- Comment #5 from Kyle dot D dot Moffett at boeing dot com 2010-05-20 04:53 --- I am not able to reproduce this with a cross-compiling GCC 4.4.3 or 4.4.4 built from Debian sources. Configuration parameters for GCC 4.4.4 were: -v --with-pkgversion='Debian 4.4.4-2' --with-bugurl='file:///usr/share/doc/gcc-4.4/README.Bugs' --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/powerpc-linux-gnuspe/include/c++/4.4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --with-cpu=8548 --enable-e500_double --with-long-double-128 --disable-multilib --enable-checking=release --program-prefix=powerpc-linux-gnuspe- --includedir=/usr/powerpc-linux-gnuspe/include --with-headers=/usr/powerpc-linux-gnuspe/include --with-libs=/usr/powerpc-linux-gnuspe/lib --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=powerpc-linux-gnuspe CC=gcc build_alias=x86_64-linux-gnu host_alias=x86_64-linux-gnu target_alias=powerpc-linux-gnuspe --enable-languages=c,c++,fortran,objc,obj-c++ Versions are: powerpc-linux-gnuspe-gcc-4.3 (Debian 4.3.4-10 with a patch to debian/rules) 4.3.4 powerpc-linux-gnuspe-gcc-4.4 (Debian 4.4.4-2 with a patch to debian/rules) 4.4.4 The C file was compiled as follows in both cases: powerpc-linux-gnuspe-gcc -Werror -pthread -ftls-model=initial-exec -O2 -pthread -fPIC -DPIC tc.c -o tc.S -S -mcpu=8540 -O1 -fdump-rtl-all -c I'm not very familiar with the RTL passes, but if somebody can tell me what else to look for or test I'll go scrounge around to see if I can find what's hiding the problem for me. Cheers, Kyle Moffett -- Kyle dot D dot Moffett at boeing dot com changed: What|Removed |Added CC||Kyle dot D dot Moffett at ||boeing dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44169
[Bug rtl-optimization/44169] Wrong code while generating TLS offsets
--- Comment #4 from segher at gcc dot gnu dot org 2010-05-18 08:26 --- Confirmed with current 4.4 branch and mainline. -mabi=nospe -mno=spe doesn't make the problem go away; only changing -mcpu does. -- segher at gcc dot gnu dot org changed: What|Removed |Added CC||segher at gcc dot gnu dot ||org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Known to fail||4.4.4 4.6.0 Last reconfirmed|-00-00 00:00:00 |2010-05-18 08:26:21 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44169
[Bug rtl-optimization/44169] Wrong code while generating TLS offsets
--- Comment #1 from gcc at breakpoint dot cc 2010-05-17 15:44 --- Created an attachment (id=20683) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20683action=view) test case -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44169
[Bug rtl-optimization/44169] Wrong code while generating TLS offsets
--- Comment #2 from gcc at breakpoint dot cc 2010-05-17 15:44 --- Created an attachment (id=20684) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20684action=view) rtl pass 185r.cprop_hardreg -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44169
[Bug rtl-optimization/44169] Wrong code while generating TLS offsets
--- Comment #3 from gcc at breakpoint dot cc 2010-05-17 15:45 --- Created an attachment (id=20685) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20685action=view) rtl pass 186r.dce -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44169