public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/61375] New: ICE in int_cst_value at -O3 in tree-ssa pass when compiling a reference to an __int128 value
@ 2014-05-31  4:52 gary at intrepid dot com
  2014-06-02  8:14 ` [Bug tree-optimization/61375] [4.10 Regression] " rguenth at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: gary at intrepid dot com @ 2014-05-31  4:52 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61375

            Bug ID: 61375
           Summary: ICE in int_cst_value at -O3 in tree-ssa pass when
                    compiling a reference to an __int128 value
           Product: gcc
           Version: 4.10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gary at intrepid dot com
                CC: nenad at intrepid dot com
            Target: x86_64

Created attachment 32880
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=32880&action=edit
pre-processed "C" source, generates ICE at -O3 in tree-ssa

When compiling the attached pre-processed source file at -O3, the following
stack trace is generated.

$ gcc -O3 -fpreprocessed -c ice-int_cst_value-int128.i
ice-int_cst_value-int128.i: In function ‘test15’:
ice-int_cst_value-int128.i:442:1: internal compiler error: in int_cst_value, at
tree.c:10492
 test15 ()
 ^
0xe3fb99 int_cst_value(tree_node const*)
        /eng/upc/dev/gary/gupc-gcc-trunk/src/gcc/tree.c:10492
0xd03709 find_bswap_or_nop_1
        /eng/upc/dev/gary/gupc-gcc-trunk/src/gcc/tree-ssa-math-opts.c:1848
0xd0354c find_bswap_or_nop_1
        /eng/upc/dev/gary/gupc-gcc-trunk/src/gcc/tree-ssa-math-opts.c:1815
0xd0354c find_bswap_or_nop_1
        /eng/upc/dev/gary/gupc-gcc-trunk/src/gcc/tree-ssa-math-opts.c:1815
0xd039a9 find_bswap_or_nop_1
        /eng/upc/dev/gary/gupc-gcc-trunk/src/gcc/tree-ssa-math-opts.c:1916
0xd03f6a find_bswap_or_nop
        /eng/upc/dev/gary/gupc-gcc-trunk/src/gcc/tree-ssa-math-opts.c:2034
0xd04ac3 execute
        /eng/upc/dev/gary/gupc-gcc-trunk/src/gcc/tree-ssa-math-opts.c:2322

The compiler is based on:

Last Changed Rev: 211071
Last Changed Date: 2014-05-29 17:17:10 -0700

The test case can likely be reduced.  The issue seems to relate to an attempt
to simplify an expression that mixes an address and an __int128 value.

The ICE triggered here:

10488     unsigned bits = TYPE_PRECISION (TREE_TYPE (x));
10489     unsigned HOST_WIDE_INT val = TREE_INT_CST_LOW (x);
10490
10491     /* Make sure the sign-extended value will fit in a HOST_WIDE_INT.  */
10492     gcc_assert (cst_and_fits_in_hwi (x));

where 'x' is:

<integer_cst 0x7ffff19ab0e0 type <integer_type 0x7ffff19be690
upcr_pshared_ptr_t> constant 0x0fffff00000000000>

and the type is a 128 bit integer:

 <integer_type 0x7ffff19be690 upcr_pshared_ptr_t sizes-gimplified public
unsigned TI
    size <integer_cst 0x7ffff189d6c0 type <integer_type 0x7ffff189f150
bitsizetype> constant 128>
    unit size <integer_cst 0x7ffff189d6d8 type <integer_type 0x7ffff189f0a8
sizetype> constant 16>
    align 128 symtab 0 alias set -1 canonical type 0x7ffff189fb28 precision 128
min <integer_cst 0x7ffff189d9a8 0> max <integer_cst 0x7ffff189c668
0xffffffffffffffffffffffffffffffff> context <translation_unit_decl
0x7ffff19c3b80 D.1942>
    pointer_to_this <pointer_type 0x7ffff19c97e0>>

The gimple statement being simplified looks like this:

_15 = array.0_8 & 18446726481523507200

(gdb) p/x 18446726481523507200
$4 = 0xfffff00000000000
>From gcc-bugs-return-452904-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat May 31 06:52:30 2014
Return-Path: <gcc-bugs-return-452904-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 18457 invoked by alias); 31 May 2014 06:52:30 -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 18430 invoked by uid 48); 31 May 2014 06:52:25 -0000
From: "glisse at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/61374] string_view::operator string() is buggy
Date: Sat, 31 May 2014 06:52:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: libstdc++
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: glisse at gcc dot gnu.org
X-Bugzilla-Status: NEW
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 cf_reconfirmed_on everconfirmed
Message-ID: <bug-61374-4-b5kzjkohXg@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-61374-4@http.gcc.gnu.org/bugzilla/>
References: <bug-61374-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/msg02596.txt.bz2
Content-length: 500

https://gcc.gnu.org/bugzilla/show_bug.cgi?ida374

Marc Glisse <glisse at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-05-31
     Ever confirmed|0                           |1

--- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> ---
Just swap the 2 arguments line 255.


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

* [Bug tree-optimization/61375] [4.10 Regression] ICE in int_cst_value at -O3 in tree-ssa pass when compiling a reference to an __int128 value
  2014-05-31  4:52 [Bug tree-optimization/61375] New: ICE in int_cst_value at -O3 in tree-ssa pass when compiling a reference to an __int128 value gary at intrepid dot com
@ 2014-06-02  8:14 ` rguenth at gcc dot gnu.org
  2014-06-13  3:17 ` thopre01 at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-06-02  8:14 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61375

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |thomas.preudhomme at arm dot com
   Target Milestone|---                         |4.10.0
            Summary|ICE in int_cst_value at -O3 |[4.10 Regression] ICE in
                   |in tree-ssa pass when       |int_cst_value at -O3 in
                   |compiling a reference to an |tree-ssa pass when
                   |__int128 value              |compiling a reference to an
                   |                            |__int128 value


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

* [Bug tree-optimization/61375] [4.10 Regression] ICE in int_cst_value at -O3 in tree-ssa pass when compiling a reference to an __int128 value
  2014-05-31  4:52 [Bug tree-optimization/61375] New: ICE in int_cst_value at -O3 in tree-ssa pass when compiling a reference to an __int128 value gary at intrepid dot com
  2014-06-02  8:14 ` [Bug tree-optimization/61375] [4.10 Regression] " rguenth at gcc dot gnu.org
@ 2014-06-13  3:17 ` thopre01 at gcc dot gnu.org
  2014-08-01  8:56 ` thopre01 at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: thopre01 at gcc dot gnu.org @ 2014-06-13  3:17 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61375

--- Comment #1 from thopre01 at gcc dot gnu.org ---
Author: thopre01
Date: Fri Jun 13 03:17:02 2014
New Revision: 211604

URL: http://gcc.gnu.org/viewcvs?rev=211604&root=gcc&view=rev
Log:
2014-06-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/
    PR tree-optimization/61375
    * tree-ssa-math-opts.c (init_symbolic_number): Cancel optimization if
    symbolic number cannot be represented in an uint64_t.
    (find_bswap_or_nop_1): Likewise.

    gcc/testsuite/
    PR tree-optimization/61375
    * gcc.c-torture/execute/pr61375-1.c: New test.

Added:
    trunk/gcc/testsuite/gcc.c-torture/execute/pr61375.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-ssa-math-opts.c


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

* [Bug tree-optimization/61375] [4.10 Regression] ICE in int_cst_value at -O3 in tree-ssa pass when compiling a reference to an __int128 value
  2014-05-31  4:52 [Bug tree-optimization/61375] New: ICE in int_cst_value at -O3 in tree-ssa pass when compiling a reference to an __int128 value gary at intrepid dot com
  2014-06-02  8:14 ` [Bug tree-optimization/61375] [4.10 Regression] " rguenth at gcc dot gnu.org
  2014-06-13  3:17 ` thopre01 at gcc dot gnu.org
@ 2014-08-01  8:56 ` thopre01 at gcc dot gnu.org
  2014-08-01  9:47 ` thopre01 at gcc dot gnu.org
  2014-11-19 13:42 ` [Bug tree-optimization/61375] [5 " rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: thopre01 at gcc dot gnu.org @ 2014-08-01  8:56 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61375

--- Comment #2 from thopre01 at gcc dot gnu.org ---
Author: thopre01
Date: Fri Aug  1 08:56:17 2014
New Revision: 213426

URL: https://gcc.gnu.org/viewcvs?rev=213426&root=gcc&view=rev
Log:
2014-08-01  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    Backport from mainline
    2014-06-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/
    PR tree-optimization/61375
    * tree-ssa-math-opts.c (find_bswap_or_nop_1): Cancel optimization if
      symbolic number cannot be represented in an unsigned HOST_WIDE_INT.
    (execute_optimize_bswap): Cancel optimization if CHAR_BIT != 8.

    gcc/testsuite/
    PR tree-optimization/61375
    * gcc.c-torture/execute/pr61375-1.c: New test.

Added:
    branches/gcc-4_8-branch/gcc/testsuite/gcc.c-torture/execute/pr61375.c
Modified:
    branches/gcc-4_8-branch/gcc/ChangeLog
    branches/gcc-4_8-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_8-branch/gcc/tree-ssa-math-opts.c


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

* [Bug tree-optimization/61375] [4.10 Regression] ICE in int_cst_value at -O3 in tree-ssa pass when compiling a reference to an __int128 value
  2014-05-31  4:52 [Bug tree-optimization/61375] New: ICE in int_cst_value at -O3 in tree-ssa pass when compiling a reference to an __int128 value gary at intrepid dot com
                   ` (2 preceding siblings ...)
  2014-08-01  8:56 ` thopre01 at gcc dot gnu.org
@ 2014-08-01  9:47 ` thopre01 at gcc dot gnu.org
  2014-11-19 13:42 ` [Bug tree-optimization/61375] [5 " rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: thopre01 at gcc dot gnu.org @ 2014-08-01  9:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61375

--- Comment #3 from thopre01 at gcc dot gnu.org ---
Author: thopre01
Date: Fri Aug  1 09:46:47 2014
New Revision: 213436

URL: https://gcc.gnu.org/viewcvs?rev=213436&root=gcc&view=rev
Log:
2014-08-01  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    Backport from mainline
    2014-06-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/
    PR tree-optimization/61375
    * tree-ssa-math-opts.c (find_bswap_or_nop_1): Cancel optimization if
      symbolic number cannot be represented in an unsigned HOST_WIDE_INT.
    (execute_optimize_bswap): Cancel optimization if CHAR_BIT != 8.

    gcc/testsuite/
    PR tree-optimization/61375
    * gcc.c-torture/execute/pr61375-1.c: New test.

Added:
    branches/gcc-4_9-branch/gcc/testsuite/gcc.c-torture/execute/pr61375.c
Modified:
    branches/gcc-4_9-branch/gcc/ChangeLog
    branches/gcc-4_9-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_9-branch/gcc/tree-ssa-math-opts.c


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

* [Bug tree-optimization/61375] [5 Regression] ICE in int_cst_value at -O3 in tree-ssa pass when compiling a reference to an __int128 value
  2014-05-31  4:52 [Bug tree-optimization/61375] New: ICE in int_cst_value at -O3 in tree-ssa pass when compiling a reference to an __int128 value gary at intrepid dot com
                   ` (3 preceding siblings ...)
  2014-08-01  9:47 ` thopre01 at gcc dot gnu.org
@ 2014-11-19 13:42 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-11-19 13:42 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61375

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
      Known to work|4.10.0                      |5.0
         Resolution|---                         |FIXED

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.


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

end of thread, other threads:[~2014-11-19 13:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-31  4:52 [Bug tree-optimization/61375] New: ICE in int_cst_value at -O3 in tree-ssa pass when compiling a reference to an __int128 value gary at intrepid dot com
2014-06-02  8:14 ` [Bug tree-optimization/61375] [4.10 Regression] " rguenth at gcc dot gnu.org
2014-06-13  3:17 ` thopre01 at gcc dot gnu.org
2014-08-01  8:56 ` thopre01 at gcc dot gnu.org
2014-08-01  9:47 ` thopre01 at gcc dot gnu.org
2014-11-19 13:42 ` [Bug tree-optimization/61375] [5 " rguenth 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).