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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-12-16
          Component|sanitizer                   |tree-optimization
   Target Milestone|---                         |5.0
            Summary|[ASAN] Bogus                |[5 Regression] IPA-ICF
                   |"AddressSanitizer:          |merges const exported vars
                   |odr-violation"              |that could be addressable
                   |                            |in other TUs
     Ever confirmed|0                           |1

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
sem_variable *
sem_variable::parse (varpool_node *node, bitmap_obstack *stack)
{
  tree decl = node->decl;

  bool readonly = TYPE_P (decl) ? TYPE_READONLY (decl) : TREE_READONLY (decl);
  bool can_handle = readonly && (DECL_VIRTUAL_P (decl)
                                 || !TREE_ADDRESSABLE (decl));

So it indeed doesn't consider the case when the variable is accessible by other
TUs where the variable could be addressable in them.

Reply via email to