public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/46972] New: __thread storage class variable gets optimized out on ARM
@ 2010-12-15 21:09 paulius.zaleckas at gmail dot com
  2010-12-15 21:14 ` [Bug target/46972] " paulius.zaleckas at gmail dot com
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: paulius.zaleckas at gmail dot com @ 2010-12-15 21:09 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46972

           Summary: __thread storage class variable gets optimized out on
                    ARM
           Product: gcc
           Version: 4.5.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: paulius.zaleckas@gmail.com


Created attachment 22775
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22775
test case source code

My host system is x86_64 and I am cross compiling this file(attached) for ARM
with following command: arm-unknown-linux-uclibcgnueabi-gcc -pipe -O1 -Wall
thread_test.c -o thread_test
Executing ./thread_test on my ARM system results in segfault. If I comment out
test_set() function or remove __thread specifier or compile it without
optimizations (-O0) test passes.
I tried this test also on my host system (Fedora 14) and it does not fail
there.
My cross compiler is vanila GCC + patches from:
http://git.buildroot.net/buildroot/tree/toolchain/gcc/4.5.1

It took me about a week to realize what is going on and make this test case out
of not working cross compiled pulseaudio-0.9.22 server :)


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-12-15  1:54 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-15 21:09 [Bug c/46972] New: __thread storage class variable gets optimized out on ARM paulius.zaleckas at gmail dot com
2010-12-15 21:14 ` [Bug target/46972] " paulius.zaleckas at gmail dot com
2010-12-16  9:14 ` mikpe at it dot uu.se
2010-12-16 20:12 ` paulius.zaleckas at gmail dot com
2010-12-19 16:07 ` paulius.zaleckas at gmail dot com
2010-12-19 19:39 ` paulius.zaleckas at gmail dot com
2010-12-19 21:53 ` pinskia at gcc dot gnu.org
2010-12-20 11:28 ` paulius.zaleckas at gmail dot com
2010-12-20 16:51 ` pinskia at gcc dot gnu.org
2010-12-21 13:13 ` iains at gcc dot gnu.org
2011-12-15  1:57 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).