Package: tcc
Version: 0.9.27~git20151227.933c223-1
Severity: important
tcc miscompiles code with bit-fields. An example:
------------------------------------------------------------
#include <stdio.h>
int main (void)
{
struct { unsigned int a:3; } s = { 1 };
#define R (s.a - 2)
#define S ((int) R)
printf ("%d %lx\n", R < 0, (unsigned long) R);
printf ("%d %lx\n", S < 0, (unsigned long) S);
return 0;
}
------------------------------------------------------------
tcc gives:
0 ffffffff
1 ffffffffffffffff
instead of:
1 ffffffffffffffff
1 ffffffffffffffff
This affected the build of GNU MPFR, which now has a workaround:
https://gforge.inria.fr/scm/viewvc.php/mpfr?view=revision&revision=10443
-- System Information:
Debian Release: stretch/sid
APT prefers unstable-debug
APT policy: (500, 'unstable-debug'), (500, 'stable-updates'), (500,
'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.6.0-1-amd64 (SMP w/12 CPU cores)
Locale: LANG=POSIX, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages tcc depends on:
ii libc6 2.23-4
Versions of packages tcc recommends:
ii libc6-dev [libc-dev] 2.23-4
tcc suggests no packages.
-- no debconf information