[Patch, Fortran] Fix PR 71047

Fritz Reese fritzoreese@gmail.com
Fri May 13 00:14:00 GMT 2016


Here's the fix and a test case for the regression PR 71047 introduced
by the DEC STRUCTURE/UNION patch (commit 235999).

Turns out I was a bit greedy about adding component refs to structure
constructors in gfc_default_initializer. Fixed to only add them to
FL_STRUCTURE and FL_UNION symbols, which expect them during
translation. The component ref was being added to constructors for the
hidden _data and _vptr members of CLASS components, causing the code
for their real initialization to be skipped by the middle-end.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71047

---
Fritz Reese
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Remove-extraneous-component-refs-from-derived-type-c.patch
Type: text/x-patch
Size: 2345 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20160513/dc951077/attachment.bin>


More information about the Fortran mailing list