This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix PR26364
- From: Richard Guenther <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 9 Jan 2008 11:32:43 +0100 (CET)
- Subject: [PATCH] Fix PR26364
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to mainline.
Richard.
2008-01-09 Steven Bosscher <stevenb.gcc@gmail.com>
PR debug/26364
* opts.c (decode_options): Disable inlining of functions called
once if not in unit-at-a-time mode.
--- opts.c.jj 2008-01-08 13:43:31.000000000 +0100
+++ opts.c 2008-01-08 13:50:44.000000000 +0100
@@ -950,6 +950,16 @@
if (flag_really_no_inline == 2)
flag_really_no_inline = flag_no_inline;
+ /* Inlining of functions called just once will only work if we can look
+ at the complete translation unit. */
+ if (flag_inline_functions_called_once && !flag_unit_at_a_time)
+ {
+ flag_inline_functions_called_once = 0;
+ warning (OPT_Wdisabled_optimization,
+ "-funit-at-a-time is required for inlining of functions "
+ "that are only called once");
+ }
+
/* The optimization to partition hot and cold basic blocks into separate
sections of the .o and executable files does not work (currently)
with exception handling. This is because there is no support for