resource.c (write_resource_constructor): Use expand_expr to generate the address...
authorAndrew Haley <aph@redhat.com>
Tue, 10 Jun 2003 16:57:46 +0000 (16:57 +0000)
committerAndrew Haley <aph@gcc.gnu.org>
Tue, 10 Jun 2003 16:57:46 +0000 (16:57 +0000)
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

gcc/java/ChangeLog
gcc/java/Make-lang.in
gcc/java/resource.c

index c9d623eaf9182011800663f2f1563026ae7e4586..28f85b2b2c784621869518ce71a6a4e92aef85ee 100644 (file)
@@ -1,3 +1,9 @@
+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.
index 18264a6c510a0768255bab45d6dd97ddc7dd0aba..a4356d7f79b71a7dbfe04fd79f995f1233a38872 100644 (file)
@@ -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
index 595b7b06da7e7c26af8b8974c8ed6c588a2d4fec..9e2b2434008c3a3142348193b45b09f5449c7572 100644 (file)
@@ -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);
     }