c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before releasing symbol.
* c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before releasing symbol. * gcc.c-torture/compile/section.c: New testcase. Co-Authored-By: Chen Gang <gang.chen.5i5j@gmail.com> From-SVN: r212234
This commit is contained in:
parent
9490fda67a
commit
22e1cf1ced
|
@ -1,3 +1,9 @@
|
|||
2014-07-02 Jan Hubicka <hubicka@ucw.cz>
|
||||
Chen Gang <gang.chen.5i5j@gmail.com>
|
||||
|
||||
* c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
|
||||
releasing symbol.
|
||||
|
||||
2014-07-01 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
* c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
|
||||
|
|
|
@ -2575,7 +2575,14 @@ duplicate_decls (tree newdecl, tree olddecl)
|
|||
|
||||
merge_decls (newdecl, olddecl, newtype, oldtype);
|
||||
|
||||
/* The NEWDECL will no longer be needed. */
|
||||
/* The NEWDECL will no longer be needed.
|
||||
|
||||
Before releasing the node, be sure to remove function from symbol
|
||||
table that might have been inserted there to record comdat group.
|
||||
Be sure to however do not free DECL_STRUCT_FUNCTION because this
|
||||
structure is shared in between NEWDECL and OLDECL. */
|
||||
if (TREE_CODE (newdecl) == FUNCTION_DECL)
|
||||
DECL_STRUCT_FUNCTION (newdecl) = NULL;
|
||||
if (TREE_CODE (newdecl) == FUNCTION_DECL
|
||||
|| TREE_CODE (newdecl) == VAR_DECL)
|
||||
{
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2014-07-02 Jan Hubicka <hubicka@ucw.cz>
|
||||
Chen Gang <gang.chen.5i5j@gmail.com>
|
||||
|
||||
* gcc.c-torture/compile/section.c: New testcase.
|
||||
|
||||
2014-07-02 Christian Bruel <christian.bruel@st.com>
|
||||
|
||||
PR target/29349
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
/* { dg-do compile } */
|
||||
|
||||
/* { dg-require-effective-target named_sections } */
|
||||
extern int __attribute__ ((__section__(".init.text"))) elv_register(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
extern typeof(elv_register) elv_register;
|
Loading…
Reference in New Issue