aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@yorick.cygnus.com>1997-11-25 07:00:30 +0000
committerJason Merrill <jason@gcc.gnu.org>1997-11-25 02:00:30 -0500
commit9b49329391a65b2ead788a9ffce9f7547ce4fd36 (patch)
tree007bdc948ac94939e22501f01d754c18c8361695
parent20b9016983fc3fda1ff9f8262b2b428f7a689ea3 (diff)
downloadgcc-9b49329391a65b2ead788a9ffce9f7547ce4fd36.zip
gcc-9b49329391a65b2ead788a9ffce9f7547ce4fd36.tar.gz
gcc-9b49329391a65b2ead788a9ffce9f7547ce4fd36.tar.bz2
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: r16695
-rw-r--r--gcc/cp/ChangeLog3
-rw-r--r--gcc/cp/typeck.c15
2 files changed, 12 insertions, 6 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index ad1788b..8af98a4 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +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.
+
* exception.cc (struct cp_eh_info): Add handlers field.
(__cp_push_exception): Initialize it.
(__cp_pop_exception): Decrement it. Don't pop unless it's 0.
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index 39a7120..bd5a43c 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -4807,12 +4807,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;