Why does compiling in -O2 crash my application but -O2 -fno-default-inline does not?
<p>I have a 3rd party lib called TheLib and my lib called MyLib</p>

<p>TheLib is compiled first with a Struct contained in a header file called variantmap.h.  This header contains 2 inline functions:</p>

<pre><code>struct VariantMap {
    string name;
    map&lt;string, Variant&gt; children;
    bool isArray;

    VariantMap(VariantMap &amp; variantMap) {
        name = variantMap.name;
        children = variantMap.children;
        isArray = variantMap.isArray;
    }

    VariantMap() {
        isArray = false;
    }
};
</code></pre>

<p>MyLib also compiles with the aforementioned header.</p>

<p>When I compile both libs with -O2 (optimization level) MyLib crashes, but if I compile MyLib with -O2 but without inline functions (i.e. -fno-default-inline), it does not???</p>

<p>The crash seems to occur on the assignment of the string name according to gdb?</p>
