[Bug c++/26757] C++ front-end producing two DECLs with the same UID

jakub at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sun Aug 13 19:27:00 GMT 2006



------- Comment #30 from jakub at gcc dot gnu dot org  2006-08-13 19:26 -------
Subject: Bug 26757

Author: jakub
Date: Sun Aug 13 20:26:38 2006
New Revision: 116115

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=116115
Log:
2006-08-13  Andrew MacLeod  <amacleod@redhat.com>

        PR middle-end/27793
        * tree-dfa.c (add_referenced_var): Assert DECL_UID is unique for
        different decls.

2006-08-13  Jakub Jelinek  <jakub@redhat.com>

        PR c++/28677
        PR middle-end/27793
        * cp-tree.h (cxx_int_tree_map): New struct.
        (struct language_function): Add extern_decl_map field.
        * name-lookup.c (pushdecl_maybe_friend): Add x -> t mapping
        to cp_function_chain->extern_decl_map hash table instead of
        copying over DECL_UID.
        * cp-gimplify.c (cxx_int_tree_map_eq, cxx_int_tree_map_hash): New
        functions.
        (cp_genericize_r): Remap DECL_EXTERN local decls using
        cp_function_chain->extern_decl_map hash table.
        * decl.c (finish_function): Clear extern_decl_map.

        Revert:
        2006-06-06  Andrew MacLeod  <amacleod@redhat.com>
        PR middle-end/27793
        * tree-dfa.c (referenced_vars_dup_list): New.  List of duplicate 
        referenced_variables with matching DECL_UID's.
        (find_referenced_vars): Make sure duplicate list is empty to start.
        (add_referenced_var): Add var to duplicate list if required.
        * tree-ssa.c (delete_tree_ssa): Clear var_ann's on duplicates.
        * tree-flow.h (referenced_vars_dup_list): External declaration.

        PR c++/26757
        PR c++/27894
        * g++.dg/tree-ssa/pr26757.C: New test.
        * g++.dg/tree-ssa/pr27894.C: New test.

Added:
    branches/gcc-4_1-branch/gcc/testsuite/g++.dg/tree-ssa/pr26757.C
    branches/gcc-4_1-branch/gcc/testsuite/g++.dg/tree-ssa/pr27894.C
Modified:
    branches/gcc-4_1-branch/gcc/ChangeLog
    branches/gcc-4_1-branch/gcc/cp/ChangeLog
    branches/gcc-4_1-branch/gcc/cp/cp-gimplify.c
    branches/gcc-4_1-branch/gcc/cp/cp-tree.h
    branches/gcc-4_1-branch/gcc/cp/decl.c
    branches/gcc-4_1-branch/gcc/cp/name-lookup.c
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_1-branch/gcc/tree-dfa.c
    branches/gcc-4_1-branch/gcc/tree-flow.h
    branches/gcc-4_1-branch/gcc/tree-ssa.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26757



More information about the Gcc-bugs mailing list