public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug tree-optimization/23960] New: [4.1 regression] ICE in compare_values in VRP @ 2005-09-19 5:41 steven at gcc dot gnu dot org 2005-09-19 5:52 ` [Bug tree-optimization/23960] " pinskia at gcc dot gnu dot org ` (5 more replies) 0 siblings, 6 replies; 7+ messages in thread From: steven at gcc dot gnu dot org @ 2005-09-19 5:41 UTC (permalink / raw) To: gcc-bugs typedef long unsigned int size_t; size_t __attribute__((noinline)) choose_block (char *d, size_t dlen, int col, size_t *wlen) { size_t n, nn; n = dlen; for (;;) { ((void) ((d + n > d) ? 0 : (__assert_fail ("d + n > d", "rfc2047.c", 346, __PRETTY_FUNCTION__), 0))); if (!nn && (col + *wlen <= 75 + 1 || n <= 1)) break; } return n; } --> compile with -O2 t.c: In function ?choose_block?: t.c:6: internal compiler error: in compare_values, at tree-vrp.c:415 Breakpoint 1, fancy_abort (file=0xbd5846 "../../mainline/gcc/tree-vrp.c", line=415, function=0xbd58b6 "compare_values") at diagnostic.c:590 590 internal_error ("in %s, at %s:%d", function, trim_filename (file), line); (gdb) up #1 0x000000000094c645 in compare_values (val1=0x2a95a5a000, val2=0x2a95a4fe70) at tree-vrp.c:414 414 gcc_assert (POINTER_TYPE_P (TREE_TYPE (val1)) (gdb) l 409 if (val1 == val2) 410 return 0; 411 412 /* Below we rely on the fact that VAL1 and VAL2 are both pointers or 413 both integers. */ 414 gcc_assert (POINTER_TYPE_P (TREE_TYPE (val1)) 415 == POINTER_TYPE_P (TREE_TYPE (val2))); 416 417 /* Do some limited symbolic comparisons. */ 418 if (!POINTER_TYPE_P (TREE_TYPE (val1))) (gdb) p debug_tree_cfg (0) choose_block (d, dlen, col, wlen) { static const char __PRETTY_FUNCTION__[13] = "choose_block"; size_t nn; size_t n; size_t D.1627; _Bool D.1626; _Bool D.1625; _Bool D.1624; size_t D.1623; size_t D.1622; size_t D.1621; int iftmp.0; # BLOCK 0 # PRED: ENTRY (fallthru,exec) n_2 = dlen_1; goto <bb 7> (<L10>); # SUCC: 7 (fallthru,exec) # BLOCK 1 # PRED: 3 (false,exec) 4 (false,exec) <L0>:; # SUCC: 7 [100.0%] (fallthru,exec) # BLOCK 7 # PRED: 1 [100.0%] (fallthru,exec) 0 (fallthru,exec) <L10>:; if (dlen_1 == 0B) goto <L1>; else goto <L9>; # SUCC: 2 (true,exec) 6 (false,exec) # BLOCK 6 # PRED: 7 (false,exec) <L9>:; dlen_14 = ASSERT_EXPR <dlen_1, dlen_1 != 0B>; goto <bb 3> (<L3>); # SUCC: 3 [100.0%] (fallthru,exec) # BLOCK 2 # PRED: 7 (true,exec) <L1>:; __assert_fail (&"d + n > d"[0], &"rfc2047.c"[0], 346, &__PRETTY_FUNCTION__); # SUCC: 3 (fallthru,exec) # BLOCK 3 # PRED: 2 (fallthru,exec) 6 [100.0%] (fallthru,exec) <L3>:; if (nn_3 == 0) goto <L4>; else goto <L0>; # SUCC: 4 (true,exec) 1 (false,exec) # BLOCK 4 # PRED: 3 (true,exec) <L4>:; D.1621_5 = (size_t) col_4; D.1622_7 = *wlen_6; D.1623_8 = D.1621_5 + D.1622_7; D.1624_9 = D.1623_8 <= 76; D.1625_10 = dlen_1 <= 1; D.1626_11 = D.1624_9 || D.1625_10; if (D.1626_11) goto <L7>; else goto <L0>; # SUCC: 5 (true,exec) 1 (false,exec) # BLOCK 5 # PRED: 4 (true,exec) <L7>:; n_12 = dlen_1; return dlen_1; # SUCC: EXIT } $1 = void (gdb) p debug_generic_expr (val1) dlenD.1609_1 $2 = void (gdb) p debug_generic_expr (val2) 0B (gdb) This bug shows up when building mutt. -- Summary: [4.1 regression] ICE in compare_values in VRP Product: gcc Version: 4.1.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P2 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: steven at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23960 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/23960] [4.1 regression] ICE in compare_values in VRP 2005-09-19 5:41 [Bug tree-optimization/23960] New: [4.1 regression] ICE in compare_values in VRP steven at gcc dot gnu dot org @ 2005-09-19 5:52 ` pinskia at gcc dot gnu dot org 2005-09-19 5:58 ` [Bug middle-end/23960] " pinskia at gcc dot gnu dot org ` (4 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: pinskia at gcc dot gnu dot org @ 2005-09-19 5:52 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-19 05:52 ------- Redcued testcase: void choose_block (char *d, __SIZE_TYPE__ n) { if (!(d + n > d)) __builtin_abort (); } With the comparision patch from 22368, we get: t.c:5: error: types mismatch in comparsion long unsigned intD.4 charD.1 * nD.1270 == 0B; -- What |Removed |Added ---------------------------------------------------------------------------- CC| |pinskia at gcc dot gnu dot | |org OtherBugsDependingO| |22368 nThis| | Status|UNCONFIRMED |NEW Ever Confirmed| |1 Last reconfirmed|0000-00-00 00:00:00 |2005-09-19 05:52:48 date| | Target Milestone|--- |4.1.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23960 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/23960] [4.1 regression] ICE in compare_values in VRP 2005-09-19 5:41 [Bug tree-optimization/23960] New: [4.1 regression] ICE in compare_values in VRP steven at gcc dot gnu dot org 2005-09-19 5:52 ` [Bug tree-optimization/23960] " pinskia at gcc dot gnu dot org @ 2005-09-19 5:58 ` pinskia at gcc dot gnu dot org 2005-09-19 17:45 ` pinskia at gcc dot gnu dot org ` (3 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: pinskia at gcc dot gnu dot org @ 2005-09-19 5:58 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-19 05:58 ------- The bug is in fold-const.c. In fold_binary around line 9288 where we don't convert the expressions. -- What |Removed |Added ---------------------------------------------------------------------------- Component|tree-optimization |middle-end http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23960 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/23960] [4.1 regression] ICE in compare_values in VRP 2005-09-19 5:41 [Bug tree-optimization/23960] New: [4.1 regression] ICE in compare_values in VRP steven at gcc dot gnu dot org 2005-09-19 5:52 ` [Bug tree-optimization/23960] " pinskia at gcc dot gnu dot org 2005-09-19 5:58 ` [Bug middle-end/23960] " pinskia at gcc dot gnu dot org @ 2005-09-19 17:45 ` pinskia at gcc dot gnu dot org 2005-09-23 1:52 ` kazu at gcc dot gnu dot org ` (2 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: pinskia at gcc dot gnu dot org @ 2005-09-19 17:45 UTC (permalink / raw) To: gcc-bugs -- What |Removed |Added ---------------------------------------------------------------------------- OtherBugsDependingO| |23968 nThis| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23960 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/23960] [4.1 regression] ICE in compare_values in VRP 2005-09-19 5:41 [Bug tree-optimization/23960] New: [4.1 regression] ICE in compare_values in VRP steven at gcc dot gnu dot org ` (2 preceding siblings ...) 2005-09-19 17:45 ` pinskia at gcc dot gnu dot org @ 2005-09-23 1:52 ` kazu at gcc dot gnu dot org 2005-09-26 1:29 ` cvs-commit at gcc dot gnu dot org 2005-09-26 1:29 ` kazu at gcc dot gnu dot org 5 siblings, 0 replies; 7+ messages in thread From: kazu at gcc dot gnu dot org @ 2005-09-23 1:52 UTC (permalink / raw) To: gcc-bugs -- What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |kazu at gcc dot gnu dot org |dot org | Status|NEW |ASSIGNED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23960 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/23960] [4.1 regression] ICE in compare_values in VRP 2005-09-19 5:41 [Bug tree-optimization/23960] New: [4.1 regression] ICE in compare_values in VRP steven at gcc dot gnu dot org ` (3 preceding siblings ...) 2005-09-23 1:52 ` kazu at gcc dot gnu dot org @ 2005-09-26 1:29 ` cvs-commit at gcc dot gnu dot org 2005-09-26 1:29 ` kazu at gcc dot gnu dot org 5 siblings, 0 replies; 7+ messages in thread From: cvs-commit at gcc dot gnu dot org @ 2005-09-26 1:29 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-09-26 01:29 ------- Subject: Bug 23960 CVSROOT: /cvs/gcc Module name: gcc Changes by: kazu@gcc.gnu.org 2005-09-26 01:28:51 Modified files: gcc : ChangeLog fold-const.c gcc/testsuite : ChangeLog Added files: gcc/testsuite/gcc.c-torture/compile: pr23960.c Log message: gcc/ PR tree-optimization/23960 * fold-const.c (fold_binary): Use op0 and op1 instead of arg0 and arg1 if we are passing them to fold_build2. gcc/testsuite/ PR tree-optimization/23960 * gcc.c-torture/compile/pr23960.c: New. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.10019&r2=2.10020 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fold-const.c.diff?cvsroot=gcc&r1=1.625&r2=1.626 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.6101&r2=1.6102 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/compile/pr23960.c.diff?cvsroot=gcc&r1=NONE&r2=1.1 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23960 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/23960] [4.1 regression] ICE in compare_values in VRP 2005-09-19 5:41 [Bug tree-optimization/23960] New: [4.1 regression] ICE in compare_values in VRP steven at gcc dot gnu dot org ` (4 preceding siblings ...) 2005-09-26 1:29 ` cvs-commit at gcc dot gnu dot org @ 2005-09-26 1:29 ` kazu at gcc dot gnu dot org 5 siblings, 0 replies; 7+ messages in thread From: kazu at gcc dot gnu dot org @ 2005-09-26 1:29 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From kazu at gcc dot gnu dot org 2005-09-26 01:29 ------- Just checked in a patch. -- What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23960 ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-09-26 1:29 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2005-09-19 5:41 [Bug tree-optimization/23960] New: [4.1 regression] ICE in compare_values in VRP steven at gcc dot gnu dot org 2005-09-19 5:52 ` [Bug tree-optimization/23960] " pinskia at gcc dot gnu dot org 2005-09-19 5:58 ` [Bug middle-end/23960] " pinskia at gcc dot gnu dot org 2005-09-19 17:45 ` pinskia at gcc dot gnu dot org 2005-09-23 1:52 ` kazu at gcc dot gnu dot org 2005-09-26 1:29 ` cvs-commit at gcc dot gnu dot org 2005-09-26 1:29 ` kazu at gcc dot gnu dot 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).