Bug 174061 - gcc internal error
Summary: gcc internal error
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 3
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-11-24 07:23 UTC by Frank Cusack
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version: 4.0.1-4.fc4
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-11-29 10:04:19 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
preprocessor output (6.67 KB, application/octet-stream)
2005-11-24 07:45 UTC, Frank Cusack
no flags Details

Description Frank Cusack 2005-11-24 07:23:24 UTC
From Bugzilla Helper:
User-Agent: Opera/8.5 (Macintosh; PPC Mac OS X; U; en)

Description of problem:
$ 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)
    (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:http://bugzilla.redhat.com/bugzilla> for instructions.
The bug is not reproducible, so it is likely a hardware or OS problem.


Version-Release number of selected component (if applicable):
gcc-3.4.4-2.fc3

How reproducible:
Always

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() */

static
#ifdef SHOWBUG
__thread
#endif
int foo[2];

void
bug(void)
{
  int bar;

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

Comment 1 Frank Cusack 2005-11-24 07:45:08 UTC
Created attachment 121436 [details]
preprocessor output

Comment 2 Frank Cusack 2005-11-29 04:43:49 UTC
There's a second bug here:

> The bug is not reproducible, so it is likely a hardware or OS problem.

The bug is quite reproducible.  Message-ID <438BA8FF.9080600>
on the gcc list says this is probably a bug in a RH patch.

Comment 3 Jakub Jelinek 2005-11-29 10:04:19 UTC
As pointed out on gcc ml by Jim Wilson, you should file the PR in upstream
database.  Regarding the second problem, I can't reproduce it, for me it always
prints that the bug is reproducable on gcc 3.4.x.  The ICE is fixed in gcc 4.0.x.


Note You need to log in before you can comment on or make changes to this bug.