From: Jason Merrill Date: Fri, 13 Feb 1998 00:40:04 +0000 (+0000) Subject: typeck.c (mark_addressable): Don't assume a FUNCTION_DECL has DECL_LANG_SPECIFIC. X-Git-Tag: prereleases/egcs-1.0.2-prerelease~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c69f7bf109d3c98c486f7eed1667789f62c1abf3;p=thirdparty%2Fgcc.git typeck.c (mark_addressable): Don't assume a FUNCTION_DECL has DECL_LANG_SPECIFIC. * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL has DECL_LANG_SPECIFIC. From-SVN: r17896 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 8ad0c805773f..fdb91d70939d 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +Mon Nov 24 12:15:55 1997 Jason Merrill + + * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL + has DECL_LANG_SPECIFIC. + Thu Dec 11 22:18:37 1997 Jason Merrill * decl2.c (comdat_linkage): Also set DECL_COMDAT. diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index b6fdcf4be361..dec9c5433e47 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -4791,12 +4791,15 @@ mark_addressable (exp) return 1; case FUNCTION_DECL: - /* We have to test both conditions here. The first may - be non-zero in the case of processing a default function. - The second may be non-zero in the case of a template function. */ - x = DECL_MAIN_VARIANT (x); - if (DECL_TEMPLATE_INFO (x) && !DECL_TEMPLATE_SPECIALIZATION (x)) - mark_used (x); + if (DECL_LANG_SPECIFIC (x) != 0) + { + x = DECL_MAIN_VARIANT (x); + /* We have to test both conditions here. The first may be + non-zero in the case of processing a default function. The + second may be non-zero in the case of a template function. */ + if (DECL_TEMPLATE_INFO (x) && !DECL_TEMPLATE_SPECIALIZATION (x)) + mark_used (x); + } TREE_ADDRESSABLE (x) = 1; TREE_USED (x) = 1; TREE_ADDRESSABLE (DECL_ASSEMBLER_NAME (x)) = 1;