public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/20286] New: gcc panic with __thread attribute
@ 2005-03-02 16:29 eranian at hpl dot hp dot com
  2005-03-02 16:42 ` [Bug target/20286] " pinskia at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: eranian at hpl dot hp dot com @ 2005-03-02 16:29 UTC (permalink / raw)
  To: gcc-bugs

The current PAPI (icl.cs.utk.edu) source code does not compile
on Debian/testing on IA-64. The current gcc 3.3.5 panics when
compiling threads.c. I narrowed down the problem to the following
code fragment:

typedef struct _ThreadInfo {
  unsigned long int tid;
} ThreadInfo_t;
extern __thread ThreadInfo_t *_papi_hwi_my_thread;
inline static ThreadInfo_t *_papi_hwi_lookup_thread(void)
{

  { ; };
  return(_papi_hwi_my_thread);
}
__thread ThreadInfo_t *_papi_hwi_my_thread;

t2.c:15: internal compiler error: in ia64_encode_section_info, at
config/ia64/ia64.c:7363

The problem disappear if the definition of
the variable is moved before the inline function, i.e.,
before it is used.

The problem is also present on 3.3.4. I believe it is gone
from 3.4.0.

-- 
           Summary: gcc panic with __thread attribute
           Product: gcc
           Version: 3.3.5
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: eranian at hpl dot hp dot com
                CC: gcc-bugs at gcc dot gnu dot org,wilson at specifixinc
                    dot com
 GCC build triplet: ia64-linux
  GCC host triplet: ia64-linux
GCC target triplet: ia64-linux


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


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

end of thread, other threads:[~2005-03-29  0:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-02 16:29 [Bug c/20286] New: gcc panic with __thread attribute eranian at hpl dot hp dot com
2005-03-02 16:42 ` [Bug target/20286] " pinskia at gcc dot gnu dot org
2005-03-02 16:48 ` [Bug target/20286] [3.3 only] " pinskia at gcc dot gnu dot org
2005-03-24  0:10 ` wilson at gcc dot gnu dot org
2005-03-25 22:13 ` gdr at integrable-solutions dot net
2005-03-28 22:40 ` wilson at gcc dot gnu dot org
2005-03-29  0:32 ` cvs-commit at gcc dot gnu dot org
2005-03-29  0:33 ` wilson at gcc dot gnu dot 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).