This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/23745] New: VRP does not get information from casts from a smaller precision
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Sep 2005 23:14:24 -0000
- Subject: [Bug tree-optimization/23745] New: VRP does not get information from casts from a smaller precision
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
An example:
int f(_Bool a)
{
int t = a;
if (t != 2)
return 0;
return 1;
}
int f1(unsigned char a)
{
int t = a;
if (t != 256)
return 0;
return 1;
}
Both of these we can find that if statement is always true. No other pass does this currently.
--
Summary: VRP does not get information from casts from a smaller
precision
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: enhancement
Priority: P2
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23745