[Bug 10] ARM: runnable/opover2.d fails: xopEquals fallback aborts instead of throwing Exception

gdc-bugzilla at gdcproject.org gdc-bugzilla at gdcproject.org
Fri Feb 14 11:15:01 PST 2014


http://bugzilla.gdcproject.org/show_bug.cgi?id=10

--- Comment #15 from Johannes Pfau <johannespfau at gmail.com> 2014-02-14 19:15:01 GMT ---
Yes, it's kinda sad. However I don't think any other solution will work.
TREE_NOTHROW means 'wont ever throw anything' and the backend seems to rely on
this so we just can't map that to the 'nothrow' keyword.


* TypeInfo_Struct.xopEquals in object_d. is marked as '@safe pure nothrow'
* it's called from TypeInfo_Struct.equals '@trusted pure nothrow const'
* _xopEquals in object.d is not marked as nothrow (but it throws an Error so it
could be)
* the compiler generates a stub for TypeInfo_Struct.xopEquals which is not
nothrow. This stub then calls _xopEquals

So the autogenerated stub and _xopEquals could be marked as nothrow as well but
it wouldn't change anything.

This reported bug is not the only cases were this causes problems. These test
cases also fail as long as we set TREE_NOTHROW:

FAIL: runnable/gdc.d execution test
FAIL: runnable/opover2.d execution test
FAIL: runnable/test41.d execution test
FAIL: runnable/testcontracts.d execution test
FAIL: runnable/testdstress.d execution test
FAIL: runnable/testline.d execution test
FAIL: runnable/xtest46.d execution test

Here's the GCC commit which introduced removing unwind tables for TREE_NOTHROW
functions, for reference:
http://gcc.gnu.org/ml/gcc-patches/2008-03/msg00958.html

-- 
Configure bugmail: http://bugzilla.gdcproject.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.


More information about the D.gnu mailing list