This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch] PR c/7490
- From: Philippe Trebuchet <Philippe dot Trebuchet at sophia dot inria dot fr>
- To: ebotcazou at libertysurf dot fr, gdr at integrable-solutions dot net
- Cc: Philippe dot Trebuchet at sophia dot inria dot fr, gcc-patches at gcc dot gnu dot org
- Date: Thu, 21 Nov 2002 13:34:32 +0100 (MET)
- Subject: Re: [Patch] PR c/7490
Hi,
so here is the new patch revision, I included a testcase done "by hand" with a diff -c -p -3 command
*** gcc/gcc/testsuite/gcc.c-torture/compile/20021120.c Thu Nov 21 12:01:49 2002
--- gcc/gcc/testsuite/gcc.c-torture/compile/20021120.c Thu Nov 21 13:10:23 2002
***************
*** 0 ****
--- 1,6 ----
+ void foo()
+ {
+ extern bar() __attribute__((alias "BAR"));
+ bar();
+ }
+
Index: gcc/ChangeLog
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/ChangeLog,v
retrieving revision 1.15936
diff -c -p -3 -r1.15936 ChangeLog
*** gcc/ChangeLog 18 Nov 2002 23:21:27 -0000 1.15936
--- gcc/ChangeLog 21 Nov 2002 12:08:41 -0000
***************
*** 1,3 ****
--- 1,8 ----
+ 2002-11-20 Philippe Trebuchet <Philippe.trebuchet@sophia.inria.fr>
+
+ * c-semantics.c (genrtl_scope_stmt): Fix local alias Handling
+
+
Index: gcc/c-semantics.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/c-semantics.c,v
retrieving revision 1.47
diff -c -p -3 -r1.47 c-semantics.c
*** gcc/c-semantics.c 22 Sep 2002 02:03:15 -0000 1.47
--- gcc/c-semantics.c 21 Nov 2002 12:08:41 -0000
*************** genrtl_scope_stmt (t)
*** 620,628 ****
&& !TREE_ASM_WRITTEN (fn)
&& TREE_ADDRESSABLE (fn))
{
! push_function_context ();
! output_inline_function (fn);
! pop_function_context ();
}
}
}
--- 620,642 ----
&& !TREE_ASM_WRITTEN (fn)
&& TREE_ADDRESSABLE (fn))
{
! tree alias;
! alias = lookup_attribute ("alias", DECL_ATTRIBUTES (fn));
! if (alias)
! {
! alias = TREE_VALUE (TREE_VALUE (alias));
! alias = get_identifier (TREE_STRING_POINTER (alias));
! assemble_alias (fn, alias);
! }
! else if (DECL_SAVED_INSNS (fn) != NULL)
! {
! push_function_context ();
! output_inline_function (fn);
! pop_function_context ();
! }
! else
! error ("no definition for auto nested function `%s'",
! IDENTIFIER_POINTER (DECL_NAME (fn)));
}
}
}