First Last Prev Next    No search results available
Details
: [llvmgcc] miscompilation of staticly initialized unsigned...
Bug#: 377
: tools
: llvm-gcc
Status: RESOLVED
Resolution: FIXED
: All
: All
: 1.0
: P2
: normal
: 1.3

:
: miscompilation
:
:
  Show dependency tree - Show dependency graph
People
Reporter: Chris Lattner <sabre@nondot.org>
Assigned To: Chris Lattner <sabre@nondot.org>

Attachments


Note

You need to log in before you can comment on or make changes to this bug.

Related actions


Description:   Opened: 2004-06-20 13:17
If you compile all of the source files in 124.m88ksim but instab.c with a native
compiler, compile instab.c with llvmgcc, and link the results, it does not work.

All of the other source files in the program seem to be fine though.

-Chris
------- Comment #1 From Chris Lattner 2004-06-20 13:28:52 -------
Here is a reduced testcase:

struct T {
  unsigned X : 5;
  unsigned Y : 6;
  unsigned Z : 5;
};

struct T GV = { 1, 5, 1 };

It looks like static initializers for bitfields are not happy.

-Chris
------- Comment #2 From Chris Lattner 2004-06-20 14:06:03 -------
Fixed.  Patch here:
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20040614/015335.html

Testcase here:
SingleSource/UnitTests/2004-06-20-StaticBitfieldInit.c

With this bugfix, 124.m88ksim now works with LLVM.

-Chris

First Last Prev Next    No search results available