public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/58067] New: ICE in GFortran recog.c:2158
@ 2013-08-02 23:58 woodard at redhat dot com
  2013-08-03  7:16 ` [Bug target/58067] " ubizjak at gmail dot com
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: woodard at redhat dot com @ 2013-08-02 23:58 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 58067
           Summary: ICE in GFortran recog.c:2158
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: woodard at redhat dot com

Created attachment 30602
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30602&action=edit
a flattened self contained version of the NAS benchmark.

When I try to compile one of the NAS benchmark's with -fpic and -mcmodel=large
with GCC 4.8.0 up through the current trunk (20130802) I get an internal
compiler error. This looks rather similar to PR56797 but that particular bug
seems to have been only on ARM and this occurs on x86_64. So it may be that
PR56797 is more expansive than initially thought or this might be a different
bug. I can't tell.

[ben@snog BT-MZ]$ PATH=/home/ben/Work/gcc-test/bin/:$PATH gfortran -c
-save-temps -O2 -g -fopenmp -fpic -mcmodel=large bt-all.f
bt-all.f: In function ‘MAIN__._omp_fn.1’:
bt-all.f:305:0: note: non-delegitimized UNSPEC UNSPEC_PLTOFF (9) found in
variable location
        do iz = 1, proc_num_zones
 ^
bt-all.f:305:0: note: non-delegitimized UNSPEC UNSPEC_PLTOFF (9) found in
variable location
bt-all.f: In function ‘MAIN__._omp_fn.0’:
bt-all.f:449:0: error: unrecognizable insn:
  999   continue
 ^
(call_insn/u 52 51 53 2 (parallel [
            (set (reg:DI 0 ax)
                (call:DI (mem:QI (symbol_ref:DI ("__tls_get_addr")) [0 S1 A8])
                    (const_int 0 [0])))
            (unspec:DI [
                    (symbol_ref:DI ("omp_cmn2a_") [flags 0x10] <var_decl
0x7f57f37f9390 omp_cmn2a>)
                ] UNSPEC_TLS_GD)
        ]) bt-all.f:48 -1
     (expr_list:REG_EH_REGION (const_int -2147483648 [0xffffffff80000000])
        (nil))
    (nil))
bt-all.f:449:0: internal compiler error: in extract_insn, at recog.c:2158
0x922c1a _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
    ../.././gcc/rtl-error.c:109
0x922c49 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
    ../.././gcc/rtl-error.c:117
0x8f966a extract_insn(rtx_def*)
    ../.././gcc/recog.c:2158
0x7bdbee instantiate_virtual_regs_in_insn
    ../.././gcc/function.c:1609
0x7bdbee instantiate_virtual_regs
    ../.././gcc/function.c:1926
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

This problem doesn't seem to occur except when you have -fpic and
-mcmodel=large. Changing the memory model to medium or small or removing the
-fpic allows the code to compile.

Attached is a flattened self contained version of the NAS benchmark my fortran
is not good enough to boil it down into a more parsimonious reproducer.
>From gcc-bugs-return-427248-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Aug 03 00:21:26 2013
Return-Path: <gcc-bugs-return-427248-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 21697 invoked by alias); 3 Aug 2013 00:21:26 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 21619 invoked by uid 48); 3 Aug 2013 00:21:23 -0000
From: "ppluzhnikov at google dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/58066] GCC mis-compiles access to TLS variable with -fPIC on x86_64
Date: Sat, 03 Aug 2013 00:21:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: unknown
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ppluzhnikov at google dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-58066-4-pj2OVARH7d@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-58066-4@http.gcc.gnu.org/bugzilla/>
References: <bug-58066-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-08/txt/msg00172.txt.bz2
Content-length: 343

http://gcc.gnu.org/bugzilla/show_bug.cgi?idX066

--- Comment #2 from Paul Pluzhnikov <ppluzhnikov at google dot com> ---
(In reply to Andrew Pinski from comment #1)

> Which most Linux distro default to anyways ...

Ubuntu 12.04.1 LTS doesn't.
Configuring trunk GCC on it doesn't default to GNU2 TLS either.

What is the way to turn it on?


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

end of thread, other threads:[~2021-08-02 23:00 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-02 23:58 [Bug fortran/58067] New: ICE in GFortran recog.c:2158 woodard at redhat dot com
2013-08-03  7:16 ` [Bug target/58067] " ubizjak at gmail dot com
2013-08-05 23:08 ` woodard at redhat dot com
2013-08-06 20:08 ` aoliva at gcc dot gnu.org
2013-08-06 22:03 ` aoliva at gcc dot gnu.org
2013-08-06 23:44 ` woodard at redhat dot com
2013-08-06 23:47 ` woodard at redhat dot com
2013-08-13 11:29 ` jakub at gcc dot gnu.org
2013-08-14 10:59 ` jakub at gcc dot gnu.org
2013-08-28 16:31 ` jakub at gcc dot gnu.org
2014-06-13 15:05 ` tejohnson at google dot com
2021-04-29 16:42 ` zsojka at seznam dot cz
2021-08-02 22:59 ` pinskia at gcc dot gnu.org
2021-08-02 23:00 ` pinskia at gcc dot gnu.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).