aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2005-04-05 04:08:56 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2005-04-05 04:08:56 +0000
commit3ce9c82463e3066170e8d8d4177f785e83537966 (patch)
tree537f89f23d224aaba8bed4029ffe23f53a59eb12 /gcc
parentb683f9fec6dc18d7ea24096bd9306f4cd2694e12 (diff)
downloadgcc-3ce9c82463e3066170e8d8d4177f785e83537966.zip
gcc-3ce9c82463e3066170e8d8d4177f785e83537966.tar.gz
gcc-3ce9c82463e3066170e8d8d4177f785e83537966.tar.bz2
re PR debug/9963 ([CygWin] g++ -gcoff report "C_EFCN symbol out of scope")
PR debug/9963 * config/i386/cygming.h (ASM_OUTPUT_EXTERNAL): Pass DECL to i386_pe_record_external_function. (i386_pe_record_external_function): Update declaration. * config/i386/winnt.c (struct extern_list): Add decl field. (i386_pe_record_external_function): Add decl parameter. (i386_pe_file_end): Check TREE_ASM_WRITTEN on decl, not identifier. * config/i386/i386-protos.h (i386_pe_record_external_function): Update declaration. From-SVN: r97602
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog13
-rw-r--r--gcc/config/i386/cygming.h4
-rw-r--r--gcc/config/i386/i386-protos.h2
-rw-r--r--gcc/config/i386/winnt.c9
4 files changed, 22 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 99b3d1c..b29d81d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,16 @@
+2005-04-05 Ian Lance Taylor <ian@airs.com>
+
+ PR debug/9963
+ * config/i386/cygming.h (ASM_OUTPUT_EXTERNAL): Pass DECL to
+ i386_pe_record_external_function.
+ (i386_pe_record_external_function): Update declaration.
+ * config/i386/winnt.c (struct extern_list): Add decl field.
+ (i386_pe_record_external_function): Add decl parameter.
+ (i386_pe_file_end): Check TREE_ASM_WRITTEN on decl, not
+ identifier.
+ * config/i386/i386-protos.h (i386_pe_record_external_function):
+ Update declaration.
+
2005-04-05 Kazu Hirata <kazu@cs.umass.edu>
* config/m68k/m68k-protos.h: Add a prototype for
diff --git a/gcc/config/i386/cygming.h b/gcc/config/i386/cygming.h
index de731bb..89d35a7 100644
--- a/gcc/config/i386/cygming.h
+++ b/gcc/config/i386/cygming.h
@@ -297,7 +297,7 @@ extern void i386_pe_unique_section (TREE, int);
do \
{ \
if (TREE_CODE (DECL) == FUNCTION_DECL) \
- i386_pe_record_external_function (NAME); \
+ i386_pe_record_external_function ((DECL), (NAME)); \
} \
while (0)
@@ -345,7 +345,7 @@ extern void i386_pe_unique_section (TREE, int);
/* External function declarations. */
-extern void i386_pe_record_external_function (const char *);
+extern void i386_pe_record_external_function (tree, const char *);
extern void i386_pe_declare_function_type (FILE *, const char *, int);
extern void i386_pe_record_exported_symbol (const char *, int);
extern void i386_pe_file_end (void);
diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h
index 1ecc3ae..2f949bd 100644
--- a/gcc/config/i386/i386-protos.h
+++ b/gcc/config/i386/i386-protos.h
@@ -234,7 +234,7 @@ extern int i386_pe_dllexport_name_p (const char *);
extern int i386_pe_dllimport_name_p (const char *);
extern void i386_pe_unique_section (tree, int);
extern void i386_pe_declare_function_type (FILE *, const char *, int);
-extern void i386_pe_record_external_function (const char *);
+extern void i386_pe_record_external_function (tree, const char *);
extern void i386_pe_record_exported_symbol (const char *, int);
extern void i386_pe_asm_file_end (FILE *);
extern void i386_pe_encode_section_info (tree, rtx, int);
diff --git a/gcc/config/i386/winnt.c b/gcc/config/i386/winnt.c
index cfab227..cecc97b 100644
--- a/gcc/config/i386/winnt.c
+++ b/gcc/config/i386/winnt.c
@@ -719,6 +719,7 @@ i386_pe_declare_function_type (FILE *file, const char *name, int public)
struct extern_list GTY(())
{
struct extern_list *next;
+ tree decl;
const char *name;
};
@@ -731,12 +732,13 @@ static GTY(()) struct extern_list *extern_head;
for it then. */
void
-i386_pe_record_external_function (const char *name)
+i386_pe_record_external_function (tree decl, const char *name)
{
struct extern_list *p;
p = (struct extern_list *) ggc_alloc (sizeof *p);
p->next = extern_head;
+ p->decl = decl;
p->name = name;
extern_head = p;
}
@@ -785,10 +787,11 @@ i386_pe_file_end (void)
{
tree decl;
- decl = get_identifier (p->name);
+ decl = p->decl;
/* Positively ensure only one declaration for any given symbol. */
- if (! TREE_ASM_WRITTEN (decl) && TREE_SYMBOL_REFERENCED (decl))
+ if (! TREE_ASM_WRITTEN (decl)
+ && TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)))
{
TREE_ASM_WRITTEN (decl) = 1;
i386_pe_declare_function_type (asm_out_file, p->name,