re PR middle-end/51764 (mudflap does not work with LTO)
authorRichard Guenther <rguenther@suse.de>
Thu, 5 Jan 2012 15:08:42 +0000 (15:08 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 5 Jan 2012 15:08:42 +0000 (15:08 +0000)
2012-01-05  Richard Guenther  <rguenther@suse.de>

PR middle-end/51764
* common.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move
to c.opt.
* toplev.c (process_options): Reject combining mudflap and LTO.
* tree-nomudflap.c (nogo): Use sorry instead of internal_error.

c-family/
* c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
from common.opt.

From-SVN: r182913

gcc/ChangeLog
gcc/c-family/ChangeLog
gcc/c-family/c.opt
gcc/common.opt
gcc/toplev.c
gcc/tree-nomudflap.c

index 487ce17aeabe36e6b008948ba28d53d33b95845d..c28e9463ddefa6ca23fcb87988e82660fb25693c 100644 (file)
@@ -1,3 +1,11 @@
+2012-01-05  Richard Guenther  <rguenther@suse.de>
+
+       PR middle-end/51764
+       * common.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move
+       to c.opt.
+       * toplev.c (process_options): Reject combining mudflap and LTO.
+       * tree-nomudflap.c (nogo): Use sorry instead of internal_error.
+
 2012-01-05  Richard Guenther  <rguenther@suse.de>
 
        PR tree-optimization/51760
index 7850829108ae1920a4638c5958eff860465f7efd..95ce166a2043dadb7bcfc6e8b99e37f3671f097b 100644 (file)
@@ -1,3 +1,9 @@
+2012-01-05  Richard Guenther  <rguenther@suse.de>
+
+       PR middle-end/51764
+       * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
+       from common.opt.
+
 2011-12-30  Paolo Carlini  <paolo.carlini@oracle.com>
 
        PR c++/51316
index 42c9a0dfc665cf915c4753fbd71f15f820e42414..447c88f761a044fc270fa11b8279a9e6596f1f64 100644 (file)
@@ -489,6 +489,10 @@ Wmissing-prototypes
 C ObjC Var(warn_missing_prototypes) Warning
 Warn about global functions without prototypes
 
+Wmudflap
+C ObjC C++ ObjC++ Var(warn_mudflap) Init(1) Warning
+Warn about constructs not instrumented by -fmudflap
+
 Wmultichar
 C ObjC C++ ObjC++ Warning
 Warn about use of multi-character character constants
@@ -865,6 +869,18 @@ fms-extensions
 C ObjC C++ ObjC++ Var(flag_ms_extensions)
 Don't warn about uses of Microsoft extensions
 
+fmudflap
+C ObjC C++ ObjC++ RejectNegative Report Var(flag_mudflap)
+Add mudflap bounds-checking instrumentation for single-threaded program
+
+fmudflapth
+C ObjC C++ ObjC++ RejectNegative Report Var(flag_mudflap,2)
+Add mudflap bounds-checking instrumentation for multi-threaded program
+
+fmudflapir
+C ObjC C++ ObjC++ RejectNegative Report Var(flag_mudflap_ignore_reads)
+Ignore read operations when inserting mudflap instrumentation
+
 fname-mangling-version-
 C++ ObjC++ Joined Ignore Warn(switch %qs is no longer supported)
 
index 2a2c679cc13058744e34f70fbfefc084b8296c48..6cfe17a15d3ac85159fa90e86f59e6adffb90729 100644 (file)
@@ -570,10 +570,6 @@ Wmissing-noreturn
 Common Var(warn_missing_noreturn) Warning
 Warn about functions which might be candidates for __attribute__((noreturn))
 
-Wmudflap
-Common Var(warn_mudflap) Init(1) Warning
-Warn about constructs not instrumented by -fmudflap
-
 Woverflow
 Common Var(warn_overflow) Init(1) Warning
 Warn about overflow in arithmetic expressions
@@ -1465,18 +1461,6 @@ fmove-loop-invariants
 Common Report Var(flag_move_loop_invariants) Init(1) Optimization
 Move loop invariant computations out of loops
 
-fmudflap
-Common RejectNegative Report Var(flag_mudflap)
-Add mudflap bounds-checking instrumentation for single-threaded program
-
-fmudflapth
-Common RejectNegative Report Var(flag_mudflap,2)
-Add mudflap bounds-checking instrumentation for multi-threaded program
-
-fmudflapir
-Common RejectNegative Report Var(flag_mudflap_ignore_reads)
-Ignore read operations when inserting mudflap instrumentation
-
 fdce
 Common Var(flag_dce) Init(1) Optimization
 Use the RTL dead code elimination pass
index f2ca43490ae9c33257fd7ccef3331c06fa8cadb7..c145af48fb9859eb99d507b2ff9001033f2bbf98 100644 (file)
@@ -1325,6 +1325,9 @@ process_options (void)
           "and -ftree-loop-linear)");
 #endif
 
+  if (flag_mudflap && flag_lto)
+    sorry ("mudflap cannot be used together with link-time optimization");
+
   /* One region RA really helps to decrease the code size.  */
   if (flag_ira_region == IRA_REGION_AUTODETECT)
     flag_ira_region
index 44e2989138659f92ba664ce670e554adc0175e20..f204e2a064c4a72cc858ceea5d3ff6645ab8a7b1 100644 (file)
@@ -44,7 +44,7 @@ along with GCC; see the file COPYING3.  If not see
 static void
 nogo (void)
 {
-  internal_error ("mudflap: this language is not supported");
+  sorry ("mudflap: this language is not supported");
 }
 
 void