Bug 35400 - [4.4 Regression] -Wtype-limits -O2 causes ICE tree check: expected ssa_name, have addr_expr in get_value_range, at tree-vrp.c:469
Summary: [4.4 Regression] -Wtype-limits -O2 causes ICE tree check: expected ssa_name, ...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.4.0
: P1 blocker
Target Milestone: 4.4.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
: 35530 35663 (view as bug list)
Depends on:
Blocks: 35530
  Show dependency treegraph
 
Reported: 2008-02-28 20:17 UTC by Gerald Pfeifer
Modified: 2008-04-06 21:21 UTC (History)
7 users (show)

See Also:
Host: i386-unknown-freebsd6.2tt
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2008-03-15 01:26:15


Attachments
Testcase to reproduce (204.28 KB, application/x-gzip)
2008-02-28 20:25 UTC, Gerald Pfeifer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gerald Pfeifer 2008-02-28 20:17:31 UTC
This is a regression probably introduced roughly three or four days ago,
unless it's due to a change in the codebase I'm building (which is Wine):

...gcc -Wtype-limits -O2 action.i
action.c: In function 'move_files_wildcard':
action.c:5232: internal compiler error: tree check: expected ssa_name, have addr_expr in get_value_range, at tree-vrp.c:469
Comment 1 Gerald Pfeifer 2008-02-28 20:25:46 UTC
Created attachment 15242 [details]
Testcase to reproduce
Comment 2 Manuel López-Ibáñez 2008-02-29 00:12:27 UTC
(In reply to comment #0)
> This is a regression probably introduced roughly three or four days ago,
> unless it's due to a change in the codebase I'm building (which is Wine):
> 
> ...gcc -Wtype-limits -O2 action.i
> action.c: In function 'move_files_wildcard':
> action.c:5232: internal compiler error: tree check: expected ssa_name, have
> addr_expr in get_value_range, at tree-vrp.c:469
> 

Revision 132591 ?
Comment 3 Gerald Pfeifer 2008-02-29 00:20:25 UTC
The last one that I tested was 132756, and that one was broken.  Or do you
mean 132591 might be the culprit?
Comment 4 Richard Biener 2008-02-29 12:50:05 UTC
Likely caused by diegos change.
Comment 5 Richard Biener 2008-03-15 19:22:01 UTC
*** Bug 35530 has been marked as a duplicate of this bug. ***
Comment 6 Richard Biener 2008-03-22 14:55:44 UTC
*** Bug 35663 has been marked as a duplicate of this bug. ***
Comment 7 Volker Reichelt 2008-03-28 17:44:57 UTC
A short C++ testcase I ran into:

================
struct A
{
  A();
  ~A();
};

void foo()
{
  A x[1];
}
==============
Comment 8 Volker Reichelt 2008-03-28 18:13:21 UTC
Here's a reduced C testcase (fuirther reduced from PR35663):

===============================
struct A
{
  struct A *p;
};

int foo(const struct A *q)
{
  return q->p == q;
}

void bar(int);

void baz()
{
  struct A a;

  while (foo(&a))
    bar(foo(&a));
}
===============================
Comment 9 Richard Biener 2008-04-06 21:21:08 UTC
Fixed.
Comment 10 Richard Biener 2008-04-06 21:21:33 UTC
Subject: Bug 35400

Author: rguenth
Date: Sun Apr  6 21:20:49 2008
New Revision: 133967

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=133967
Log:
2008-04-06  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/35400
	* tree-vrp.c (vrp_evaluate_conditional): Only query value-range
	information from SSA_NAMEs.

	* gcc.dg/torture/pr35400.c: New testcase.
	* g++.dg/torture/pr35400.C: Likewise.

Added:
    trunk/gcc/testsuite/g++.dg/torture/pr35400.C
    trunk/gcc/testsuite/gcc.dg/torture/pr35400.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-vrp.c