aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Haley <aph@redhat.com>2003-06-10 16:57:46 +0000
committerAndrew Haley <aph@gcc.gnu.org>2003-06-10 16:57:46 +0000
commitdc952677438ef5015c59409c79cf36d9727f2787 (patch)
tree26381b2b019dd2376a5e5a18cdab2d737b068089
parente076f71a38f9945415a6dd2b037b20c1de9b6d3b (diff)
downloadgcc-dc952677438ef5015c59409c79cf36d9727f2787.zip
gcc-dc952677438ef5015c59409c79cf36d9727f2787.tar.gz
gcc-dc952677438ef5015c59409c79cf36d9727f2787.tar.bz2
resource.c (write_resource_constructor): Use expand_expr to generate the address of the label attached to a resource.
2003-06-10 Andrew Haley <aph@redhat.com> * resource.c (write_resource_constructor): Use expand_expr to generate the address of the label attached to a resource. * Make-lang.in (java/resource.o): Add expr.h From-SVN: r67714
-rw-r--r--gcc/java/ChangeLog6
-rw-r--r--gcc/java/Make-lang.in2
-rw-r--r--gcc/java/resource.c5
3 files changed, 10 insertions, 3 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index c9d623e..28f85b2b 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,5 +1,11 @@
2003-06-10 Andrew Haley <aph@redhat.com>
+ * resource.c (write_resource_constructor): Use expand_expr to
+ generate the address of the label attached to a resource.
+ * Make-lang.in (java/resource.o): Add expr.h
+
+2003-06-10 Andrew Haley <aph@redhat.com>
+
* lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
(java_decl_ok_for_sibcall): New.
diff --git a/gcc/java/Make-lang.in b/gcc/java/Make-lang.in
index 18264a6..a4356d7 100644
--- a/gcc/java/Make-lang.in
+++ b/gcc/java/Make-lang.in
@@ -335,7 +335,7 @@ java/parse-scan.o: $(parsedir)/java/parse-scan.c $(CONFIG_H) $(SYSTEM_H) coretyp
$(JAVA_LEX_C) java/parse.h java/lex.h input.h
java/resource.o: java/resource.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(JAVA_TREE_H) $(RTL_H) java/jcf.h java/parse.h toplev.h output.h $(GGC_H) \
- $(TARGET_H) function.h gt-java-resource.h
+ $(TARGET_H) function.h gt-java-resource.h expr.h
java/typeck.o: java/typeck.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h \
java/convert.h toplev.h $(SYSTEM_H) coretypes.h $(TM_H) $(GGC_H) real.h
java/win32-host.o: java/win32-host.c $(CONFIG_H) $(SYSTEM_H) java/jcf.h
diff --git a/gcc/java/resource.c b/gcc/java/resource.c
index 595b7b0..9e2b243 100644
--- a/gcc/java/resource.c
+++ b/gcc/java/resource.c
@@ -40,6 +40,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "ggc.h"
#include "stdio.h"
#include "target.h"
+#include "expr.h"
/* DOS brain-damage */
#ifndef O_BINARY
@@ -131,9 +132,9 @@ write_resource_constructor (void)
for (iter = nreverse (resources); iter != NULL_TREE;
iter = TREE_CHAIN (iter))
{
- const char *name = IDENTIFIER_POINTER (DECL_NAME (TREE_VALUE (iter)));
emit_library_call (registerResource_libfunc, 0, VOIDmode, 1,
- gen_rtx (SYMBOL_REF, Pmode, name),
+ expand_expr (build_address_of (TREE_VALUE (iter)),
+ 0, Pmode, 0),
Pmode);
}