[Bug c/40172] [4.5 Regression] Revision 147596 breaks bootstrap

hjl dot tools at gmail dot com gcc-bugzilla@gcc.gnu.org
Sat May 16 16:12:00 GMT 2009



------- Comment #3 from hjl dot tools at gmail dot com  2009-05-16 16:12 -------
Here is a testcase for more problems:

[hjl@gnu-12 prev-gcc]$ cat /tmp/x.i 
struct rtx_def;
typedef struct rtx_def *rtx; 

extern int foo;
extern int bar;
extern int xxx;

int
test (void)
{
  if (((rtx) 0 != (rtx) 0) && xxx ? foo : bar)
    return 1;
  else if ((foo & 0) && xxx)
    return 2;
  else if (foo & 0)
    return 3;
  else if (0 && xxx)
    return 4;
  else if (0)
    return 5;
  else
    return 0;
}
[hjl@gnu-12 prev-gcc]$ ./xgcc -B./ -Wall -W -O2 -Werror -S /tmp/x.i
cc1: warnings being treated as errors
/tmp/x.i: In function ‘test’:
/tmp/x.i:11: error: logical ‘and’ of mutually exclusive tests is always false
/tmp/x.i:13: error: logical ‘and’ of mutually exclusive tests is always false
[hjl@gnu-12 prev-gcc]$ 


-- 


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



More information about the Gcc-bugs mailing list