RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1212265 - internal compiler error: in extract_insn, at recog.c:2154
Summary: internal compiler error: in extract_insn, at recog.c:2154
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: gcc
Version: 7.1
Hardware: i686
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Jakub Jelinek
QA Contact: Miroslav Franc
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-16 03:33 UTC by Daniel Villeneuve
Modified: 2016-02-01 02:30 UTC (History)
5 users (show)

Fixed In Version: gcc-4.8.5-1.el7
Doc Type: Bug Fix
Doc Text:
A bug in TLS handling on 32-bit Intel and AMD architectures caused that the compiler was trying to use %gs: or %fs: segment registers with the Load Effective Address (LEA) instruction. Consequently, a crash could occur in code with __thread arrays of structures or long long integers. This bug has been fixed, and the code compiles correctly.
Clone Of:
Environment:
Last Closed: 2015-11-19 12:22:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
The source file with minimal external dependencies (#include <string.h>) (478 bytes, text/x-csrc)
2015-04-16 03:33 UTC, Daniel Villeneuve
no flags Details
The preprocessed file as produced by gcc. (9.80 KB, text/x-csrc)
2015-04-16 03:35 UTC, Daniel Villeneuve
no flags Details


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 66470 0 None None None Never
Red Hat Product Errata RHBA-2015:2080 0 normal SHIPPED_LIVE gcc bug fix and enhancement update 2015-11-19 10:51:58 UTC

Description Daniel Villeneuve 2015-04-16 03:33:24 UTC
Created attachment 1015011 [details]
The source file with minimal external dependencies (#include <string.h>)

Description of problem:

compilation in 32-bit mode produces a compiler error

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


How reproducible:

compile the attached source file

Steps to Reproduce:
1. gcc -m32 -o bug.o -c bug.c
2.
3.

Actual results:

bartok[daniel/bug-gcc] 0 $ gcc -m32  -o bug.o -c bug.c
bug.c: In function ‘roll’:
bug.c:22:1: error: unrecognizable insn:
 }
 ^
(insn 47 15 48 3 (set (reg:SI 1 dx [+4 ])
        (plus:SI (plus:SI (mult:SI (reg:SI 1 dx [orig:60 D.1887 ] [60])
                    (const_int 8 [0x8]))
                (unspec:SI [
                        (const_int 0 [0])
                    ] UNSPEC_TP))
            (reg:SI 0 ax [72]))) bug.c:18 -1
     (nil))
bug.c:22:1: internal compiler error: in extract_insn, at recog.c:2154
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/cctbg6tl.out file, please attach this to your bugreport.

Expected results:

A correctly compiled file.

Additional info:

Comment 1 Daniel Villeneuve 2015-04-16 03:35:26 UTC
Created attachment 1015012 [details]
The preprocessed file as produced by gcc.

Comment 2 Daniel Villeneuve 2015-04-16 03:36:53 UTC
Using memcpy instead of structure assignment circumvents the problem.

Comment 4 Daniel Villeneuve 2015-04-16 03:39:24 UTC
The gcc version used:

bartok[daniel/bug-gcc] 0 $ gcc --version; echo; gcc -v
gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-9)
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.3/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.3-20140911/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.3-20140911/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC)

Comment 5 Daniel Villeneuve 2015-04-16 03:40:40 UTC
The problem also occurs with a freshly compiled gcc-4.8.4.

Comment 6 Marek Polacek 2015-04-16 06:24:22 UTC
I could reproduce this even with the mainline gcc, so there's nothing to backport at the moment.

Comment 7 Jakub Jelinek 2015-06-09 08:39:02 UTC
Reduced testcase:
extern __thread struct S { int a, b; } a[10];
struct S foo (int b) { return a[b]; }

Comment 9 Jakub Jelinek 2015-06-10 09:40:57 UTC
Fix committed upstream.

Comment 13 errata-xmlrpc 2015-11-19 12:22:57 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-2080.html


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