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]

cc1 chokes on x86


FreeBSD 4.0-20000309-SNAP
Linux 2.2.14-5.0

I'm using gcc 2.95.2 19991024 on both platforms. 

I get this error:

Using builtin specs.
gcc version 2.95.2 19991024 (release)
 /usr/libexec/cpp -lang-c -v -D__GNUC__=2 -D__GNUC_MINOR__=95 -Di386 -Dunix -D__FreeBSD__=4 -D__FreeBSD_cc_version=400004 -D__i386__ -D__unix__ -D__FreeBSD__=4 -D__FreeBSD_cc_version=400004 -D__i386 -D__unix -Acpu(i386) -Amachine(i386) -Asystem(unix) -Asystem(FreeBSD) -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -D__ELF__ bomb.c bomb.i
GNU CPP version 2.95.2 19991024 (release) (i386 FreeBSD/ELF)
#include "..." search starts here:
#include <...> search starts here:
 /usr/include
 /usr/include
End of search list.
The following default directories have been omitted from the search path:
 /usr/include/g++
End of omitted list.
 /usr/libexec/cc1 bomb.i -quiet -dumpbase bomb.c -version -o bomb.s
GNU C version 2.95.2 19991024 (release) (i386-unknown-freebsd) compiled by GNU C version 2.95.2 19991024 (release).
bomb.c: In function `main':
bomb.c:14: internal error--unrecognizable insn:
(insn 10 8 11 (set (reg:QI 22)
        (plus:QI (const_int 48 [0x30])
            (const_int -64 [0xffffffc0]))) -1 (nil)
    (nil))
*** Error code 1

With this code:

void test_func(unsigned char val)
{
   printf("%x\n", val);

   return;
}

int main(int argc, char **argv)
{
   test_func("000"[0] - '0' + 0xf0);

   return(0);
}

I get the exact same error on Linux.

Is gcc sign extending 0xf0 when it shouldn't be?
-- 
XCOMM Kevin P. Neal                  http://www.pobox.com/~kpn/
XCOMM    
XCOMM "What is your fascination with Gunsmith Cats?" - me
XCOMM "They blow stuff up." - Ravi K. Swamy.   January 6, 1997

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