public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/57251] New: ICE in optab_handler, at optabs.h:258
@ 2013-05-11 17:54 antoine.balestrat at gmail dot com
  2013-05-13  7:47 ` [Bug tree-optimization/57251] [4.8/4.9 Regression] " mpolacek at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: antoine.balestrat at gmail dot com @ 2013-05-11 17:54 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 57251
           Summary: ICE in optab_handler, at optabs.h:258
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: antoine.balestrat at gmail dot com

Hello !
Using GCC 4.9.0 as of 20130511 :

$ cat optab.c
short a, b;
int f()
{
    long long i = 2;
    a ? f() ? : 0 : b--;
    b &= i *= a |= 0;
}

$ xgcc -O2 -ftracer -m32 optab.c
optab.c: In function ‘f’:
optab.c:6:7: internal compiler error: in optab_handler, at optabs.h:258
     b &= i *= a |= 0;
       ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
>From gcc-bugs-return-422087-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat May 11 20:36:50 2013
Return-Path: <gcc-bugs-return-422087-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 30142 invoked by alias); 11 May 2013 20:36:50 -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 30112 invoked by uid 48); 11 May 2013 20:36:46 -0000
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/57250] [C++11] std::shared_ptr misses atomic_* support
Date: Sat, 11 May 2013 20:36: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: rejects-valid
X-Bugzilla-Severity: normal
X-Bugzilla-Who: redi 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-57250-4-uoY55ce5R0@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-57250-4@http.gcc.gnu.org/bugzilla/>
References: <bug-57250-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-05/txt/msg00760.txt.bz2
Content-length: 649

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-05-11
     Ever confirmed|0                           |1

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Yes, this is documented as incomplete:
http://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#status.iso.2011

(Although I can't remember why it says "Partial" rather than "No")


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

* [Bug tree-optimization/57251] [4.8/4.9 Regression] ICE in optab_handler, at optabs.h:258
  2013-05-11 17:54 [Bug tree-optimization/57251] New: ICE in optab_handler, at optabs.h:258 antoine.balestrat at gmail dot com
@ 2013-05-13  7:47 ` mpolacek at gcc dot gnu.org
  2013-05-13  8:06 ` mpolacek at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-05-13  7:47 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-05-13
                 CC|                            |mpolacek at gcc dot gnu.org
      Known to work|                            |4.7.3
   Target Milestone|---                         |4.8.1
            Summary|ICE in optab_handler, at    |[4.8/4.9 Regression] ICE in
                   |optabs.h:258                |optab_handler, at
                   |                            |optabs.h:258
     Ever confirmed|0                           |1
      Known to fail|                            |4.8.0, 4.9.0

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Confirmed.


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

* [Bug tree-optimization/57251] [4.8/4.9 Regression] ICE in optab_handler, at optabs.h:258
  2013-05-11 17:54 [Bug tree-optimization/57251] New: ICE in optab_handler, at optabs.h:258 antoine.balestrat at gmail dot com
  2013-05-13  7:47 ` [Bug tree-optimization/57251] [4.8/4.9 Regression] " mpolacek at gcc dot gnu.org
@ 2013-05-13  8:06 ` mpolacek at gcc dot gnu.org
  2013-05-13  9:03 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-05-13  8:06 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

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

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Started with http://gcc.gnu.org/r189821


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

* [Bug tree-optimization/57251] [4.8/4.9 Regression] ICE in optab_handler, at optabs.h:258
  2013-05-11 17:54 [Bug tree-optimization/57251] New: ICE in optab_handler, at optabs.h:258 antoine.balestrat at gmail dot com
  2013-05-13  7:47 ` [Bug tree-optimization/57251] [4.8/4.9 Regression] " mpolacek at gcc dot gnu.org
  2013-05-13  8:06 ` mpolacek at gcc dot gnu.org
@ 2013-05-13  9:03 ` jakub at gcc dot gnu.org
  2013-05-13 10:10 ` jakub at gcc dot gnu.org
  2013-05-14  6:29 ` jakub at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-05-13  9:03 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The problem seems to be that tracer and widening_mul passes happen very late
and there is no forwprop etc. afterwards.
WIDEN_MULT_EXPR expansion tries to avoid having op0 as constant:
if (TREE_CODE (treeop0) != INTEGER_CST)
but that isn't good enough here, because treeop0 is not INTEGER_CST, but it
expands into const0_rtx, which has VOIDmode and thus isn't really desirable for
expand_widening_mult or I guess the [su]mul_widen_optab expand_binop
OPTAB_LIB_WIDEN with expand_mult_highpart_adjust afterwards.
I guess we'll need to after expand_operands or expand_normal in those ifs check
for VOIDmode op0 and handle those somehow (if op1 isn't VOIDmode, perhaps swap
the operands, if both are VOIDmode, zero or sign extend both into the wider
mode and evaluate at compile time)?  BTW, is
                    op1 = convert_modes (innermode, mode,
                                         expand_normal (treeop1), unsignedp);
correct?  I mean, unsignedp is the TYPE_UNSIGNED of the result type, but don't
we want here TYPE_UNSIGNED (TREE_TYPE (treeop1)) instead?


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

* [Bug tree-optimization/57251] [4.8/4.9 Regression] ICE in optab_handler, at optabs.h:258
  2013-05-11 17:54 [Bug tree-optimization/57251] New: ICE in optab_handler, at optabs.h:258 antoine.balestrat at gmail dot com
                   ` (2 preceding siblings ...)
  2013-05-13  9:03 ` jakub at gcc dot gnu.org
@ 2013-05-13 10:10 ` jakub at gcc dot gnu.org
  2013-05-14  6:29 ` jakub at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-05-13 10:10 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 30103
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30103&action=edit
gcc49-pr57251.patch

Untested fix.


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

* [Bug tree-optimization/57251] [4.8/4.9 Regression] ICE in optab_handler, at optabs.h:258
  2013-05-11 17:54 [Bug tree-optimization/57251] New: ICE in optab_handler, at optabs.h:258 antoine.balestrat at gmail dot com
                   ` (3 preceding siblings ...)
  2013-05-13 10:10 ` jakub at gcc dot gnu.org
@ 2013-05-14  6:29 ` jakub at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-05-14  6:29 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Tue May 14 06:26:23 2013
New Revision: 198860

URL: http://gcc.gnu.org/viewcvs?rev=198860&root=gcc&view=rev
Log:
    PR middle-end/57251
    * expr.c (expand_expr_real_2) <case WIDEN_MULT_EXPR>: Handle
    the case when both op0 and op1 have VOIDmode.

    * gcc.dg/torture/pr57251.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/torture/pr57251.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/expr.c
    trunk/gcc/testsuite/ChangeLog

Author: jakub
Date: Tue May 14 06:28:12 2013
New Revision: 198861

URL: http://gcc.gnu.org/viewcvs?rev=198861&root=gcc&view=rev
Log:
    PR middle-end/57251
    * expr.c (expand_expr_real_2) <case WIDEN_MULT_EXPR>: Handle
    the case when both op0 and op1 have VOIDmode.

    * gcc.dg/torture/pr57251.c: New test.

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


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

end of thread, other threads:[~2013-05-14  6:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-11 17:54 [Bug tree-optimization/57251] New: ICE in optab_handler, at optabs.h:258 antoine.balestrat at gmail dot com
2013-05-13  7:47 ` [Bug tree-optimization/57251] [4.8/4.9 Regression] " mpolacek at gcc dot gnu.org
2013-05-13  8:06 ` mpolacek at gcc dot gnu.org
2013-05-13  9:03 ` jakub at gcc dot gnu.org
2013-05-13 10:10 ` jakub at gcc dot gnu.org
2013-05-14  6:29 ` jakub 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).