Files
ldc/tests
Christian Kamm 723cfef519 Another shot at fixing the issues with (constant) struct literals and their addresses. See DMD2682, #218, #324.
The idea is to separate the notion of const from 'this variable can always be
replaced with its initializer' in the frontend. To do that, I introduced
Declaration::isSameAsInitializer, which is overridden in VarDeclaration to
return false for constants that have a struct literal initializer.

So
{{{
const S s = S(5);
void foo() { auto ps = &s; }
// is no longer replaced by
void foo() { auto ps = &(S(5)); }
}}}

To make taking the address of a struct constant with a struct-initializer
outside of function scope possible, I made sure that AddrExp::optimize doesn't
try to run the argument's optimization with WANTinterpret - that'd again
replace the constant with a struct literal temporary.
2009-06-14 19:49:58 +02:00
..
2009-02-26 14:49:32 +01:00

We have two different test sets. For the test drivers
you need do compile the .d files in this folder with
a Phobos D compiler.

To run the 'mini' test suite run
./runminitests

To run the DStress based tests execute
./runtest tmp-sensible-name
and then use 
./findregressions old-results new-results 
to display a list of regressions. You can
download old result files from
http://www.incasoftware.de/~kamm/ldc/reference