This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/23410] [4.1 Regression] FAIL: gcc.c-torture/execute/950612-1.c execution, at -Os and -O3
- From: "sebastian dot pop at cri dot ensmp dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Aug 2005 11:51:39 -0000
- Subject: [Bug middle-end/23410] [4.1 Regression] FAIL: gcc.c-torture/execute/950612-1.c execution, at -Os and -O3
- References: <20050815225031.23410.danglin@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From sebastian dot pop at cri dot ensmp dot fr 2005-08-18 11:51 -------
Reduced testcase is:
unsigned long long
f4 (unsigned long long diff)
{
return ((unsigned long long) ((signed long long) diff < 0 ? -diff : diff));
}
main ()
{
int i;
for (i = 0; i <= 10; i++)
if (f4 ((long long) -i) != i)
abort ();
exit (0);
}
And the problem is in VRP:
Visiting statement:
diff.0D.1338_6 = (long long intD.5) diffD.1337_4;
(analyze_scalar_evolution
(loop_nb = 1)
(scalar = diff.0_6)
(get_scalar_evolution
(scalar = diff.0_6)
(scalar_evolution = (long long int) {0, +, ffffffffffffffff}_1))
(set_scalar_evolution
(scalar = diff.0_6)
(scalar_evolution = (long long int) {0, +, ffffffffffffffff}_1))
)
(instantiate_parameters
(loop_nb = 1)
(chrec = (long long int) {0, +, ffffffffffffffff}_1)
(res = (long long int) {0, +, ffffffffffffffff}_1))
Found new range for diff.0_6: [0, 0]
The computation of the min bound is not correct. I'm working on a patch.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23410