This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/71528] [5/6/7 Regression] multiple extern reference declarations produce uninitialized access


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2016-06-14
     Ever confirmed|0                           |1

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
That said, I believe the bug is not there, but in the FE.
x is initially marked TREE_READONLY, then cp_finish_decl clears the
TREE_READONLY bit:
6782        {
6783          was_readonly = 1;
6784          TREE_READONLY (decl) = 0;
6785        }
because it has an initializer that is invoked at runtime, but then
duplicate_decls sets it again:
2117          /* Merge the type qualifiers.  */
2118          if (TREE_READONLY (newdecl))
2119            TREE_READONLY (olddecl) = 1;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]