[m-rev.] diff: GCC back-end: fix bug with -fpic

Fergus Henderson fjh at cs.mu.OZ.AU
Mon May 28 04:35:09 AEST 2001


I'm currently running a bootcheck, if it succeeds I'll commit this.

Estimated hours taken: 8
Branches: main, release

gcc/mercury/mercury-gcc.c:
	Fix a bug that caused the GCC back-end to generate incorrect code
	when position-independent code was enabled (`--target asm --pic'):
	set TREE_PUBLIC for extern variable declarations.

Index: gcc/mercury/mercury-gcc.c
===================================================================
RCS file: /home/mercury1/repository/gcc/mercury/mercury-gcc.c,v
retrieving revision 1.28
diff -u -d -r1.28 mercury-gcc.c
--- gcc/mercury/mercury-gcc.c	2001/01/30 16:55:09	1.28
+++ gcc/mercury/mercury-gcc.c	2001/05/27 18:33:15
@@ -181,6 +181,7 @@
   tree var_decl = build_decl (VAR_DECL, get_identifier (var_name),
 			      var_type);
   DECL_EXTERNAL (var_decl) = 1;
+  TREE_PUBLIC (var_decl) = 1;
   layout_decl (var_decl, /*known_align=*/0);
   rest_of_decl_compilation (var_decl, /*asm_spec=*/NULL_PTR,
   			    /*toplevel=*/1, /*at_end=*/0);

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list