This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[tree-ssa] fix 14694


As I mentioned to Diego in other mail.


r~


        * c-common.c (handle_alias_attribute): Mark aliased variables
        to be TREE_STATIC.
	* gcc.c-torture/compile/20040323-1.c: New.

Index: c-common.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-common.c,v
retrieving revision 1.344.2.64
diff -c -p -d -r1.344.2.64 c-common.c
*** c-common.c	16 Mar 2004 22:16:28 -0000	1.344.2.64
--- c-common.c	24 Mar 2004 04:58:02 -0000
*************** handle_alias_attribute (tree *node, tree
*** 5014,5020 ****
        if (TREE_CODE (decl) == FUNCTION_DECL)
  	DECL_INITIAL (decl) = error_mark_node;
        else
! 	DECL_EXTERNAL (decl) = 0;
      }
    else
      {
--- 5014,5023 ----
        if (TREE_CODE (decl) == FUNCTION_DECL)
  	DECL_INITIAL (decl) = error_mark_node;
        else
! 	{
! 	  DECL_EXTERNAL (decl) = 0;
! 	  TREE_STATIC (decl) = 1;
! 	}
      }
    else
      {
Index: testsuite/gcc.c-torture/compile/20040323-1.c
===================================================================
RCS file: testsuite/gcc.c-torture/compile/20040323-1.c
diff -N testsuite/gcc.c-torture/compile/20040323-1.c
*** /dev/null	1 Jan 1970 00:00:00 -0000
--- testsuite/gcc.c-torture/compile/20040323-1.c	24 Mar 2004 04:58:03 -0000
***************
*** 0 ****
--- 1,11 ----
+ /* PR 14694 */
+ /* { dg-require-alias "" } */
+ 
+ extern unsigned int _rtld_local __attribute__ ((alias ("_rtld_global")));
+ 
+ unsigned int
+ _dl_start (void *arg)
+ {
+   unsigned int elf_machine_rel () { return _rtld_local; }
+   return elf_machine_rel ();
+ }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]