gcc produces unassemblable assembly code.
//testcase:
struct S
{
signed int a:17;
} x;
typedef typeof (x.a) foo;
template <class T>
T* inc(T* p) { return p+1; }
int main ()
{
foo x[2] = { 1,2 };
int y[2] = { 1,2 };
*inc(x);
*inc(y);
return 0;
}
result
$ g++ -S bug.cpp
$ g++ -c bug.s
bug.s: Assembler messages:
bug.s:18: Error: symbol `__Z3incIiEPT_S1_' is already defined
gcc version: 4.2 20061212
--
Summary: bit-field: unassemblable assembly code
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: s__nakayama at infoseek dot jp
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30328