This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/25150] New: internal error with __thread and memcpy()

Bug seen with the RH version of gcc (gcc-3.4.4-2.fc3) but Jim Wilson says
he can reproduce this with the FSF gcc-3.4.4.
See Message-ID: <> on gcc mailing list

$ gcc -g -O2 -c -DSHOWBUG  bug.c
bug.c: In function `bug':
bug.c:18: error: unrecognizable insn:
(insn:HI 15 14 17 0 bug.c:16 (set (reg/f:SI 64)
        (const:SI (plus:SI (symbol_ref:SI ("foo") [flags 0x22] <var_decl
0xb7e4f1b0 foo>)
                (const_int 4 [0x4])))) -1 (nil)
bug.c:18: internal compiler error: in extract_insn, at recog.c:2083
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:> for instructions.
The bug is not reproducible, so it is likely a hardware or OS problem.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. requires -O2
2. requires __thread variable
3. requires builtin memcpy() (using -fno-builtin avoids the bug)
4. requires 2 memcpy() statements

Actual Results:  gcc failed

Expected Results:  gcc should have succeeded

Additional info:

#include <string.h>     /* memcpy() */

#ifdef SHOWBUG
int foo[2];

  int bar;

  (void) memcpy(&foo[0], &bar, sizeof(bar));
#ifdef SHOWBUG
  (void) memcpy(&foo[1], &bar, sizeof(bar));

           Summary: internal error with __thread and memcpy()
           Product: gcc
           Version: 3.4.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: fcusack at fcusack dot com

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]