This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/37338] [4.4 Regression] gcc.dg/array-init-1.c
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Sep 2008 17:50:46 -0000
- Subject: [Bug middle-end/37338] [4.4 Regression] gcc.dg/array-init-1.c
- References: <bug-37338-682@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from jakub at gcc dot gnu dot org 2008-09-09 17:50 -------
The problem here is that gimplify_init_constructor calls can_move_by_pieces,
and the default MOVE_BY_PIECES_P uses optimize_insn_for_speed_p:
#define MOVE_BY_PIECES_P(SIZE, ALIGN) \
(move_by_pieces_ninsns (SIZE, ALIGN, MOVE_MAX_PIECES + 1) \
< (unsigned int) MOVE_RATIO (optimize_insn_for_speed_p ()))
But during gimplification *crtl is cleared, so eventhough
optimize_function_for_speed_p (cfun) is true, crtl->maybe_hot_insn_p is false.
Should gimplify_init_constructor temporarily set crtl->maybe_hot_insn_p = true?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37338