This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/26729] [4.0,4.1 regression] bad bitops folding



------- Comment #11 from falk at debian dot org  2006-03-28 21:59 -------
Ah. I can reproduce it now. Here is a C test case:

void abort(void);

__attribute__((noinline))
int f (unsigned short word) {  
  return (word & 0x1) && (((unsigned short) (word & 0x8000)) == 0x8000);
}

int main(void) {
  if (!f(0x8001))
    abort();
  return 0;
}


-- 

falk at debian dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
          Component|c++                         |middle-end
     Ever Confirmed|0                           |1
           Keywords|diagnostic                  |wrong-code
      Known to fail|3.4.3 3.3.3 4.0.2 4.1.0     |3.3.6 3.4.3 4.0.2 4.1.0
                   |                            |4.2.0
      Known to work|                            |2.95.4
            Summary|bogus 'comparison is always |[4.0,4.1 regression] bad
                   |0' message                  |bitops folding


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]