public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/53245] New: ice in expand_case
@ 2012-05-05  8:50 dcb314 at hotmail dot com
  2012-05-05  9:16 ` [Bug c/53245] " markus at trippelsdorf dot de
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: dcb314 at hotmail dot com @ 2012-05-05  8:50 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 53245
           Summary: ice in expand_case
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dcb314@hotmail.com


Created attachment 27314
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27314
C source code

I just tried to compile the package ruby-1.9.3.194-10.1
on gcc-4.8 trunk dated 20120503 on an AMD x86_64 box.

The compiler said

parse.y: In function 'ruby_yyparse':
parse.y:6668:5: internal compiler error: in expand_case, at stmt.c:2116
     switch (c = nextc()) {
     ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Preprocessed source code attached. Flag -O2 required.


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

* [Bug c/53245] ice in expand_case
  2012-05-05  8:50 [Bug c/53245] New: ice in expand_case dcb314 at hotmail dot com
@ 2012-05-05  9:16 ` markus at trippelsdorf dot de
  2012-05-05  9:48 ` markus at trippelsdorf dot de
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: markus at trippelsdorf dot de @ 2012-05-05  9:16 UTC (permalink / raw)
  To: gcc-bugs

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

Markus Trippelsdorf <markus at trippelsdorf dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |markus at trippelsdorf dot
                   |                            |de

--- Comment #1 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2012-05-05 09:14:29 UTC ---
Started with revision 186579.

Reduced:

int a;
char b;
void fn1 ()
{
  a = (unsigned char)b;
  switch (a)
    {
    case '\0':
    case -1:
      return;
    default:
      fn1 ();
    }
}

(dcb please have a look at
http://gcc.gnu.org/wiki/A_guide_to_testcase_reduction.
It's would be easier if you could reduce your testcases yourself and it isn't 
that hard, actually.)


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

* [Bug c/53245] ice in expand_case
  2012-05-05  8:50 [Bug c/53245] New: ice in expand_case dcb314 at hotmail dot com
  2012-05-05  9:16 ` [Bug c/53245] " markus at trippelsdorf dot de
@ 2012-05-05  9:48 ` markus at trippelsdorf dot de
  2012-05-07  9:32 ` [Bug middle-end/53245] [4.8 Regression] " rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: markus at trippelsdorf dot de @ 2012-05-05  9:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2012-05-05 09:16:39 UTC ---
CC'ing Steven.


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

* [Bug middle-end/53245] [4.8 Regression] ice in expand_case
  2012-05-05  8:50 [Bug c/53245] New: ice in expand_case dcb314 at hotmail dot com
  2012-05-05  9:16 ` [Bug c/53245] " markus at trippelsdorf dot de
  2012-05-05  9:48 ` markus at trippelsdorf dot de
@ 2012-05-07  9:32 ` rguenth at gcc dot gnu.org
  2012-05-07 11:15 ` steven at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-05-07  9:32 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-05-07
          Component|c                           |middle-end
   Target Milestone|---                         |4.8.0
            Summary|ice in expand_case          |[4.8 Regression] ice in
                   |                            |expand_case
     Ever Confirmed|0                           |1

--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-05-07 09:25:31 UTC ---
Thus confirmed.


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

* [Bug middle-end/53245] [4.8 Regression] ice in expand_case
  2012-05-05  8:50 [Bug c/53245] New: ice in expand_case dcb314 at hotmail dot com
                   ` (2 preceding siblings ...)
  2012-05-07  9:32 ` [Bug middle-end/53245] [4.8 Regression] " rguenth at gcc dot gnu.org
@ 2012-05-07 11:15 ` steven at gcc dot gnu.org
  2012-05-07 13:59 ` steven at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: steven at gcc dot gnu.org @ 2012-05-07 11:15 UTC (permalink / raw)
  To: gcc-bugs

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

Steven Bosscher <steven at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |steven at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #4 from Steven Bosscher <steven at gcc dot gnu.org> 2012-05-07 10:35:52 UTC ---
Another problem in forwprop:

t.c.060t.ccp2:  switch (a.1_2) <default: <L7>, case -1 ... 0: <L4>>
t.c.061t.forwprop2:  switch (b.0_1) <default: <L7>, case 0 ... 0: <L4>>

"case 0 ... 0:" is invalid GIMPLE. It should be just "case 0:".


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

* [Bug middle-end/53245] [4.8 Regression] ice in expand_case
  2012-05-05  8:50 [Bug c/53245] New: ice in expand_case dcb314 at hotmail dot com
                   ` (3 preceding siblings ...)
  2012-05-07 11:15 ` steven at gcc dot gnu.org
@ 2012-05-07 13:59 ` steven at gcc dot gnu.org
  2012-05-07 14:45 ` steven at gcc dot gnu.org
  2012-05-07 14:47 ` steven at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: steven at gcc dot gnu.org @ 2012-05-07 13:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Steven Bosscher <steven at gcc dot gnu.org> 2012-05-07 13:57:49 UTC ---
Duh!

Index: gimplify.c
===================================================================
--- gimplify.c  (revision 187219)
+++ gimplify.c  (working copy)
@@ -1658,6 +1658,10 @@
                      && tree_int_cst_compare (high, max_value) > 0)
                    high = max_value;
                  high = fold_convert (index_type, high);
+
+                 /* We may have folded a case range to a one-value case.  */
+                 if (tree_int_cst_equal (low, high))
+                   high = NULL_TREE;
                }
            }


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

* [Bug middle-end/53245] [4.8 Regression] ice in expand_case
  2012-05-05  8:50 [Bug c/53245] New: ice in expand_case dcb314 at hotmail dot com
                   ` (4 preceding siblings ...)
  2012-05-07 13:59 ` steven at gcc dot gnu.org
@ 2012-05-07 14:45 ` steven at gcc dot gnu.org
  2012-05-07 14:47 ` steven at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: steven at gcc dot gnu.org @ 2012-05-07 14:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Steven Bosscher <steven at gcc dot gnu.org> 2012-05-07 14:40:43 UTC ---
Author: steven
Date: Mon May  7 14:40:33 2012
New Revision: 187248

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=187248
Log:
    PR middle-end/53245
    * gimplify.c (preprocess_case_label_vec_for_gimple): If low or high
    is folded to a type boundary value, verify that the resulting case
    label is still a care range.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/gimplify.c


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

* [Bug middle-end/53245] [4.8 Regression] ice in expand_case
  2012-05-05  8:50 [Bug c/53245] New: ice in expand_case dcb314 at hotmail dot com
                   ` (5 preceding siblings ...)
  2012-05-07 14:45 ` steven at gcc dot gnu.org
@ 2012-05-07 14:47 ` steven at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: steven at gcc dot gnu.org @ 2012-05-07 14:47 UTC (permalink / raw)
  To: gcc-bugs

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

Steven Bosscher <steven at gcc dot gnu.org> changed:

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

--- Comment #7 from Steven Bosscher <steven at gcc dot gnu.org> 2012-05-07 14:44:29 UTC ---
.


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

end of thread, other threads:[~2012-05-07 14:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-05  8:50 [Bug c/53245] New: ice in expand_case dcb314 at hotmail dot com
2012-05-05  9:16 ` [Bug c/53245] " markus at trippelsdorf dot de
2012-05-05  9:48 ` markus at trippelsdorf dot de
2012-05-07  9:32 ` [Bug middle-end/53245] [4.8 Regression] " rguenth at gcc dot gnu.org
2012-05-07 11:15 ` steven at gcc dot gnu.org
2012-05-07 13:59 ` steven at gcc dot gnu.org
2012-05-07 14:45 ` steven at gcc dot gnu.org
2012-05-07 14:47 ` steven 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).