From: SourceForge.net <no...@so...> - 2004-07-15 12:54:09
|
Bugs item #991565, was opened at 2004-07-15 07:54 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=991565&group_id=2435 Category: gcc Group: None Status: Open Resolution: None Priority: 5 Submitted By: Aaron W. LaFramboise (aaronwl) Assigned to: Danny Smith (dannysmith) Summary: Optimization/link problem at gcc -O1 Initial Comment: This fails on MinGW GCC 3.4.1 RC, as well as vanilla FSF GCC 3.4.0 and FSF GCC head. It's not a minimal testcase, and not even proper C, and I have not done too much past this to analyze the failure beyond get this testcase. I'm sort of frazzled at the moment. ixx reported that this causing build failures in dna analysis tool. a websearch indicates that this may be causing failures in quite a few other programs also. the code itself is distilled from mingwrt head. This fails with: gcc -O1 -shared p.c -o p.dll but not with: gcc -O1 -shared p.c -o p.dll Errors: Info: resolving ___mb_cur_max by linking to __imp____mb_cur_max (auto-import) Info: resolving __pctype by linking to __imp___pctype (auto-import) fu000001.o(.idata$3+0xc): undefined reference to `libmsvcrt_a_iname' fu000003.o(.idata$3+0xc): undefined reference to `libmsvcrt_a_iname' nmth000000.o(.idata$4+0x0): undefined reference to `_nm____mb_cur_max' nmth000002.o(.idata$4+0x0): undefined reference to `_nm___pctype' Testcase: extern int __mb_cur_max; extern unsigned short* _pctype; extern __inline__ int isdigit(int c) { return (__mb_cur_max == 1 ? (_pctype[c] & 0x0004) : _isctype(c, 0x0004)); } extern __inline__ int isspace(int c) { return (__mb_cur_max == 1 ? (_pctype[c] & 0x0008) : _isctype(c, 0x0008)); } int llama() { if (!isdigit(0) && isspace(0)) return 1; return 0; } ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=991565&group_id=2435 |