mono/libgdiplus — pull request #25 by akoeplinger (2014-08-27 12:42:35+00:00)
Title: Workaround GCC 4.7+ optimizer bug by disabling optimization for the affected function

GCC 4.7+ incorrectly optimizes the GdipAddPathStringI() function, resulting in the value of r->Y being incorrect in the called GdipAddPathString() function.
By compiling with -O0 or adding a printf("Test") after r = &rect this doesn't happen.

I can provide gcc assembler output if someone who has more insight into this than me wants to have a look at what exactly is optimized incorrectly.