aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2000-01-03 03:33:09 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2000-01-03 03:33:09 +0000
commita71811fe383203d239582ed2980b7909c7829095 (patch)
tree7203167213b97f8f4c4f2099751252e3297b1c2b /gcc
parent9d81fc278106212dc3697bca3a91e53442202504 (diff)
downloadgcc-a71811fe383203d239582ed2980b7909c7829095.zip
gcc-a71811fe383203d239582ed2980b7909c7829095.tar.gz
gcc-a71811fe383203d239582ed2980b7909c7829095.tar.bz2
integrate.c (copy_decl_for_inlining): Clear TREE_ADDRESSABLE on copied LABEL_DECLs.
* integrate.c (copy_decl_for_inlining): Clear TREE_ADDRESSABLE on copied LABEL_DECLs. From-SVN: r31173
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/integrate.c8
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/inline4.C25
3 files changed, 37 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 697eb59..d223f01 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2000-01-02 Mark Mitchell <mark@codesourcery.com>
+
+ * integrate.c (copy_decl_for_inlining): Clear TREE_ADDRESSABLE on
+ copied LABEL_DECLs.
+
Mon Jan 3 02:54:40 2000 Hans-Peter Nilsson <hp@bitrange.com>
* config/i386/i386.c (ix86_expand_unary_operator): Function
diff --git a/gcc/integrate.c b/gcc/integrate.c
index 4b4988b..ca200e8 100644
--- a/gcc/integrate.c
+++ b/gcc/integrate.c
@@ -1,5 +1,5 @@
/* Procedure integration for GNU CC.
- Copyright (C) 1988, 91, 93-98, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1988, 91, 93-98, 1999, 2000 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com)
This file is part of GNU CC.
@@ -319,6 +319,12 @@ copy_decl_for_inlining (decl, from_fn, to_fn)
copy = copy_node (decl);
if (DECL_LANG_SPECIFIC (copy))
copy_lang_decl (copy);
+
+ /* TREE_ADDRESSABLE isn't used to indicate that a label's
+ address has been taken; it's for internal bookkeeping in
+ expand_goto_internal. */
+ if (TREE_CODE (copy) == LABEL_DECL)
+ TREE_ADDRESSABLE (copy) = 0;
}
/* Set the DECL_ABSTRACT_ORIGIN so the debugging routines know what
diff --git a/gcc/testsuite/g++.old-deja/g++.other/inline4.C b/gcc/testsuite/g++.old-deja/g++.other/inline4.C
new file mode 100644
index 0000000..bad66f3
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/inline4.C
@@ -0,0 +1,25 @@
+// Build don't link:
+// Origin: Mark Mitchell <mark@codesourcery.com>
+// Special g++ Options: -O2
+
+inline void f ()
+{
+ return;
+}
+
+inline void g ();
+
+void (*gp)() = &g;
+
+inline void g ()
+{
+ f ();
+}
+
+extern int array_size;
+
+void h ()
+{
+ int lookup_array[array_size];
+ g ();
+}