Added new test class for new dereference preference rules.

The code now requires gcc-4.9 to compile.