Bug 460 – Assertion failure: '!needThis()' on line 143 in file 'tocsym.c'
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2006-10-25T18:43:00Z
Last change time
2014-02-15T13:19:18Z
Keywords
ice-on-invalid-code
Assigned to
bugzilla
Creator
digitalmars-com
Comments
Comment #0 by digitalmars-com — 2006-10-25T18:43:31Z
The code listed below is invalid, but an error message would be better than a compiler assertion failure.
>dmd -c gld\tmp.d
Assertion failure: '!needThis()' on line 143 in file 'tocsym.c'
abnormal program termination
----- tmp.d -----
extern(C) void func(void*);
struct s {
int v;
}
void func2() {
func(&s.v);
}
Comment #1 by thomas-dloop — 2006-11-08T09:37:11Z
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
[email protected] schrieb am 2006-10-25:
> http://d.puremagic.com/issues/show_bug.cgi?id=460
> The code listed below is invalid, but an error message would be better than a
> compiler assertion failure.
>
>>dmd -c gld\tmp.d
> Assertion failure: '!needThis()' on line 143 in file 'tocsym.c'
>
> abnormal program termination
>
> ----- tmp.d -----
> extern(C) void func(void*);
>
> struct s {
> int v;
> }
>
> void func2() {
> func(&s.v);
> }
Added to DStress as
http://dstress.kuehne.cn/nocompile/b/bug_tocsym_142_E.d
Thomas
-----BEGIN PGP SIGNATURE-----
iD8DBQFFUf47LK5blCcjpWoRAu0vAKCT2T3Up1jBZ5aJ6BtpG30hps6y2ACdGAc7
sOmZhL8cR3mu5QUaT4yrR9I=
=rRFD
-----END PGP SIGNATURE-----