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]

Re: [PATCH] Miscompilation of __attribute__((constructor)) functions.


> Ok if you move the clearing to after
> 
>   /* Generate a new name for the new version. */
>   DECL_NAME (new_decl) = clone_function_name (old_decl, clone_name);
>   SET_DECL_ASSEMBLER_NAME (new_decl, DECL_NAME (new_decl));
>   SET_DECL_RTL (new_decl, NULL);
> 
> using new_decl directly, thus add
> 
>   /* When the old decl was a con-/destructor make sure the clone isn't.  */
>   DECL_STATIC_CONSTRUCTOR(new_decl) = 0;
>   DECL_STATIC_DESTRUCTOR(new_decl) = 0;

Done, and applied.

Paul


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