]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR debug/26364 ([no unit-at-a-time mode] Uninlined function is marked as inlined)
authorSteven Bosscher <stevenb.gcc@gmail.com>
Wed, 9 Jan 2008 10:33:55 +0000 (10:33 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 9 Jan 2008 10:33:55 +0000 (10:33 +0000)
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.

From-SVN: r131423

gcc/ChangeLog
gcc/opts.c

index 619053cb520ff4778be645c2c15da2aa0c4d7698..b1fca9bf7776a80c35314e6b1b04430c87bfdcd5 100644 (file)
@@ -1,3 +1,9 @@
+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.
+
 2008-01-09  Alexandre Oliva  <aoliva@redhat.com>
 
        * Makefile.in (dse.o): Remove duplicate $(RECOG_H) dependency.
index 90408b5938dd8ea3b8b8e8705fb3755973832637..5d952c6304e1db8fc1c38cdc016154f3883daa53 100644 (file)
@@ -950,6 +950,16 @@ decode_options (unsigned int argc, const char **argv)
   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