Bug 13175 – [D1] ICE on conflicting overloads in presense of default __FILE__/__LINE__

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86_64
OS
Linux
Creation time
2014-07-21T11:28:00Z
Last change time
2014-07-24T10:52:16Z
Assigned to
nobody
Creator
public

Comments

Comment #0 by public — 2014-07-21T11:28:09Z
Similar to https://issues.dlang.org/show_bug.cgi?id=12933 : =================== class Test { void opCall ( char[] msg, char[] file = __FILE__, long line = __LINE__ ) { } void opCall ( char[] file = __FILE__, long line = __LINE__ ) { } } void main() { Test("aaa"); } =================== =================== dmd1: expression.c:833: void expToCBuffer(OutBuffer*, HdrGenState*, Expression*, PREC): Assertion `precedence[e->op] != PREC_zero' failed. Aborted (core dumped) ===================
Comment #1 by bugzilla — 2014-07-21T19:10:38Z
When I try it, I get: C:\cbx\mars1>dmd foo DMD v1.077 DEBUG foo.d(14): Error: function foo.Test.opCall called with argument types: (char[3u]) matches both: foo.d(3): foo.Test.opCall(char[] msg, char[] file = __FILE__, long line = cast(long)__LINE__) and: foo.d(7): foo.Test.opCall(char[] file = __FILE__, long line = cast(long)__LINE__)
Comment #2 by public — 2014-07-21T19:25:07Z
Hm, issue was reproduced using build from commit 73c30d1ddc0008c68a7796d5f1dbaa76e77ba841 I will try checking out most recent dmd-1.x HEAD tomorrow
Comment #3 by public — 2014-07-22T15:52:33Z
Yes, this works with more recent commits. However I can't test dmd-1.x HEAD because this commit has broken it : eaef472a9e4ded15360a8a8de9c36b8b3cd07059 g++ -c -Wno-deprecated -Wstrict-aliasing -D__pascal= -fno-exceptions -O2 -Ibackend -Itk -Iroot -DMARS=1 -DDMDV1=1 -DTARGET_LINUX=1 -DDM_TARGET_CPU_X86=1 -Iroot e2ir.c e2ir.c: In function ‘elem* setArray(elem*, elem*, Type*, elem*)’: e2ir.c:609:14: error: ‘Tvector’ was not declared in this scope
Comment #4 by public — 2014-07-24T10:52:16Z
Works with 9135f17a8e91b4ff2a600380155529a855a8ce83