https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119139
--- Comment #7 from Iain Buclaw <ibuclaw at gcc dot gnu.org> --- >From http://www.dsource.org/projects/dmd/changeset/259 The first setting of `const` to the result variable looks fine, as that's against the parameter in the `out(result)` function, the result cannot be changed from the function once it's been returned. The second setting of `const` looks more suspicious, as that's against the local variable. As the reduced code in this PR shows, a function with multiple returns means that it possibly can't be const in the TREE_READONLY sense, as it isn't constructed from one location. Though logically it is only written to *once*.