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]

[PATCH] PR optimization/12324


Hi,
this is updated patch for the PR.  Now the constructor is elliminated in
both unit and non-unit-at-a-time mode.

Bootstrapped/regtested i386, OK?
Honza

2003-10-16  Jan Hubicka  <jh@suse.cz>
	PR optimization/12324
	* c-decl.c (build_compound_literal)
Index: c-decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-decl.c,v
retrieving revision 1.454
diff -c -3 -p -r1.454 c-decl.c
*** c-decl.c	4 Oct 2003 16:49:26 -0000	1.454
--- c-decl.c	15 Oct 2003 23:22:54 -0000
*************** build_compound_literal (tree type, tree 
*** 3088,3094 ****
  			       compound_literal_number);
        compound_literal_number++;
        DECL_NAME (decl) = get_identifier (name);
!       DECL_DEFER_OUTPUT (decl) = 1;
        DECL_COMDAT (decl) = 1;
        DECL_ARTIFICIAL (decl) = 1;
        pushdecl (decl);
--- 3088,3098 ----
  			       compound_literal_number);
        compound_literal_number++;
        DECL_NAME (decl) = get_identifier (name);
! 
!       /* By using GCC extension we may produce constructors we never use,
!          so ensure that the function is not emit unless it is needed.  */
!       if (flag_unit_at_a_time)
!         DECL_DEFER_OUTPUT (decl) = 1;
        DECL_COMDAT (decl) = 1;
        DECL_ARTIFICIAL (decl) = 1;
        pushdecl (decl);


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