Bug#669330: Internal compiler error on i586

2012-04-18 Thread sacrificial-spam-address
Package: gcc-4.7
Architecture: i386
Version: 4.7.0-3

The compiler blows up on an Intel Pentium, because it uses cmove
internally.  (I.e. is compiled for i686+)

I realize running current Debian experimental packages on a Pentium
166 is perhaps more an exercise in retrocomputing than practicality,
but I thought it was supposed to work.  Certainly most other binaries do.

(Note that gcc-4.6_4.6.3-1 has the same problem which may be demonstrated
on a 0-byte null.c file.)

Running gcc normally reports illegal instruction and internal compiler
error; cc1 under the debugger makes it clearer:
(The Linux kernel source tree is v3.3.2, if it matters.)

Script started on Thu Apr 19 04:32:24 2012
[/usr/src/linux]$ gdb --args `cat /tmp/command`
GNU gdb (GDB) 7.4-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
...
Reading symbols from /usr/lib/gcc/i486-linux-gnu/4.7/cc1...(no debugging 
symbols found)...done.
(gdb) run
Starting program: /usr/lib/gcc/i486-linux-gnu/4.7/cc1 -E -lang-asm -quiet 
-nostdinc -v -I /usr/src/linux/arch/x86/include -I arch/x86/include/generated 
-I include -imultiarch i386-linux-gnu -D __KERNEL__ -D __ASSEMBLY__ -D 
CONFIG_AS_CFI=1 -D CONFIG_AS_CFI_SIGNAL_FRAME=1 -D CONFIG_AS_CFI_SECTIONS=1 
-isystem /usr/lib/gcc/i486-linux-gnu/4.7/include -include 
/usr/src/linux/include/linux/kconfig.h arch/x86/kernel/entry_32.S -o 
/tmp/entry_32.s -m32 -mtune=generic -march=i586 -fno-directives-only
#include "..." search starts here:
#include <...> search starts here:
 /usr/src/linux/arch/x86/include
 arch/x86/include/generated
 include
 /usr/lib/gcc/i486-linux-gnu/4.7/include
End of search list.

Program received signal SIGILL, Illegal instruction.
0x088abfa7 in cpp_avoid_paste(cpp_reader*, cpp_token const*, cpp_token const*)
()
(gdb) disassemble
Dump of assembler code for function 
_Z15cpp_avoid_pasteP10cpp_readerPK9cpp_tokenS3_:
   0x088abf80 <+0>: sub$0xc,%esp
   0x088abf83 <+3>: mov$0x35,%edx
   0x088abf88 <+8>: mov0x14(%esp),%ecx
   0x088abf8c <+12>:mov%ebx,(%esp)
   0x088abf8f <+15>:mov0x18(%esp),%ebx
   0x088abf93 <+19>:mov%edi,0x8(%esp)
   0x088abf97 <+23>:mov%esi,0x4(%esp)
   0x088abf9b <+27>:movzbl 0x4(%ecx),%eax
   0x088abf9f <+31>:testb  $0x10,0x6(%ecx)
   0x088abfa3 <+35>:movzbl 0x4(%ebx),%edi
=> 0x088abfa7 <+39>:cmove  %eax,%edx
   0x088abfaa <+42>:movzwl 0x6(%ebx),%eax
   0x088abfae <+46>:test   $0x10,%al
   0x088abfb0 <+48>:jne0x88ac008 
<_Z15cpp_avoid_pasteP10cpp_readerPK9cpp_tokenS3_+136>
   0x088abfb2 <+50>:and$0xff,%edi
   0x088abfb8 <+56>:mov%edi,%esi
   0x088abfba <+58>:test   $0x2,%al
   0x088abfbc <+60>:je 0x88abfe8 
<_Z15cpp_avoid_pasteP10cpp_readerPK9cpp_tokenS3_+104>
   0x088abfbe <+62>:mov0x8aaf7dc(,%esi,4),%eax
   0x088abfc5 <+69>:movzbl (%eax),%esi
   0x088abfc8 <+72>:cmp$0x3d,%esi
   0x088abfcb <+75>:jne0x88abff8 
<_Z15cpp_avoid_pasteP10cpp_readerPK9cpp_tokenS3_+120>
   0x088abfcd <+77>:cmp$0xd,%edx
   0x088abfd0 <+80>:mov$0x1,%eax
   0x088abfd5 <+85>:jg 0x88abff8 
<_Z15cpp_avoid_pasteP10cpp_readerPK9cpp_tokenS3_+120>
   0x088abfd7 <+87>:mov(%esp),%ebx
   0x088abfda <+90>:mov0x4(%esp),%esi
   0x088abfde <+94>:mov0x8(%esp),%edi
   0x088abfe2 <+98>:add$0xc,%esp
   0x088abfe5 <+101>:   ret
   0x088abfe6 <+102>:   xchg   %ax,%ax
   0x088abfe8 <+104>:   mov0x8aaf5e0(,%esi,8),%eax
   0x088abfef <+111>:   test   %eax,%eax
   0x088abff1 <+113>:   je 0x88ac020 
<_Z15cpp_avoid_pasteP10cpp_readerPK9cpp_tokenS3_+160>
   0x088abff3 <+115>:   mov$0x,%esi
   0x088abff8 <+120>:   cmp$0x3c,%edx
   0x088abffb <+123>:   jbe0x88ac018 
<_Z15cpp_avoid_pasteP10cpp_readerPK9cpp_tokenS3_+152>
   0x088abffd <+125>:   xor%eax,%eax
   0x088abfff <+127>:   jmp0x88abfd7 
<_Z15cpp_avoid_pasteP10cpp_readerPK9cpp_tokenS3_+87>
   0x088ac001 <+129>:   lea0x0(%esi,%eiz,1),%esi
---Type  to continue, or q  to quit---q
Quit
(gdb) quit
A debugging session is active.

Inferior 1 [process 16796] will be killed.

Quit anyway? (y or n) y
[/usr/src/linux]$ exit

Script done on Thu Apr 19 04:38:54 2012



-- 
To UNSUBSCRIBE, email to debian-gcc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120419055750.24212.qm...@science.horizon.com



Bug#652597: gcc-4.7-base trying to overwrite '/usr/lib/gcc/i486-linux-gnu/4.6.1'

2011-12-18 Thread sacrificial-spam-address
Package: gcc-4.7-base
Version: 4.7-20111217-1
Severity: important

gcc-4.6-base and gcc-4.7-base disagree on the target of the symlink:
lrwxrwxrwx root/root 0 2011-12-17 07:54 
./usr/lib/gcc/i486-linux-gnu/4.6.1 -> 4.6
lrwxrwxrwx root/root 0 2011-12-17 18:11 
./usr/lib/gcc/i486-linux-gnu/4.6.1 -> 4.7

This renders it uninstallable (without some --force options to dpkg), thereby
breaking quite a few packages that depend on it.

It looks like the symlink in the 4.7 package is a mistake.
(For now, I have forced 4.6-base to overwrite 4.7-base.)

(Severity not serious because I can't find an explicit "must"
or "required" in Debian policy mandating Conflicts: declarations.
Section 3.5 requires declaration of prerequisites, but I cannot
find an explicit requirement for conflicts.)



-- 
To UNSUBSCRIBE, email to debian-gcc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20111219013025.20666.qm...@science.horizon.com



Bug#709818: Error compiling lilo

2013-05-25 Thread sacrificial-spam-address
Package: cpp-4.8
Version: 4.8.0-7
Tags: patch
X-Debbugs-CC: ad_deb...@joonet.de

The lilo (1:23.2-4) build system does some moderately evil things with
the preprocessor.  src/Makefile does:

gcc -E -C -traditional -DLILO_ASM -o common.s common.h

Then as86 is run on first.s, which includes common.s.

The evil thing is that common.h includes asm code hidden from
C program inside C comments, while the C comment delimiters
(which as86 does not understand) are in turn hidden from as86.


Anyway, with current gcc and cpp, this fails somewhat
spectacularly due to the automatic inclusion of
/usr/include/stdc-predef.h (and /usr/include/bits/predefs.h).

With -C, the /* */ comments in those files appear in common.s,
without the special escaping that prevents as86 from choking
on them, and things go downhill from there.


Looking for the least intrusive workaround, my first thought was
just to strip out the comments from stdc-predef.h, but messing
with copyright notices is, well, messy.

However, I figured out that prefixing each /* with a # makes
a "null directive", which is stiripped out by cpp, even in
-C mode.  The output includes some blank and linemarker lines,
but those are relatively harmess for non-C languages, and
can already be suppressed with -P.


-- 
To UNSUBSCRIBE, email to debian-gcc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20130525185122.8554.qm...@science.horizon.com