[Bug middle-end/29726] [4.2/4.3 regression] invalid folding of ((X C1) C2) != 0 or M-x is undefined in emacs

2006-11-09 Thread sayle at gcc dot gnu dot org


--- Comment #4 from sayle at gcc dot gnu dot org  2006-11-09 19:24 ---
Subject: Bug 29726

Author: sayle
Date: Thu Nov  9 19:24:32 2006
New Revision: 118625

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=118625
Log:
2006-11-09  Serge Belyshev  [EMAIL PROTECTED]

PR middle-end/29726
* fold-const.c (fold_binary) EQ_EXPR: Fix typo in variable name.

* gcc.dg/fold-eqandshift-1.c (test5): Uncomment function.
(test6): Ditto.
(dg-final): Add scan-tree-dump-times patterns for test5 and test6.
* gcc.dg/fold-eqandshift-3.c: New test case.


Added:
trunk/gcc/testsuite/gcc.dg/fold-eqandshift-3.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/fold-const.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/fold-eqandshift-1.c


-- 


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



[Bug middle-end/29726] [4.2/4.3 regression] invalid folding of ((X C1) C2) != 0 or M-x is undefined in emacs

2006-11-07 Thread christophe at saout dot de


--- Comment #1 from christophe at saout dot de  2006-11-07 11:23 ---
The function test (even compiled with -O0, on i386 BTW) assumes that the
condition can never occur, as the complete if condition is completely optimized
away and the function always returns 1.

#include stdlib.h

int test(int x)
{
if (((unsigned int)x  3)  0x0800)
return 0;
return 1;
}

int main(void)
{
if (test(-1))
abort();
return 0;
}


-- 

christophe at saout dot de changed:

   What|Removed |Added

 CC||christophe at saout dot de


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



[Bug middle-end/29726] [4.2/4.3 regression] invalid folding of ((X C1) C2) != 0 or M-x is undefined in emacs

2006-11-07 Thread belyshev at depni dot sinp dot msu dot ru


--- Comment #2 from belyshev at depni dot sinp dot msu dot ru  2006-11-07 
13:00 ---
testing a patch.


-- 

belyshev at depni dot sinp dot msu dot ru changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |belyshev at depni dot sinp
   |dot org |dot msu dot ru
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2006-11-07 13:00:34
   date||


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



[Bug middle-end/29726] [4.2/4.3 regression] invalid folding of ((X C1) C2) != 0 or M-x is undefined in emacs

2006-11-07 Thread belyshev at depni dot sinp dot msu dot ru


--- Comment #3 from belyshev at depni dot sinp dot msu dot ru  2006-11-07 
18:26 ---
Patch posted.


-- 

belyshev at depni dot sinp dot msu dot ru changed:

   What|Removed |Added

URL||http://gcc.gnu.org/ml/gcc-
   ||patches/2006-
   ||11/msg00422.html
   Keywords||patch


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



[Bug middle-end/29726] [4.2/4.3 regression] invalid folding of ((X C1) C2) != 0 or M-x is undefined in emacs

2006-11-05 Thread pinskia at gcc dot gnu dot org


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||pinskia at gcc dot gnu dot
   ||org
   Severity|normal  |blocker
   Target Milestone|--- |4.2.0


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