Commit 3f774254 by Daniel Berlin Committed by Daniel Berlin

re PR c++/22452 (ICE expected tree that contains 'decl with visibility'…

re PR c++/22452 (ICE expected tree that contains 'decl with visibility' structure, have 'const_decl'  in decl_linkage, at cp/tree.c:2132)

2005-07-14  Daniel Berlin  <dberlin@dberlin.org>

	Fix PR c++/22452
	* tree.c (decl_linkage): Don't check DECL_COMDAT on CONST_DECL.

From-SVN: r102063
parent be9c593a
2005-07-14 Daniel Berlin <dberlin@dberlin.org>
Fix PR c++/22452
* tree.c (decl_linkage): Don't check DECL_COMDAT on CONST_DECL.
2005-07-15 Mark Mitchell <mark@codesourcery.com> 2005-07-15 Mark Mitchell <mark@codesourcery.com>
PR c++/22132 PR c++/22132
......
...@@ -2123,6 +2123,11 @@ decl_linkage (tree decl) ...@@ -2123,6 +2123,11 @@ decl_linkage (tree decl)
/* Things that are TREE_PUBLIC have external linkage. */ /* Things that are TREE_PUBLIC have external linkage. */
if (TREE_PUBLIC (decl)) if (TREE_PUBLIC (decl))
return lk_external; return lk_external;
/* Linkage of a CONST_DECL depends on the linkage of the enumeration
type. */
if (TREE_CODE (decl) == CONST_DECL)
return decl_linkage (TYPE_NAME (TREE_TYPE (decl)));
/* Some things that are not TREE_PUBLIC have external linkage, too. /* Some things that are not TREE_PUBLIC have external linkage, too.
For example, on targets that don't have weak symbols, we make all For example, on targets that don't have weak symbols, we make all
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment