public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "paulius.zaleckas at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/46972] New: __thread storage class variable gets optimized out on ARM
Date: Wed, 15 Dec 2010 21:09:00 -0000	[thread overview]
Message-ID: <bug-46972-4@http.gcc.gnu.org/bugzilla/> (raw)

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 :)


             reply	other threads:[~2010-12-15 21:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-15 21:09 paulius.zaleckas at gmail dot com [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-46972-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).