#1: Internal compiler error taking address of dllimported static class member
---------------------+------------------------------------------------------
Reporter: pfalcon | Owner: somebody
Type: bug | Status: new
Priority: major | Milestone:
Component: gcc | Version:
Keywords: |
---------------------+------------------------------------------------------
Reported in mailing list. Testcase was reduced to:
{{{
class __declspec(dllimport) Test {
public:
int member;
static int smember;
};
int main() {
// This is ok
int x = Test::smember;
// This leads to internal compiler error
int *p = &Test::smember;
}
}}}
Leads to:
{{{
dllimport-class-static.cpp: In function 'int main()':
dllimport-class-static.cpp:12: error: unrecognizable insn:
(insn 10 9 11 2 dllimport-class-static.cpp:11 (set (reg/f:SI 138)
(symbol_ref:SI ("_ZN4Test7smemberE") [flags 0x440] <var_decl
0xb75cf000 smember>)) -1 (nil))
dllimport-class-static.cpp:12: internal compiler error: in extract_insn,
at recog.c:2048
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://sourceforge.net/tracker/?func=add&group_id=173455&atid=865514>
for instructions.
}}}
Further reduction lead to:
{{{
__declspec(dllimport) extern int from_dll;
int main() {
int *p = &from_dll;
}
}}}
--
Ticket URL: <http://sourceforge.net/apps/trac/cegcc/ticket/1>
cegcc <http://sourceforge.net/projects/cegcc/>
CeGCC - GCC cross-compiling toolchain for WinCE
------------------------------------------------------------------------------
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world?
http://p.sf.net/sfu/oracle-sfdevnlfb
_______________________________________________
Cegcc-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cegcc-devel