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]

Re: [Bug bootstrap/16341] [3.5 Regression] BOOT_CFLAGS='-O2 -fno-inline'causes a comparision failure


All,

It looks lile libcpp/expr.c:num_lshift is being miscompiled at least on i686-pc-linux-gnu

The following testcase shows the problem

extern void abort ();
extern int exit (int);

#define MAJOR   3
#define MINOR   5

#define PREREQ(maj, min) ((MAJOR << 16) + _MINOR >= ((maj) << 16) + (min))

int
main()
{
#if !PREREQ (2,8)
    abort ();
#else
    exit (0);
#endif
}

Cheers
Graham


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