public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/58079] New: internal compiler error: in do_SUBST, at combine.c:711
@ 2013-08-04 13:24 JuergenUrban at gmx dot de
  2013-08-04 21:20 ` [Bug rtl-optimization/58079] " jbglaw@lug-owl.de
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: JuergenUrban at gmx dot de @ 2013-08-04 13:24 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 58079
           Summary: internal compiler error: in do_SUBST, at combine.c:711
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: JuergenUrban at gmx dot de

Created attachment 30608
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30608&action=edit
dvd_demux.i created from dvd_demux.c

An internal compiler error in do_SUBST happens. The comment in the source code
above the gcc_assert() is: "Sanity check that we're replacing oldval with a
CONST_INT that is a valid sign-extension for the original mode.".

The error happens when compiling the DVB modules in linux-2.6.35.4 for
Playstation 2 (mips). I used GCC r201473 from SVN. The error is also in
r200155. I used mips64r5900el, but it doesn't seem to be related to this. This
also happens when changing the ABI or the CPU type (still mips). Not using the
parameters "-Os", "-mno-abicalls" or "-mlong-calls" fix the problem.
I tried to create a small test case, but changing the source code and keeping
the error is difficult. I stripped the source code as far as possible and
attached the preprocessor output.

mips64r5900el-linux-gnu-gcc (GCC) 4.9.0 20130804 (experimental)

I didn't changed the GCC source code, even if the following output contains the
word "patched" in the path.

The error happens when executing the following command:
LANG=C mips64r5900el-linux-gnu-gcc -march=r4000 -mtune=r4000 -Os -mabi=32 -G 0
-mno-abicalls -msoft-float -mlong-calls  -c -o /tmp/test.o dvb_demux.i
dvb_demux.c: In function 'dvb_dmx_swfilter_packets':
dvb_demux.c:214:1: internal compiler error: in do_SUBST, at combine.c:711
 }
 ^
0xbe60c4 do_SUBST
       
/home/jur/Programmierung/ps2/linux/simple-toolchain/build21/gcc-svn-r201473-patched/gcc/combine.c:710
0xbf5db9 combine_simplify_rtx
       
/home/jur/Programmierung/ps2/linux/simple-toolchain/build21/gcc-svn-r201473-patched/gcc/combine.c:5813
0xbf710f subst
       
/home/jur/Programmierung/ps2/linux/simple-toolchain/build21/gcc-svn-r201473-patched/gcc/combine.c:5149
0xbf6eaf subst
       
/home/jur/Programmierung/ps2/linux/simple-toolchain/build21/gcc-svn-r201473-patched/gcc/combine.c:5094
0xbf6eaf subst
       
/home/jur/Programmierung/ps2/linux/simple-toolchain/build21/gcc-svn-r201473-patched/gcc/combine.c:5094
0xbf83c8 try_combine
       
/home/jur/Programmierung/ps2/linux/simple-toolchain/build21/gcc-svn-r201473-patched/gcc/combine.c:3142
0xbfd4a0 combine_instructions
       
/home/jur/Programmierung/ps2/linux/simple-toolchain/build21/gcc-svn-r201473-patched/gcc/combine.c:1368
0xbfd4a0 rest_of_handle_combine
       
/home/jur/Programmierung/ps2/linux/simple-toolchain/build21/gcc-svn-r201473-patched/gcc/combine.c:13826
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.


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

* [Bug rtl-optimization/58079] internal compiler error: in do_SUBST, at combine.c:711
  2013-08-04 13:24 [Bug c/58079] New: internal compiler error: in do_SUBST, at combine.c:711 JuergenUrban at gmx dot de
@ 2013-08-04 21:20 ` jbglaw@lug-owl.de
  2013-08-05  8:42 ` mikpe at it dot uu.se
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jbglaw@lug-owl.de @ 2013-08-04 21:20 UTC (permalink / raw)
  To: gcc-bugs

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

Jan-Benedict Glaw <jbglaw@lug-owl.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jbglaw@lug-owl.de

--- Comment #1 from Jan-Benedict Glaw <jbglaw@lug-owl.de> ---
Created attachment 30612
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30612&action=edit
Reduced it a bit.

Can be reproduced with r201473.


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

* [Bug rtl-optimization/58079] internal compiler error: in do_SUBST, at combine.c:711
  2013-08-04 13:24 [Bug c/58079] New: internal compiler error: in do_SUBST, at combine.c:711 JuergenUrban at gmx dot de
  2013-08-04 21:20 ` [Bug rtl-optimization/58079] " jbglaw@lug-owl.de
@ 2013-08-05  8:42 ` mikpe at it dot uu.se
  2013-08-05 12:05 ` mikpe at it dot uu.se
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: mikpe at it dot uu.se @ 2013-08-05  8:42 UTC (permalink / raw)
  To: gcc-bugs

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

Mikael Pettersson <mikpe at it dot uu.se> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mikpe at it dot uu.se

--- Comment #2 from Mikael Pettersson <mikpe at it dot uu.se> ---
I can reproduce the ICE with 4.9 and 4.8 crosses to mips64-linux, but not with
4.7 or 4.6.


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

* [Bug rtl-optimization/58079] internal compiler error: in do_SUBST, at combine.c:711
  2013-08-04 13:24 [Bug c/58079] New: internal compiler error: in do_SUBST, at combine.c:711 JuergenUrban at gmx dot de
  2013-08-04 21:20 ` [Bug rtl-optimization/58079] " jbglaw@lug-owl.de
  2013-08-05  8:42 ` mikpe at it dot uu.se
@ 2013-08-05 12:05 ` mikpe at it dot uu.se
  2013-08-06 21:14 ` rsandifo at gcc dot gnu.org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: mikpe at it dot uu.se @ 2013-08-05 12:05 UTC (permalink / raw)
  To: gcc-bugs

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

Mikael Pettersson <mikpe at it dot uu.se> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rdsandiford at googlemail dot com

--- Comment #3 from Mikael Pettersson <mikpe at it dot uu.se> ---
Started with Uros' PR54457 patch in r191928.  I'm not sure if that patch was
wrong or if it exposed a problem in the mips backend.  Cc:ing a MIPS maintainer
(Richard S.)


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

* [Bug rtl-optimization/58079] internal compiler error: in do_SUBST, at combine.c:711
  2013-08-04 13:24 [Bug c/58079] New: internal compiler error: in do_SUBST, at combine.c:711 JuergenUrban at gmx dot de
                   ` (2 preceding siblings ...)
  2013-08-05 12:05 ` mikpe at it dot uu.se
@ 2013-08-06 21:14 ` rsandifo at gcc dot gnu.org
  2013-08-08 18:45 ` rsandifo at gcc dot gnu.org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2013-08-06 21:14 UTC (permalink / raw)
  To: gcc-bugs

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

rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rsandifo at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |rsandifo at gcc dot gnu.org

--- Comment #4 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
(In reply to Mikael Pettersson from comment #3)
> Started with Uros' PR54457 patch in r191928.  I'm not sure if that patch was
> wrong or if it exposed a problem in the mips backend.

Looks like a latent combine bug that's being exposed by the better
subreg optimisation.  simplify_comparison is legitimately widening
a QImode comparison to SImode (since the target doesn't support
QImode comparisons), but combine_simplify_rtx is then trying to substitute
these widened values in-place, which trips the sanity check in do_SUBST.

I'm about to post a patch for comments.


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

* [Bug rtl-optimization/58079] internal compiler error: in do_SUBST, at combine.c:711
  2013-08-04 13:24 [Bug c/58079] New: internal compiler error: in do_SUBST, at combine.c:711 JuergenUrban at gmx dot de
                   ` (3 preceding siblings ...)
  2013-08-06 21:14 ` rsandifo at gcc dot gnu.org
@ 2013-08-08 18:45 ` rsandifo at gcc dot gnu.org
  2013-08-08 18:49 ` rsandifo at gcc dot gnu.org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2013-08-08 18:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
Patch applied to trunk.


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

* [Bug rtl-optimization/58079] internal compiler error: in do_SUBST, at combine.c:711
  2013-08-04 13:24 [Bug c/58079] New: internal compiler error: in do_SUBST, at combine.c:711 JuergenUrban at gmx dot de
                   ` (4 preceding siblings ...)
  2013-08-08 18:45 ` rsandifo at gcc dot gnu.org
@ 2013-08-08 18:49 ` rsandifo at gcc dot gnu.org
  2013-09-14 20:12 ` danglin at gcc dot gnu.org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2013-08-08 18:49 UTC (permalink / raw)
  To: gcc-bugs

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

rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #6 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
...which means I should close the thing.


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

* [Bug rtl-optimization/58079] internal compiler error: in do_SUBST, at combine.c:711
  2013-08-04 13:24 [Bug c/58079] New: internal compiler error: in do_SUBST, at combine.c:711 JuergenUrban at gmx dot de
                   ` (5 preceding siblings ...)
  2013-08-08 18:49 ` rsandifo at gcc dot gnu.org
@ 2013-09-14 20:12 ` danglin at gcc dot gnu.org
  2013-09-28 16:18 ` steve at sk2 dot org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: danglin at gcc dot gnu.org @ 2013-09-14 20:12 UTC (permalink / raw)
  To: gcc-bugs

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

John David Anglin <danglin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |danglin at gcc dot gnu.org

--- Comment #7 from John David Anglin <danglin at gcc dot gnu.org> ---
Richard, this bug is still present on the 4.8 branch.  Could you
backport your patch?

Bug also breaks kernel builds on hppa-unknown-linux-gnu.


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

* [Bug rtl-optimization/58079] internal compiler error: in do_SUBST, at combine.c:711
  2013-08-04 13:24 [Bug c/58079] New: internal compiler error: in do_SUBST, at combine.c:711 JuergenUrban at gmx dot de
                   ` (6 preceding siblings ...)
  2013-09-14 20:12 ` danglin at gcc dot gnu.org
@ 2013-09-28 16:18 ` steve at sk2 dot org
  2013-10-28 16:04 ` ubizjak at gmail dot com
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: steve at sk2 dot org @ 2013-09-28 16:18 UTC (permalink / raw)
  To: gcc-bugs

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

Stephen Kitt <steve at sk2 dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |steve at sk2 dot org

--- Comment #8 from Stephen Kitt <steve at sk2 dot org> ---
*** Bug 58558 has been marked as a duplicate of this bug. ***


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

* [Bug rtl-optimization/58079] internal compiler error: in do_SUBST, at combine.c:711
  2013-08-04 13:24 [Bug c/58079] New: internal compiler error: in do_SUBST, at combine.c:711 JuergenUrban at gmx dot de
                   ` (7 preceding siblings ...)
  2013-09-28 16:18 ` steve at sk2 dot org
@ 2013-10-28 16:04 ` ubizjak at gmail dot com
  2013-10-29 15:44 ` [Bug rtl-optimization/58079] [4.8 Regression] " uros at gcc dot gnu.org
  2013-10-29 16:06 ` ubizjak at gmail dot com
  10 siblings, 0 replies; 12+ messages in thread
From: ubizjak at gmail dot com @ 2013-10-28 16:04 UTC (permalink / raw)
  To: gcc-bugs

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

Uroš Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mcree at orcon dot net.nz

--- Comment #9 from Uroš Bizjak <ubizjak at gmail dot com> ---
*** Bug 58892 has been marked as a duplicate of this bug. ***
>From gcc-bugs-return-432870-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Oct 28 16:04:41 2013
Return-Path: <gcc-bugs-return-432870-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 11138 invoked by alias); 28 Oct 2013 16:04:41 -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 11052 invoked by uid 48); 28 Oct 2013 16:04:38 -0000
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/58892] [4.8 Regression] ICE in combine.c when using -Os on alpha
Date: Mon, 28 Oct 2013 16:04:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: rtl-optimization
X-Bugzilla-Version: 4.8.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ubizjak at gmail dot com
X-Bugzilla-Status: RESOLVED
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: bug_status resolution
Message-ID: <bug-58892-4-kMbZUnMp77@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-58892-4@http.gcc.gnu.org/bugzilla/>
References: <bug-58892-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-10/txt/msg02014.txt.bz2
Content-length: 509

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

Uroš Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #2 from Uroš Bizjak <ubizjak at gmail dot com> ---
Duplicate of PR58079.

*** This bug has been marked as a duplicate of bug 58079 ***
>From gcc-bugs-return-432872-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Oct 28 16:07:35 2013
Return-Path: <gcc-bugs-return-432872-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 14107 invoked by alias); 28 Oct 2013 16:07:34 -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 14026 invoked by uid 48); 28 Oct 2013 16:07:29 -0000
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/58079] internal compiler error: in do_SUBST, at combine.c:711
Date: Mon, 28 Oct 2013 16:07:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: rtl-optimization
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ubizjak at gmail dot com
X-Bugzilla-Status: REOPENED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: rsandifo at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status resolution
Message-ID: <bug-58079-4-Uw969Mw3Z5@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-58079-4@http.gcc.gnu.org/bugzilla/>
References: <bug-58079-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-10/txt/msg02016.txt.bz2
Content-length: 530

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

Uroš Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #10 from Uroš Bizjak <ubizjak at gmail dot com> ---
This patch has to be backported to 4.8 branch, as confirmed by duplicate
failures on three different targets.
>From gcc-bugs-return-432873-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Oct 28 16:09:36 2013
Return-Path: <gcc-bugs-return-432873-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 15528 invoked by alias); 28 Oct 2013 16:09:35 -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 15474 invoked by uid 48); 28 Oct 2013 16:09:31 -0000
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/58079] [4.8 Regression] internal compiler error: in do_SUBST, at combine.c:711
Date: Mon, 28 Oct 2013 16:09:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: rtl-optimization
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ubizjak at gmail dot com
X-Bugzilla-Status: REOPENED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: rsandifo at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.8.3
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cf_gcctarget target_milestone short_desc
Message-ID: <bug-58079-4-tDEOipcOF9@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-58079-4@http.gcc.gnu.org/bugzilla/>
References: <bug-58079-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-10/txt/msg02017.txt.bz2
Content-length: 827

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

Uroš Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|mips64r5900el-linux-gnu     |mips64r5900el-linux-gnu,
                   |                            |hppa-unknown-linux-gnu,
                   |                            |alpha-linux-gnu
   Target Milestone|---                         |4.8.3
            Summary|internal compiler error: in |[4.8 Regression] internal
                   |do_SUBST, at combine.c:711  |compiler error: in
                   |                            |do_SUBST, at combine.c:711

--- Comment #11 from Uroš Bizjak <ubizjak at gmail dot com> ---
Still regression on 4.8 branch.
>From gcc-bugs-return-432874-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Oct 28 16:16:39 2013
Return-Path: <gcc-bugs-return-432874-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 22644 invoked by alias); 28 Oct 2013 16:16:39 -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 22613 invoked by uid 48); 28 Oct 2013 16:16:34 -0000
From: "kimwooyoung at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/58906] New: SELECT TYPE with CLASS IS generates ICE
Date: Mon, 28 Oct 2013 16:16:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: fortran
X-Bugzilla-Version: 4.8.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: kimwooyoung at gmail 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter
Message-ID: <bug-58906-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-10/txt/msg02018.txt.bz2
Content-length: 2625

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

            Bug ID: 58906
           Summary: SELECT TYPE with CLASS IS generates ICE
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kimwooyoung at gmail dot com

The code fragment causes gfortan to die with a seg fault.
Using 'TYPE IS' instead of 'CLASS IS' seems o.k.

MODULE mymod

  TYPE base
  CONTAINS
  END TYPE base

  TYPE, EXTENDS(base) :: child
    CLASS(*), DIMENSION(:), POINTER :: arr
  CONTAINS
  END TYPE child

CONTAINS

  SUBROUTINE f(r)
    CLASS(base), INTENT(INOUT) ::  r
    SELECT TYPE ( r )
    CLASS IS ( child )
    !TYPE IS ( child )
      SELECT TYPE( iarr=>r%arr )
      TYPE IS ( INTEGER )
        CALL func( iarr )
      END SELECT
    END SELECT
  END SUBROUTINE f

END MODULE mymod

$ gfortran -c reprod2.F90
f951: internal compiler error: Segmentation fault
0x869cbf crash_signal
        ../../gcc-4.8.2/gcc/toplev.c:332
0x56a244 resolve_select_type
        ../../gcc-4.8.2/gcc/fortran/resolve.c:8367
0x56b7cc resolve_code
        ../../gcc-4.8.2/gcc/fortran/resolve.c:10379
0x56d24e resolve_codes
        ../../gcc-4.8.2/gcc/fortran/resolve.c:15047
0x55ddb2 gfc_resolve
        ../../gcc-4.8.2/gcc/fortran/resolve.c:15075
0x56b940 gfc_resolve
        ../../gcc-4.8.2/gcc/fortran/resolve.c:15066
0x56b940 resolve_block_construct
        ../../gcc-4.8.2/gcc/fortran/resolve.c:9367
0x56b940 resolve_code
        ../../gcc-4.8.2/gcc/fortran/resolve.c:10383
0x56a0fb gfc_resolve_blocks(gfc_code*, gfc_namespace*)
        ../../gcc-4.8.2/gcc/fortran/resolve.c:9449
0x56adf3 resolve_code
        ../../gcc-4.8.2/gcc/fortran/resolve.c:10193
0x56a0fb gfc_resolve_blocks(gfc_code*, gfc_namespace*)
        ../../gcc-4.8.2/gcc/fortran/resolve.c:9449
0x56ab1f resolve_select_type
        ../../gcc-4.8.2/gcc/fortran/resolve.c:8681
0x56b7cc resolve_code
        ../../gcc-4.8.2/gcc/fortran/resolve.c:10379
0x56d24e resolve_codes
        ../../gcc-4.8.2/gcc/fortran/resolve.c:15047
0x56d157 resolve_codes
        ../../gcc-4.8.2/gcc/fortran/resolve.c:15033
0x55ddb2 gfc_resolve
        ../../gcc-4.8.2/gcc/fortran/resolve.c:15075
0x552486 gfc_parse_file()
        ../../gcc-4.8.2/gcc/fortran/parse.c:4614
0x58e365 gfc_be_parse_file
        ../../gcc-4.8.2/gcc/fortran/f95-lang.c:189
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.


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

* [Bug rtl-optimization/58079] [4.8 Regression] internal compiler error: in do_SUBST, at combine.c:711
  2013-08-04 13:24 [Bug c/58079] New: internal compiler error: in do_SUBST, at combine.c:711 JuergenUrban at gmx dot de
                   ` (8 preceding siblings ...)
  2013-10-28 16:04 ` ubizjak at gmail dot com
@ 2013-10-29 15:44 ` uros at gcc dot gnu.org
  2013-10-29 16:06 ` ubizjak at gmail dot com
  10 siblings, 0 replies; 12+ messages in thread
From: uros at gcc dot gnu.org @ 2013-10-29 15:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from uros at gcc dot gnu.org ---
Author: uros
Date: Tue Oct 29 15:44:15 2013
New Revision: 204165

URL: http://gcc.gnu.org/viewcvs?rev=204165&root=gcc&view=rev
Log:
    Backport from mainline
    2013-08-08  Richard Sandiford  <rdsandiford@googlemail.com>

    PR rtl-optimization/58079
    * combine.c (combine_simplify_rtx): Avoid using SUBST if
    simplify_comparison has widened a comparison with an integer.

testsuite/ChangeLog:

    Backport from mainline
    2013-08-08  Richard Sandiford  <rdsandiford@googlemail.com>

    PR rtl-optimization/58079
    * gcc.dg/torture/pr58079.c: New test.


Added:
    branches/gcc-4_8-branch/gcc/testsuite/gcc.dg/torture/pr58079.c
Modified:
    branches/gcc-4_8-branch/gcc/ChangeLog
    branches/gcc-4_8-branch/gcc/combine.c
    branches/gcc-4_8-branch/gcc/testsuite/ChangeLog


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

* [Bug rtl-optimization/58079] [4.8 Regression] internal compiler error: in do_SUBST, at combine.c:711
  2013-08-04 13:24 [Bug c/58079] New: internal compiler error: in do_SUBST, at combine.c:711 JuergenUrban at gmx dot de
                   ` (9 preceding siblings ...)
  2013-10-29 15:44 ` [Bug rtl-optimization/58079] [4.8 Regression] " uros at gcc dot gnu.org
@ 2013-10-29 16:06 ` ubizjak at gmail dot com
  10 siblings, 0 replies; 12+ messages in thread
From: ubizjak at gmail dot com @ 2013-10-29 16:06 UTC (permalink / raw)
  To: gcc-bugs

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

Uroš Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #13 from Uroš Bizjak <ubizjak at gmail dot com> ---
Fixed also for 4.8 branch.
>From gcc-bugs-return-432925-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 29 16:14:26 2013
Return-Path: <gcc-bugs-return-432925-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 3468 invoked by alias); 29 Oct 2013 16:14:25 -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 3438 invoked by uid 48); 29 Oct 2013 16:14:20 -0000
From: "cvs at cs dot utoronto.ca" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/58912] New: make_shared value initializes storage space even when not desired
Date: Tue, 29 Oct 2013 16:14:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: libstdc++
X-Bugzilla-Version: 4.8.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: cvs at cs dot utoronto.ca
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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter
Message-ID: <bug-58912-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-10/txt/msg02069.txt.bz2
Content-length: 1246

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

            Bug ID: 58912
           Summary: make_shared value initializes storage space even when
                    not desired
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: cvs at cs dot utoronto.ca

Simple example:

struct foo {
    char buf[1024*1024*1024];
    foo() {}
};
auto p = std::make_shared<foo>();

I've traced the problem to shared_ptr_base.h and tested the following patch
(against 4.7.2) to resolve the problem:

--- shared_ptr_base.h.orig      2013-10-29 11:52:02.212301477 -0400
+++ shared_ptr_base.h   2013-10-29 11:52:20.620300707 -0400
@@ -394,7 +394,7 @@
     public:
       template<typename... _Args>
        _Sp_counted_ptr_inplace(_Alloc __a, _Args&&... __args)
-       : _M_impl(__a), _M_storage()
+       : _M_impl(__a)
        {
          _M_impl._M_ptr = static_cast<_Tp*>(static_cast<void*>(&_M_storage));
          // _GLIBCXX_RESOLVE_LIB_DEFECTS

The problem appears to be in versions as new as 4.8.2.

Is there a good reason why the storage space must be initialized?


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

end of thread, other threads:[~2013-10-29 16:06 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-04 13:24 [Bug c/58079] New: internal compiler error: in do_SUBST, at combine.c:711 JuergenUrban at gmx dot de
2013-08-04 21:20 ` [Bug rtl-optimization/58079] " jbglaw@lug-owl.de
2013-08-05  8:42 ` mikpe at it dot uu.se
2013-08-05 12:05 ` mikpe at it dot uu.se
2013-08-06 21:14 ` rsandifo at gcc dot gnu.org
2013-08-08 18:45 ` rsandifo at gcc dot gnu.org
2013-08-08 18:49 ` rsandifo at gcc dot gnu.org
2013-09-14 20:12 ` danglin at gcc dot gnu.org
2013-09-28 16:18 ` steve at sk2 dot org
2013-10-28 16:04 ` ubizjak at gmail dot com
2013-10-29 15:44 ` [Bug rtl-optimization/58079] [4.8 Regression] " uros at gcc dot gnu.org
2013-10-29 16:06 ` ubizjak at gmail dot com

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).