[LLVMbugs] [Bug 509] NEW: [llvm-g++] Do not use dynamic initialization where static init will do
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Sun Feb 13 17:18:19 PST 2005
http://llvm.cs.uiuc.edu/bugs/show_bug.cgi?id=509
Summary: [llvm-g++] Do not use dynamic initialization where
static init will do
Product: tools
Version: 1.4
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: llvm-g++
AssignedTo: unassignedbugs at nondot.org
ReportedBy: sabre at nondot.org
For the following testcase:
---
struct Data {
unsigned *data;
unsigned array[1];
};
Data shared_null = { shared_null.array, {0} };
---
llvm-g++ emits a dynamic initialization of the 'shared_null' global. g++
statically intializes the global (because the initializer *IS* a constant), and
we should too.
This bug causes us to miscompile QT-4.0, as it has other dynamic intializers
that depend on this. In this case, some initializers run that use this, then
this initializer runs, then others run. This is a problem.
-Chris
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
More information about the llvm-bugs
mailing list