[LLVMbugs] [Bug 395] NEW: [llvm-gcc] internal flag for Construct On First Use should be char
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Fri Jul 2 18:15:08 PDT 2004
http://llvm.cs.uiuc.edu/bugs/show_bug.cgi?id=395
Summary: [llvm-gcc] internal flag for Construct On First Use
should be char
Product: tools
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: llvm-gcc
AssignedTo: unassignedbugs at nondot.org
ReportedBy: markus at oberhumer.com
Currently the internal flag (ltmp_0_25 below) for static objects seems to be a
"llvm-long" where a char would suffice. Consider this example:
struct MyObject {
MyObject();
};
MyObject& get() {
static MyObject obj; // construct on first use
return obj;
}
translation --->
/* Global Variable Definitions and Initialization */
static signed long long ltmp_0_25;
static struct l_unnamed0 ltmp_1_26;
/* Function Bodies */
struct l_unnamed0 *_Z3getv(void) {
signed char ltmp_2_3;
ltmp_2_3 = *((signed char *)(<mp_0_25));
if ((ltmp_2_3 == 0)) {
goto ltmp_3_13;
} else {
goto ltmp_4_13;
}
ltmp_3_13:
_ZN8MyObjectC1Ev((<mp_1_26));
*((signed char *)(<mp_0_25)) = 1;
return (<mp_1_26);
ltmp_4_13:
return (<mp_1_26);
}
------- 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