]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
typeck.c (mark_addressable): Don't assume a FUNCTION_DECL has DECL_LANG_SPECIFIC.
authorJason Merrill <jason@yorick.cygnus.com>
Fri, 13 Feb 1998 00:40:04 +0000 (00:40 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 13 Feb 1998 00:40:04 +0000 (19:40 -0500)
* typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
has DECL_LANG_SPECIFIC.

From-SVN: r17896

gcc/cp/ChangeLog
gcc/cp/typeck.c

index 8ad0c805773f9ab84de0887c584da45c6929b212..fdb91d70939d23b2c182a27b55e36eb381ed6a1c 100644 (file)
@@ -1,3 +1,8 @@
+Mon Nov 24 12:15:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
+
+       * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
+       has DECL_LANG_SPECIFIC.
+
 Thu Dec 11 22:18:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
 
        * decl2.c (comdat_linkage): Also set DECL_COMDAT.
index b6fdcf4be3617d1694f4d23a8927c5cdd7dd876d..dec9c5433e47d38dbdeb946579d98098f154708d 100644 (file)
@@ -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;