Bugs item #1112123, was opened at 2005-01-30 05:29
Message generated for change (Comment added) made by dannysmith
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=102435&aid=1112123&group_id=2435
Category: gcc
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Alexander J. Vincent (jslab)
Assigned to: Danny Smith (dannysmith)
Summary: -Os: unable to find a register to spill in class 'CREG'
Initial Comment:
D:\builds\mozilla\xpcom\obsolete>g++ -Os -c nsFileSpec.i
d:/mozilla/xpcom/obsolete/nsFileSpec.cpp: In member
function `void nsPersistentF
ileDescriptor::GetData(nsAFlatCString&) const':
d:/mozilla/xpcom/obsolete/nsFileSpec.cpp:1272: error:
unable to find a register
to spill in class `CREG'
d:/mozilla/xpcom/obsolete/nsFileSpec.cpp:1272: error:
this is the insn:
(call_insn/j:HI 68 67 69 2 (call (mem:QI (reg/f:SI 3 bx
[68]) [0 S1 A8])
(const_int 0 [0x0])) 362 {*sibcall_1}
(insn_list 64 (insn_list 65 (insn_
list 66 (insn_list 67 (nil)))))
(expr_list:REG_DEAD (reg:SI 2 cx [ <anonymous> ])
(expr_list:REG_DEAD (reg:SI 1 dx [ <anonymous> ])
(expr_list:REG_DEAD (reg:SI 0 ax [ outData ])
(expr_list:REG_DEAD (reg/f:SI 3 bx [68])
(nil)))))
(expr_list (use (reg:SI 0 ax [ outData ]))
(expr_list (use (reg:SI 1 dx [ <anonymous> ]))
(expr_list (use (reg:SI 2 cx [ <anonymous> ]))
(nil)))))
d:/mozilla/xpcom/obsolete/nsFileSpec.cpp:1272: confused
by earlier errors, baili
ng out
The generated .i file is at:
http://silver.warwickcompsoc.co.uk/temp/nsfilespec.i
FYI: I was attempting a MinGW build of Mozilla from
source code dated 28 Jan 2005 20:00 PST, with
ac_add_options --disable-debug
ac_add_options --enable-optimize=-Os
----------------------------------------------------------------------
>Comment By: Danny Smith (dannysmith)
Date: 2005-01-30 17:30
Message:
Logged In: YES
user_id=11494
I was wrong. The bug is tweaked by method being marked as
both dllimport and regparm(3). I have attached reduced
testcase.
Danny
----------------------------------------------------------------------
Comment By: Danny Smith (dannysmith)
Date: 2005-01-30 14:36
Message:
Logged In: YES
user_id=11494
Confirmed with 3.4.4 amd 4.0.0.
The problem is with this:
__attribute__ ((regparm (3), stdcall))
If I replace the above with either:
__attribute__((fastcall)
or
__attribute__((stdcall))
or
__attribute__((regparm(2)))
compilation is successful.
However, if I replace with __attribute__((regparm(3)))
I get the same compiler error message as you report, so its
not just the combination of stdcall and regparm.
IMO, the combo __attribute__ ((regparm (n), stdcall))
should cause a warning or error to be emitted,
since I really think they are not compatible.
When using these attributes with virtual methods there is also
this unresolved bug:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14688
Danny
----------------------------------------------------------------------
Comment By: Alexander J. Vincent (jslab)
Date: 2005-01-30 05:30
Message:
Logged In: YES
user_id=134163
WARNING: The generated .i file is 1.6MB in size.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=102435&aid=1112123&group_id=2435
|