Bug 9259 – Passing an array of pointers to a typesafe vararg is broken

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-01-02T17:58:00Z
Last change time
2013-01-21T02:17:26Z
Keywords
pull, wrong-code
Assigned to
nobody
Creator
siegelords_abode

Comments

Comment #0 by siegelords_abode — 2013-01-02T17:58:24Z
Worked fine with 2.060, broken in 2.061. Happens both with -m32 and -m64, but the compiler itself is 64 bit. It has to be an array of pointers, has to be passed to a function with typesafe varargs. void test(int*[] arr...) { assert(*arr[0] == 5); // This assertion fails } void main() { int a = 5; test([&a]); }
Comment #1 by k.hara.pg — 2013-01-09T21:34:09Z
Comment #2 by github-bugzilla — 2013-01-21T00:32:06Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/066b2801e06867d1d147be9629328a37b525bb57 fix Issue 9259 - Passing an array of pointers to a typesafe vararg is broken https://github.com/D-Programming-Language/dmd/commit/5c00c8dae6dbc0e78a91e6d67229557b4726c9c3 Merge pull request #1457 from 9rnsr/fix9259 Issue 9259 - Passing an array of pointers to a typesafe vararg is broken