c-opts.c (c_common_post_options): For -freestanding...
authorRichard Biener <rguenther@suse.de>
Tue, 6 May 2014 10:46:18 +0000 (10:46 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 6 May 2014 10:46:18 +0000 (10:46 +0000)
2014-05-06  Richard Biener  <rguenther@suse.de>

c-family/
* c-opts.c (c_common_post_options): For -freestanding,
-fno-hosted and -fno-builtin disable pattern recognition
if not enabled explicitely.

From-SVN: r210100

gcc/c-family/ChangeLog
gcc/c-family/c-opts.c

index 3c9732395d361e2852980c76c95b3219e2e4c55e..e347b32747732eb7d4d776dd241a79df93f3c0b3 100644 (file)
@@ -1,3 +1,9 @@
+2014-05-06  Richard Biener  <rguenther@suse.de>
+
+       * c-opts.c (c_common_post_options): For -freestanding,
+       -fno-hosted and -fno-builtin disable pattern recognition
+       if not enabled explicitely.
+
 2014-05-02  Marek Polacek  <polacek@redhat.com>
 
        * c.opt (Wsizeof-pointer-memaccess): Describe option.
index e162e49a18a8bb6275e49caabc268a051f2d106d..29e9a355beed7a36f56de8c9c7c055139e13d1c2 100644 (file)
@@ -851,6 +851,12 @@ c_common_post_options (const char **pfilename)
   if (flag_objc_exceptions && !flag_objc_sjlj_exceptions)
     flag_exceptions = 1;
 
+  /* If -ffreestanding, -fno-hosted or -fno-builtin then disable
+     pattern recognition.  */
+  if (!global_options_set.x_flag_tree_loop_distribute_patterns
+      && flag_no_builtin)
+    flag_tree_loop_distribute_patterns = 0;
+
   /* -Woverlength-strings is off by default, but is enabled by -Wpedantic.
      It is never enabled in C++, as the minimum limit is not normative
      in that standard.  */