public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/61094] New: -O3 insn Internal compiler error in copyprop_hardreg_forward_1, at regcprop.c:775
@ 2014-05-07 10:42 prsodk at gmail dot com
  2014-05-07 12:58 ` [Bug c++/61094] " rguenth at gcc dot gnu.org
                   ` (18 more replies)
  0 siblings, 19 replies; 20+ messages in thread
From: prsodk at gmail dot com @ 2014-05-07 10:42 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 61094
           Summary: -O3 insn Internal compiler error in
                    copyprop_hardreg_forward_1, at regcprop.c:775
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: prsodk at gmail dot com

Created attachment 32753
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32753&action=edit
-O3 ins Internal compiler error in copyprop_hardreg_forward_1, at
regcprop.c:775

Compiled with g++ 4.9.0 on Archlinux

make[2]: Entering directory '/home/user/projects/gmic/src'
g++ -o gmic gmic.cpp -Dgmic_build -I/usr/include -Wall -W -Dgmic_is_beta=1
-Dcimg_use_vt100 -Dgmic_check_image -Dgmic_is_parallel -Dcimg_display=1
-Dcimg_appname=\"gmic\" -I/usr/X11R6/include  -Dcimg_use_png -Dcimg_use_jpeg
-Dcimg_use_tiff -Dcimg_use_zlib -Dcimg_use_openexr -I/usr/include/OpenEXR
-Dcimg_use_fftw3  -O3 -fno-ipa-sra -mtune=generic  -Dgmic_float_only
-Dgmic_main -L/usr/lib -lm -lpthread -L/usr/X11R6/lib -lX11 -lpthread  -lpng
-lz -ljpeg -ltiff -lz -lIlmImf -lHalf -lfftw3 -lfftw3_threads 
In file included from gmic.h:70:0,
                 from gmic.cpp:1762:
./CImg.h: In member function ‘cimg_library::CImg<typename
cimg_library::CImg<T>::ucharT> cimg_library::CImg<T>::__get_select(const
cimg_library::CImgDisplay&, int, int, int, int) const [with T = float; typename
cimg_library::CImg<T>::ucharT = unsigned char]’:
./CImg.h:35001:5: error: insn does not satisfy its constraints:
     }
     ^
(insn 3134 2970 1739 248 (set (reg:DI 21 xmm0)
        (reg:DI 0 ax)) ./CImg.h:22643 89 {*movdi_internal}
     (nil))
./CImg.h:35001:5: internal compiler error: in copyprop_hardreg_forward_1, at
regcprop.c:775

Compiles ok with earlier versions of g++
Compiles ok with -O2

gmic.ii.gz attached 
Full source at:
git clone http://git.code.sf.net/p/gmic/source gmic
>From gcc-bugs-return-450787-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed May 07 10:48:07 2014
Return-Path: <gcc-bugs-return-450787-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 7815 invoked by alias); 7 May 2014 10:48:03 -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 7694 invoked by uid 48); 7 May 2014 10:47:57 -0000
From: "hp at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/59584] [4.8/4.9/4.10 Regression]: regressions related to __builtin_stack_restore
Date: Wed, 07 May 2014 10:48:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: middle-end
X-Bugzilla-Version: 4.8.3
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: hp at gcc dot gnu.org
X-Bugzilla-Status: REOPENED
X-Bugzilla-Priority: P5
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.9.1
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-59584-4-eza4IRUtBL@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-59584-4@http.gcc.gnu.org/bugzilla/>
References: <bug-59584-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: 2014-05/txt/msg00479.txt.bz2
Content-length: 1989

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

--- Comment #15 from Hans-Peter Nilsson <hp at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #14)
> Ok, but it's not clear to me what the bug is and why it's not a target bug
> fixed by your changes.

Ok, I'll try to explain my point without putting time I don't have into this:
the CRIS subtarget I'm most interested in now, requires that the stack-pointer
is valid at all times.  For this target, the fix I committed is enough to cover
the issue with no conceivable way to have such an insn validly split.

For another target, either maybe a completely different port, but there
actually *is* another CRIS subtarget, such a define_split makes sense: the
stack-pointer used at interrupts is different to the "user" stack-pointer
(another register).  For that subtarget the fix is (very very minor) suboptimal
cover-up in the absense of the other commits.  The actual commits here *may*
have made the case where the tweaked define_split would previously match
impossible, or they *may* have just made the issue latent.

The case here is where the stack-pointer is *set* (not just incremented or
decremented) from a variable, and IIRC that instruction sequence is very
unlikely except when __builtin_stack_restore is used, and nobody would use
that, so almost never (as I recall my analysis then and yes I considered
exceptions).  See also
<http://gcc.gnu.org/ml/gcc-patches/2013-12/msg01847.html>, the patch message.

Thus, I'm fine with closing this for the regressions but not exactly for the
issue in comment #5 for which the bug was opened; "the combination of
expr.c:find_args_size_adjust and expr.c:fixup_args_size_notes can't handle a
define_split matching for the stack-adjustment assignment instruction emitted
by __builtin_stack_restore".  (In other words, a person investigating such an
issue in the future, would not be helped by searching the bugzilla and finding
this PR with the previous title as closed.)


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

end of thread, other threads:[~2014-06-18 20:02 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-07 10:42 [Bug c++/61094] New: -O3 insn Internal compiler error in copyprop_hardreg_forward_1, at regcprop.c:775 prsodk at gmail dot com
2014-05-07 12:58 ` [Bug c++/61094] " rguenth at gcc dot gnu.org
2014-05-07 13:01 ` [Bug rtl-optimization/61094] [4.9/4.10 Regression] " rguenth at gcc dot gnu.org
2014-05-09 13:00 ` rguenth at gcc dot gnu.org
2014-05-09 19:05 ` glisse at gcc dot gnu.org
2014-05-10  0:19 ` hjl.tools at gmail dot com
2014-05-11 14:12 ` steven at gcc dot gnu.org
2014-05-12  8:33 ` jakub at gcc dot gnu.org
2014-05-12 12:21 ` law at redhat dot com
2014-05-14 13:53 ` jakub at gcc dot gnu.org
2014-05-14 14:07 ` law at redhat dot com
2014-05-15 19:47 ` law at redhat dot com
2014-05-16  8:03 ` jakub at gcc dot gnu.org
2014-05-16 15:59 ` law at redhat dot com
2014-06-02 19:12 ` law at gcc dot gnu.org
2014-06-13 16:41 ` [Bug rtl-optimization/61094] [4.9 " law at gcc dot gnu.org
2014-06-13 16:50 ` law at gcc dot gnu.org
2014-06-13 16:50 ` law at gcc dot gnu.org
2014-06-13 16:51 ` law at redhat dot com
2014-06-18 20:02 ` uros 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).